[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading GrADS data file in IDL



msienkiewicz@my-deja.com wrote:

> 
> The basic GrADS file format is very simple.  The data are stored as
> a sequence of unformatted floating point arrays.  If your '.ctl' file does
> not have any special options specified (i.e. 'options sequential',
> 'options byteswapped', 'options bigendian' or the like) and you are
> planning to read it on a computer that has the same 'endianness'
> as the computer that generated it - well you can just use the ASSOC
> command and access those arrays directly from the disk.  To advise
> further, we'd need to have a look at your .ctl file.
> 

> 
> Meta
> 

Thanks, Meta

I believe the ctl file is pretty much usual one.
Could you show me one example of using ASSOC command(function) for my
case.
 
Thanks again,

Seo

(Note that the z dimensions for variables are different (16 or 10).)
Below is the ctl file:


DSET csf_rNCEP_flux.data
undef -9999.
TITLE  CSEOFs of NCEP reanalysis
* ------------------------------------------------------------------
XDEF 47 LINEAR 45.0  5.0
*
YDEF 47 LINEAR -57.5 2.5
*
ZDEF 16 LEVELS 925 850 700 600 500 400 300 250 200 150 100 70 50 30 20
10
*
TDEF 96 LINEAR Jan1958 1mo
*
vars 33
xubup  16  35,100,0 ** x1
xupup  16  35,100,0 ** x2
xvbup  16  35,100,0 ** x3
xvpub  16  35,100,0 ** x4
xvpup  16  35,100,0 ** x5
xwbup  10  35,100,0 ** x6
xwpub  10  35,100,0 ** x7
xwpup  10  35,100,0 ** x8
xtbup  16  35,100,0 ** x9
xtpub  16  35,100,0 ** x10
xtpup  16  35,100,0 ** x11
yubvp  16  35,100,0 ** y1
yupvb  16  35,100,0 ** y2
yupvp  16  35,100,0 ** y3
yvbvp  16  35,100,0 ** y4
yvpvp  16  35,100,0 ** y5
ywbvp  10  35,100,0 ** y6
ywpvb  10  35,100,0 ** y7
ywpvp  10  35,100,0 ** y8
ytbvp  16  35,100,0 ** y9
ytpvb  16  35,100,0 ** y10
ytpvp  16  35,100,0 ** y11
zubwp  10  35,100,0 ** z1
zupwb  10  35,100,0 ** z2
zupwp  10  35,100,0 ** z3
zvbwp  10  35,100,0 ** z4
zvpwb  10  35,100,0 ** z5
zvpwp  10  35,100,0 ** z6
zwbwp  10  35,100,0 ** z7
zwpwp  10  35,100,0 ** z8
ztbwp  10  35,100,0 ** z9
ztpwb  10  35,100,0 ** z10
ztpwp  10  35,100,0 ** z11
ENDVARS


  
-- 
Kyong Hwan Seo
Florida State University            Home  :(850) 216-1985
Dept. of Meteorology                Office:(850) 644-2274
Email: khseo@pacific.met.tamu.edu   Fax   :(850) 644-9642