Problem when working with GrADS ddf

Eric Altshuler ela at COLA.IGES.ORG
Fri Nov 14 00:07:12 EST 2008


Hello Simon,

I ran 'ncdump' on the PRE1986_1987_A.nc file and found that the undefined value is -32767, not -9999 as you have specified in your ddf file. Also, the data is packed, that is, there is a scale factor and offset which are 0.003204395 and 95.0 respectively. If you use the following modified ddf:

DSET  PRE1986_1987_A.nc
dtype netcdf
undef -32767
unpack scale_factor add_offset
pdef   56   46 lcc   32.00   33.00   28.00   23.00   30.00   60.00   33.00  50000.  50000.
xdef  161 linear   15.24  0.2252
ydef  103 linear   20.56  0.2252
zdef 1 levels 1008.58
tdef 24 linear  00Z15JAN1986 1mo
vars  1
PRE=>pre      0 t,y,x Precipitation
endvars

the variable 'pre' can be displayed correctly by doing:

d pre+95

For some reason, grads cannot retreive the add_offset value, so you need to add 95 to get the correct values.

Best regards,

Eric L. Altshuler
Assistant Research Scientist
Center for Ocean-Land-Atmosphere Studies
4041 Powder Mill Road, Suite 302
Calverton, MD 20705-3106
USA

E-mail: ela at cola.iges.org
Phone: (301) 902-1257
Fax: (301) 595-9793

----- Original Message -----
From: "Simon Krichak" <shimon at CYCLONE.TAU.AC.IL>
To: GRADSUSR at LIST.CINECA.IT
Sent: Thursday, November 13, 2008 5:42:52 AM GMT -05:00 US/Canada Eastern
Subject: Problem when working with GrADS ddf





Hi,
We are attempting to work with DDF file using on the Obs/CRU data. Something
 gets wrong however.
Please see attached a PRE1986_1987_A.nc file. Everything looks fine
when I am using this file with sdfopen. The situation is different when the
same file
 is processed  using the ddf file attached.


Where is my mistake?


  Simon Krichak
>
>>
>>
>>
>>
>



More information about the gradsusr mailing list