Re: Fwd: Re: clmMonTLL produces nan

From: Christopher Danek <m0zi_at_nyahnyahspammersnyahnyah>
Date: Thu Aug 02 2012 - 10:48:00 MDT

Great, it works!
Your loop was the right idea.
The original data has NaNs:
(0) psli: min=99395.4 max=104123
(0) knt_NaN=242725

Thank you so much!
Chris

2012/8/2 Dennis Shea <shea@ucar.edu>

> Neglected to cc ncl-talk
>
>
> -------- Original Message --------
> Subject: Re: clmMonTLL produces nan
> Date: Thu, 02 Aug 2012 09:50:37 -0600
> From: Dennis Shea <shea@ucar.edu>
> To: Christopher Danek <m0zi@gmx.de>
>
> Not sure what has happened. For sure, this is an issue
>
> > missing_value : 1e+20
> > _FillValue : -999
>
> They should be the same.
> psli@_FillValue = psli@missing_value
>
> missing_value is not recognized by NCL ... only _FIllValue
>
> ===============================
>
> psli = f->PSLI
>
> (1) print("psli: min="+min(psli)+" max="+max(psli))
>
> (2) Does the original input have NaNs?
>
> knt_NaN = num(isnan_ieee(psli)) ; count the # of Nan
> print("knt_NaN="+knt_NaN)
>
> if (knt_NaN.gt.0) then
> replace_ieeenan (psli, psli@missing_value, 0)
> psli@_FillValue = psli@missing_value
> end if
>
>
> On 08/02/2012 09:25 AM, Christopher Danek wrote:
> > Hi all
> >
> > I have an input dataset of sea level pressure data with named coords
> > (time, lat, lon) as desired for the function clmMonTLL:
> >
> > Variable: psli
> > Type: float
> > Total Size: 28911504 bytes
> > 7227876 values
> > Number of Dimensions: 3
> > Dimensions and sizes: [time | 2676] x [lat | 37] x [lon | 73]
> > Coordinates:
> > time: [15.5..81433.5]
> > lat: [-90..90]
> > lon: [-180..180]
> > Number Of Attributes: 9
> > lonFlip : longitude coordinate variable has been reordered via
> lonFlip
> > history : At 00:50:53 on 04/22/2005: CMOR altered the data in
> > the following ways: replaced missing value flag (1.00000E+28) with
> > standard missing value (1.00000E+20);
> > original_name : mslp
> > missing_value : 1e+20
> > _FillValue : -999
> > cell_methods : time: mean
> > units : Pa
> > long_name : Sea Level Pressure
> > standard_name : air_pressure_at_sea_level
> >
> > I can plot the data and everything is fine.
> > Now all I do is this:
> >
> > pslclm = clmMonTLL(psli)
> >
> > Produces the output:
> >
> > Variable: pslclm
> > Type: float
> > Total Size: 129648 bytes
> > 32412 values
> > Number of Dimensions: 3
> > Dimensions and sizes: [month | 12] x [lat | 37] x [lon | 73]
> > Coordinates:
> > month: [0..11]
> > lat: [-90..90]
> > lon: [-180..180]
> > Number Of Attributes: 11
> > lonFlip : longitude coordinate variable has been reordered via
> lonFlip
> > history : At 00:50:53 on 04/22/2005: CMOR altered the data in
> > the following ways: replaced missing value flag (1.00000E+28) with
> > standard missing value (1.00000E+20);
> > original_name : mslp
> > missing_value : 1e+20
> > _FillValue : -999
> > cell_methods : time: mean
> > units : Pa
> > long_name : Sea Level Pressure
> > standard_name : air_pressure_at_sea_level
> > time_op_ncl : Climatology: 223 years
> > info : function clmMonLLT: contributed.ncl
> >
> > So far so good. But if I look at pslclm, every value became a "nan" or
> > "-nan" like this:
> > ...
> > (11,31,69) -nan
> > (11,31,70) nan
> > (11,31,71) nan
> > (11,31,72) -nan
> > (11,32,0) -nan
> > (11,32,1) nan
> > (11,32,2) nan
> > ...
> >
> > The former FillValues are still FillValues.
> >
> > I didn't find a solution for this problem although I'm sure it's
> > something stupid.
> > Thanks for help!
> > Best regards
> > Chris
> >
> >
> > _______________________________________________
> > 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
Received on Thu Aug 2 10:48:18 2012

This archive was generated by hypermail 2.1.8 : Fri Aug 03 2012 - 14:39:58 MDT