Re: how can I use actual-range???

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Mon Nov 12 2012 - 10:53:47 MST

Marzi,

The file variable is type short, and there is a scale_factor:

> short air ( time, level, lat, lon )
> add_offset : 477.66
> scale_factor : 0.01

This means you have packed data, so the numbers must be unpacked
before plotting. Grads does this automatically. In NCL you have to
add a function to unpack. Please read this page, and note example 1
at the bottom:

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

--Dave

On Mon, Nov 12, 2012 at 9:13 AM, marziyeh dadizadeh <marzi_d65@yahoo.com> wrote:
> Dear NCL Users,
>
> I want to make a plot of NCEP data.
> In all header parameter, there are 2 different attributions, "actual_range"
> and "valid_range".
> When I use Grads software to plot my data, it seems "actual_range" are in
> use, that it is true. But when the same data are in NCL and I make a plot, I
> see "valid_range" in graphics output, that it is not true!
>
> There is a sample plot in attach. I got it by NCL, Please see it.
> In both of them, Grads and NCL, I used simple script without any special
> order but results were different.
> How can I plot actual-rang in NCL just like Grads??
> Can anyone help me please??
>
> Thank you very much,
> Marzie
> ---------------------------------------------------------------------------
> This is header of my file:
> ---------------------------------------------------------------------------
> filename: temp-lev850-Apr-1to31
> path: temp-lev850-Apr-1to31.nc
> file global attributes:
> Conventions : COARDS
> title : 4x daily NMC reanalysis (2005)
> history : Wed Nov 7 13:13:51 2012: ncks -O -d level,850.000000 -d
> lat,-90.000000,90.000000 -d lon,0.000000,357.500000 -d time,90,120
> /Datasets/ncep.reanalysis.dailyavgs/pressure/air.2005.nc
> /Public/www/X94.183.222.27.311.13.13.50.nc
> created 2005/01/03 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:
> time = 31 // unlimited
> level = 1
> lat = 73
> lon = 144
> variables:
> short air ( time, level, lat, lon )
> long_name : mean Daily Air temperature
> unpacked_valid_range : ( 150, 350 )
> actual_range : ( 214.88, 305.37 )
> units : degK
> add_offset : 477.66
> scale_factor : 0.01
> missing_value : 32766
> precision : 2
> least_significant_digit : 1
> GRIB_id : 11
> GRIB_name : TMP
> var_desc : Air temperature
> dataset : NCEP Reanalysis Daily Averages
> level_desc : Multiple levels
> statistic : Mean
> parent_stat : Individual Obs
> valid_range : ( -32766, -12766 )
> _FillValue : 32766
>
> float lat ( lat )
> units : degrees_north
> actual_range : ( 90, -90 )
> long_name : Latitude
> standard_name : latitude
> axis : Y
>
> float level ( level )
> units : millibar
> actual_range : ( 850, 850 )
> long_name : Level
> positive : down
> GRIB_id : 100
> GRIB_name : hPa
> axis : Z
>
> 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 : ( 17568912, 17569632 )
> delta_t : 0000-00-01 00:00:00
> avg_period : 0000-00-01 00:00:00
> standard_name : time
> axis : T
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Nov 12 10:53:57 2012

This archive was generated by hypermail 2.1.8 : Tue Nov 13 2012 - 14:27:24 MST