[ncl-talk] problem with missing values
Ipshita Majhi
ipmajhi at alaska.edu
Fri Dec 12 15:42:33 MST 2014
Thank you again
Best Regards
Ipshita
On Friday, December 12, 2014, Gus Correa <gus at ldeo.columbia.edu> wrote:
> Your intent is to replace 9.92226e+36 by -9999.0.
> This will leave any other values untouched.
> [I think it will not enforce +9999.0 as an upper bound either,
> if this is your assumption.]
>
> However, can you guarantee that your data doesn't
> have 9.6921e+36 amongst its values?
> [Say, outliers, invalid data that was not QC'd, etc, or perhaps your
> data range really goes all the way up to 9.6921e+36.]
>
> Checking the actual input data values, before you do
> any calculations, may help.
> Choosing a missing_value/_FillValue outside the data range
> is also helpful.
>
>
> Gus Correa
>
>
>
>
> On 12/12/2014 05:10 PM, Ipshita Majhi wrote:
> > Thank you
> >
> > Yes it is a typo in the code I fixed it yet it still gives max value as
> > 9.6921e+36 , and if I write to substitute it then it gives 9.92226e+36
> > as the max value.
> >
> > Best Regards
> > Ipshita
> >
> >
> > On Friday, December 12, 2014, Gus Correa <gus at ldeo.columbia.edu
> <javascript:;>
> > <mailto:gus at ldeo.columbia.edu <javascript:;>>> wrote:
> >
> > Hi Ipshita
> >
> > Is this a typo in your email or in the code?
> >
> > > if (pweek(i,j).eq.9.92226ee+36)then
> >
> > Note the double "ee".
> >
> > Gus Correa
> >
> > On 12/12/2014 04:29 PM, Ipshita Majhi wrote:
> > > Dear NCL ,
> > >
> > > I have written a code to write to convert 365 days into 52 weeks
> avg.
> > > I am facing error regarding missing value. I have written
> statements
> > > which have substituted missing value as -9999.0
> > > Yet it gives the maximum value as 9.96921e+36 and when I write to
> > > substitute that with -9999.0, it gives maximum value as
> 9.969222e+36.
> > > Here is the snippet of my code. I am very confused about this. It
> > will
> > > be great if somebody could help me
> > >
> > > set_default_fillvalue("float", -9999.0)
> > >
> > > pweek=new((/47,52/),"float")
> > >
> > >
> > > do i=0,47-1
> > > do j=0,357,7
> > >
> > > pweek(i,j/7)=avg(x364(i,j:j+6))
> > >
> > > ; end if
> > > end do
> > > end do
> > >
> > >
> > > do i=0,47-1
> > > do j=0,51
> > > print(i)
> > > print(j)
> > > if (pweek(i,j).eq.9.92226ee+36)then
> > > pweek(i,j)=9999.0
> > > end if
> > > end do
> > > end do
> > >
> > > printMinMax(pweek, 0)
> > >
> > > Thank You
> > > Best Regards
> > > Ipshita
> > >
> > >
> > >
> > > _______________________________________________
> > > ncl-talk mailing list
> > > List instructions, subscriber options, unsubscribe:
> > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> > >
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141212/cc91e223/attachment.html
More information about the ncl-talk
mailing list