Re: reading NCEP reanalysis 4x times daily data

From: Jan Dutton (jfd AT XXXXXX)
Date: Wed Feb 06 2002 - 15:57:10 MST


Hi Matt,

If you do a 'ncdump -h filename' you you will notice that
you have to read two other variables ( there is also some
documentation somewhere at CDC on this): i.e.

scale_factor = f->air@scale_factor
add_offset = f->air@add_offset

Once you have these you read in data with

 t2m = scale_factor * (data->air) + add_offset

And all should be good again.

Jan

Matt Fearon wrote:

> Dear NCL users:
>
> I am trying to read NCEP reanalysis 4x times daily data using
> NCL. I am working on sgi machine running irix 6.5. Here is
> my script for reading surface temperature;
>
> begin
>
> fdir="/data/matt/reanalysis/"
> fnam="air.2m.gauss.1987.nc"
> f = addfile(fdir+fnam,"r")
>
> air=f->air
> print(air(0,1:10,2))
>
> end
>
> here is the output from the print;
>
> Variable: air (subsection)
> Type: short
> Total Size: 20 bytes
> 10 values
> Number of Dimensions: 1
> Dimensions and sizes: [lat | 10]
> Coordinates:
> lat: [86.6531..69.5217]
> Number Of Attributes: 18
> lon : 3.75
> time : 17408952
> parent_stat : Individual Obs
> I
> statistic : Mean
> M
> level_desc : 2 m
> O
> dataset : NMC Reanalysis
> L
> var_desc : Air temperature
> A
> GRIB_name : TMP
> GRIB_id : 11
> least_significant_digit : 1
> precision : 2
> missing_value : 32766
> scale_factor : 0.01
> add_offset : 477.65
> units : degK
> actual_range : <ARRAY>
> valid_range : <ARRAY>
> long_name : 4xDaily Air temperature at 2 m
> (0) -23925
> (1) -22905
> (2) -22345
> (3) -21395
> (4) -21125
> (5) -20865
> (6) -20735
> (7) -20765
> (8) -20735
> (9) -20535
>
> The data is incorrect, but I am not sure why. Do I need to declare the
> array using new a certain way. Any suggestions would be greatly
> appreciated.
>
> thank you,
> Matt

--
Jan F. Dutton, PhD MBA        434-295-9989
President                     801-457-0153 (efax)
Weather Ventures, Ltd         jfd@weatherventures.com

P.O. Box 1851 Charlottesville, VA 22903 http://www.weatherventures.com



This archive was generated by hypermail 2b29 : Wed Feb 06 2002 - 15:57:22 MST