[gradsusr] Problem with fwrite and CTL file

Mubashar Dogar mubashardogar at gmail.com
Tue Aug 31 11:18:48 EDT 2010


Dear GrADS Users,

I have downloaded ECMWF (ERA40) data for surface temperature at 2.5 by 2.5
resolution for years 1958-2001. My intention was to see the trend for the
month of January only. So I extracted all the Januaries between 1958-2001 in
a binary/dat file by using the following commands in GrADS. When I tried to
open this file by making a CTL (choosing the same x & y dimentions) and
display January of any one year, the spatial picture is not the same as if I
display the same January in original data file. Could you please help me?

*Here is the script to create a binary/dat file*
'reinit'
'open EraT2M.ctl'
'set gxout fwrite'
'set fwrite January.dat'
t=5
*tmax=6
tmax=532
while(t<=tmax)
'set t 't
'd no2tsfc-273.15'
t=t+12
endwhile
'disable fwrite'
'reinit'

*Here is the control file to open the above January.dat file*
DSET    january.dat
TITLE     Sample Data Set
UNDEF    -9.999E33
*OPTIONS    big_endian
OPTIONS   little_endian
*OPTIONS   template
xdef 144 linear 0 2.5
ydef 73 linear -90 2.5
ZDEF      1 LINEAR 1 1
TDEF     44 LINEAR 1JAN1958 1mon
VARS      1
no2tsfc 0  99  Surface Temperature_2m
ENDVARS


Regards,

Mubashar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100831/4aaaa9d3/attachment-0003.html 


More information about the gradsusr mailing list