Thank you again<div>Best Regards</div><div>Ipshita<span></span><br><br>On Friday, December 12, 2014, Gus Correa <<a href="mailto:gus@ldeo.columbia.edu">gus@ldeo.columbia.edu</a>> 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't<br>
have 9.6921e+36 amongst its values?<br>
[Say, outliers, invalid data that was not QC'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>
> Thank you<br>
><br>
> Yes it is a typo in the code I fixed it yet it still gives max value as<br>
> 9.6921e+36 , and if I write to substitute it then it gives 9.92226e+36<br>
> as the max value.<br>
><br>
> Best Regards<br>
> Ipshita<br>
><br>
><br>
> On Friday, December 12, 2014, Gus Correa <<a href="javascript:;" onclick="_e(event, 'cvml', 'gus@ldeo.columbia.edu')">gus@ldeo.columbia.edu</a><br>
> <mailto:<a href="javascript:;" onclick="_e(event, 'cvml', 'gus@ldeo.columbia.edu')">gus@ldeo.columbia.edu</a>>> wrote:<br>
><br>
> Hi Ipshita<br>
><br>
> Is this a typo in your email or in the code?<br>
><br>
> > if (pweek(i,j).eq.9.92226ee+36)then<br>
><br>
> Note the double "ee".<br>
><br>
> Gus Correa<br>
><br>
> On 12/12/2014 04:29 PM, Ipshita Majhi wrote:<br>
> > Dear NCL ,<br>
> ><br>
> > I have written a code to write to convert 365 days into 52 weeks avg.<br>
> > I am facing error regarding missing value. I have written statements<br>
> > which have substituted missing value as -9999.0<br>
> > Yet it gives the maximum value as 9.96921e+36 and when I write to<br>
> > substitute that with -9999.0, it gives maximum value as 9.969222e+36.<br>
> > Here is the snippet of my code. I am very confused about this. It<br>
> will<br>
> > be great if somebody could help me<br>
> ><br>
> > set_default_fillvalue("float", -9999.0)<br>
> ><br>
> > pweek=new((/47,52/),"float")<br>
> ><br>
> ><br>
> > do i=0,47-1<br>
> > do j=0,357,7<br>
> ><br>
> > pweek(i,j/7)=avg(x364(i,j:j+6))<br>
> ><br>
> > ; end if<br>
> > end do<br>
> > end do<br>
> ><br>
> ><br>
> > do i=0,47-1<br>
> > do j=0,51<br>
> > print(i)<br>
> > print(j)<br>
> > if (pweek(i,j).eq.9.92226ee+36)then<br>
> > pweek(i,j)=9999.0<br>
> > end if<br>
> > end do<br>
> > end do<br>
> ><br>
> > printMinMax(pweek, 0)<br>
> ><br>
> > Thank You<br>
> > Best Regards<br>
> > Ipshita<br>
> ><br>
> ><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>
> ><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>
><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>