[ncl-install] ncl output error

Mary Haley haley at ucar.edu
Tue Oct 28 08:14:55 MDT 2014


Please post questions on NCL to ncl-talk at ucar.edu and not
ncl-install at ucar.edu. This email list is for people with questions about
how to install NCL.

http://mailman.ucar.edu/mailman/listinfo/ncl-talk

The issue is that your data is of type "short", and has been "packed" in
the file to make the file smaller.  This means that the "scale_factor" and
"add_offset" attributes of "uwnd" need to be applied to the variable when
you read it off the file.

The "short2flt" function can do this for you:

http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml

fname = "/media/ablaye/terabouya/Data/2010/uwnd.2010.nc"
f     = addfile(fname,"r")
uwnd  = short2flt( f->uwnd )


--Mary


On Tue, Oct 28, 2014 at 3:00 AM, Abdoulaye SY <sy.abdoulaye3 at ugb.edu.sn>
wrote:

> Hi,
>
> When i load this data with addfile function i have values like -20591. I
> would know why i dont see the normal values?
> The description of the data is :
>
> filename:    uwnd.2010
> path:    /media/ablaye/terabouya/Data/2010/uwnd.2010.nc
>    file global attributes:
>       Conventions : COARDS
>       title : mean daily NMC reanalysis (2010)
>       history : created 2009/12 by Hoop (netCDF2.3)
>       description : Data is from NMC initialized reanalysis
> (4x/day).  It consists of most variables interpolated to
> pressure surfaces from model (sigma) surfaces.
>       platform : Model
>       references :
> http://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html
>    dimensions:
>       lon = 144
>       lat = 73
>       level = 17
>       time = 365  // unlimited
>    variables:
>       float level ( level )
>          units :    millibar
>          actual_range :    ( 1000, 10 )
>          long_name :    Level
>          positive :    down
>          GRIB_id :    100
>          GRIB_name :    hPa
>          axis :    Z
>
>       float lat ( lat )
>          units :    degrees_north
>          actual_range :    ( 90, -90 )
>          long_name :    Latitude
>          standard_name :    latitude
>          axis :    Y
>
>       float lon ( lon )
>          units :    degrees_east
>          long_name :    Longitude
>          actual_range :    (  0, 357.5 )
>          standard_name :    longitude
>          axis :    X
>
>       double time ( time )
>          units :    hours since 1-1-1 00:00:0.0
>          long_name :    Time
>          actual_range :    ( 17610576, 17619312 )
>          delta_t :    0000-00-01 00:00:00
>          avg_period :    0000-00-01 00:00:00
>          standard_name :    time
>          axis :    T
>
>       short uwnd ( time, level, lat, lon )
>          long_name :    mean Daily U-wind
>          unpacked_valid_range :    ( -125, 160 )
>          actual_range :    ( -107.08, 115 )
>          units :    m/s
>          add_offset :    202.66
>          scale_factor :    0.01
>          missing_value :    32766
>          precision :    2
>          least_significant_digit :    1
>          GRIB_id :    33
>          GRIB_name :    UGRD
>          var_desc :    u-wind
>          dataset :    NCEP Reanalysis Daily Averages
>          level_desc :    Multiple levels
>          statistic :    Mean
>          parent_stat :    Individual Obs
>          valid_range :    ( -32766, -4266 )
>          _FillValue :    32766
>
>
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20141028/e539d55e/attachment.html 


More information about the ncl-install mailing list