[ncl-talk] problem with missing values

Gus Correa gus at ldeo.columbia.edu
Fri Dec 12 15:05:04 MST 2014


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
>



More information about the ncl-talk mailing list