<div dir="ltr"><div>My only guess is that since the differences are so small, Grads just truncates them to zero.<br><br></div>Jeff Duda<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 29, 2016 at 2:36 PM, Helio Camargo <span dir="ltr">&lt;<a href="mailto:heliocamargo@gmail.com" target="_blank">heliocamargo@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>I´m performing the following expressions over time 1 of a 50 ensemble member run:</div><div><br></div><div>&#39;set t 1 last&#39;</div><div>&#39;set e 1 last&#39;</div><div>&#39;define ens = tpratesfc.1 &#39;</div><div><br></div><div>1) &#39;define smens = sum(ens,e=1,e=50)&#39;</div><div>2) &#39;define &#39;smensmsk =  maskout(sum(ens,e=1,e=50),sum(ens,e=1,e=50)-0)&#39;</div><div>3) &#39;define &#39;smensmskcnst = const(maskout(sum(ens,e=1,e=50),sum(ens,e=1,e=50)-0),0,-u)&#39;</div><div><br></div><div>&#39;set t 1&#39;</div><div><br></div><div>For some reason, for t=1, expression 1, yelds small negative values (smens.gif, attached). Expressions 2 and 3 should set undef to these negative values and set 0 for these undef grid points respectively. Looking at the figures smensmsk.gif and smensmskcnst.gif, these operations seem to work perfectly<br></div><div><br></div><div>And setting lon/lat to a point where the above operations should influence, is consistent with the figures above:</div><div>Lon = 298.442  Lat = -28.8304</div><div><b>ga-&gt; d smens<br></b></div><div><b>Result value = -8.33652e-19</b></div><div><br></div><div><b>ga-&gt; d smensmsk</b></div><div><b>Result value = -9.99e+08</b></div><div><br></div><div><b>ga-&gt; d smensmskcnst</b></div><div><b>Result value = 0</b></div><div><br></div><div><b>* differences also show expected result</b></div><div><b>&gt; operation 2 - operation 1</b></div><div><div>ga-&gt; d smensmsk-smens</div><div>Result value = -9.99e+08</div></div><div><br></div><div><b>&gt; operation 3 - operation 2</b></div><div><div>ga-&gt; d smensmskcnst-smensmsk</div><div>Result value = -9.99e+08</div></div><div><br></div><div><b>&gt; operation 3 - operation 1</b></div><div><div>ga-&gt; d smensmskcnst-ens</div><div>Result value = 1.9073e-20</div></div><div><br></div><div>However, making FIELD  diferences between defined expression 3 and defined expression 1 results &quot;Constant Field=0&quot; (diff_smensmskcnstsmens.gif). </div><div><br></div><div>Can anyone explain why this is happening?</div><div><br></div><div>Thanks in advance for your patience.</div><div><div>--<br>Helio</div></div>
</div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br></div>
</div>