Thank you again<div>Best Regards</div><div>Ipshita<span></span><br><br>On Friday, December 12, 2014, Gus Correa &lt;<a href="mailto:gus@ldeo.columbia.edu">gus@ldeo.columbia.edu</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Your intent is to replace 9.92226e+36 by -9999.0.<br>
This will leave any other values untouched.<br>
[I think it will not enforce +9999.0 as an upper bound either,<br>
if this is your assumption.]<br>
<br>
However, can you guarantee that your data doesn&#39;t<br>
have 9.6921e+36 amongst its values?<br>
[Say, outliers, invalid data that was not QC&#39;d, etc, or perhaps your<br>
data range really goes all the way up to 9.6921e+36.]<br>
<br>
Checking the actual input data values, before you do<br>
any calculations, may help.<br>
Choosing a missing_value/_FillValue outside the data range<br>
is also helpful.<br>
<br>
<br>
Gus Correa<br>
<br>
<br>
<br>
<br>
On 12/12/2014 05:10 PM, Ipshita Majhi wrote:<br>
&gt; Thank you<br>
&gt;<br>
&gt; Yes it is a typo in the code I fixed it yet it still gives max value as<br>
&gt; 9.6921e+36 , and if I write to substitute it then it gives 9.92226e+36<br>
&gt; as the max value.<br>
&gt;<br>
&gt; Best Regards<br>
&gt; Ipshita<br>
&gt;<br>
&gt;<br>
&gt; On Friday, December 12, 2014, Gus Correa &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;gus@ldeo.columbia.edu&#39;)">gus@ldeo.columbia.edu</a><br>
&gt; &lt;mailto:<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;gus@ldeo.columbia.edu&#39;)">gus@ldeo.columbia.edu</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Hi Ipshita<br>
&gt;<br>
&gt;     Is this a typo in your email or in the code?<br>
&gt;<br>
&gt;       &gt; if (pweek(i,j).eq.9.92226ee+36)then<br>
&gt;<br>
&gt;     Note the double &quot;ee&quot;.<br>
&gt;<br>
&gt;     Gus Correa<br>
&gt;<br>
&gt;     On 12/12/2014 04:29 PM, Ipshita Majhi wrote:<br>
&gt;      &gt; Dear NCL ,<br>
&gt;      &gt;<br>
&gt;      &gt; I have written a code to write to convert 365 days into 52 weeks avg.<br>
&gt;      &gt; I am facing error regarding missing value. I have written statements<br>
&gt;      &gt; which have substituted missing value as -9999.0<br>
&gt;      &gt; Yet it gives the maximum value as 9.96921e+36 and when I write to<br>
&gt;      &gt; substitute that with -9999.0, it gives maximum value as 9.969222e+36.<br>
&gt;      &gt; Here is the snippet of my code. I am very confused about this. It<br>
&gt;     will<br>
&gt;      &gt; be great if somebody could help me<br>
&gt;      &gt;<br>
&gt;      &gt; set_default_fillvalue(&quot;float&quot;, -9999.0)<br>
&gt;      &gt;<br>
&gt;      &gt; pweek=new((/47,52/),&quot;float&quot;)<br>
&gt;      &gt;<br>
&gt;      &gt;<br>
&gt;      &gt; do i=0,47-1<br>
&gt;      &gt; do j=0,357,7<br>
&gt;      &gt;<br>
&gt;      &gt; pweek(i,j/7)=avg(x364(i,j:j+6))<br>
&gt;      &gt;<br>
&gt;      &gt; ;  end if<br>
&gt;      &gt; end do<br>
&gt;      &gt; end do<br>
&gt;      &gt;<br>
&gt;      &gt;<br>
&gt;      &gt; do i=0,47-1<br>
&gt;      &gt; do j=0,51<br>
&gt;      &gt; print(i)<br>
&gt;      &gt; print(j)<br>
&gt;      &gt; if (pweek(i,j).eq.9.92226ee+36)then<br>
&gt;      &gt; pweek(i,j)=9999.0<br>
&gt;      &gt; end if<br>
&gt;      &gt; end do<br>
&gt;      &gt; end do<br>
&gt;      &gt;<br>
&gt;      &gt; printMinMax(pweek, 0)<br>
&gt;      &gt;<br>
&gt;      &gt; Thank You<br>
&gt;      &gt; Best Regards<br>
&gt;      &gt; Ipshita<br>
&gt;      &gt;<br>
&gt;      &gt;<br>
&gt;      &gt;<br>
&gt;      &gt; _______________________________________________<br>
&gt;      &gt; ncl-talk mailing list<br>
&gt;      &gt; List instructions, subscriber options, unsubscribe:<br>
&gt;      &gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
&gt;      &gt;<br>
&gt;<br>
&gt;     _______________________________________________<br>
&gt;     ncl-talk mailing list<br>
&gt;     List instructions, subscriber options, unsubscribe:<br>
&gt;     <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
&gt;<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>