fwrite, multiple variables, multiple levels, multiple times

Charles Seman Charles.Seman at NOAA.GOV
Mon May 2 09:39:29 EDT 2005


Dorita,

According to this GrADS web site:

http://grads.iges.org/grads/gadoc/aboutgriddeddata.html#structure

the innermost loop should be vertical levels, then variables, and time
should be the outermost loop.

I hope this helps,
Chuck

Dorita Rostkier-Edelstein wrote:

>Dear users,
>
>I am trying to create a *.dat file using fwrite. I succeeded to write a
>single variable at two vertical levels and one time frame, and to display
>it properly with the help of a proper *.ctl file.
>I want to create a multiple-variable multiple-level multiple-time *.dat
>file. I know how to write the proper *.ctl file.
>I do not know how to write the variables into the *.dat file properly.
>What should be the fwrite order? For each time frame I should write each
>variable at all vertical levels? Or should I write each variable at each
>vertical level and then the next vertical level? In other words, I have 3
>while loops here, how should they be ordered?
>
>Thanks a lot for your help.
>
>Dorita
>
>

--

********************************************************************
 Charles Seman                                Charles.Seman at noaa.gov
 U.S. Department of Commerce / NOAA / OAR
 Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
 201 Forrestal Road                              fax: (609) 987-5063
 Princeton, NJ  08542                 http://www.gfdl.noaa.gov/~cjs/
********************************************************************

"The contents of this message are mine personally and do not reflect
any position of the Government or NOAA."



More information about the gradsusr mailing list