Re: GMT generated netCDF grid files and IDL [message #1112] |
Thu, 05 August 1993 11:29  |
xm9
Messages: 2 Registered: March 1993
|
Junior Member |
|
|
In article <23r8mq$a1r@skates.gsfc.nasa.gov> philip@denali.gsfc.nasa.gov (Philip Richardson) writes:
>
> Does anybody have a program to read in GMT generated netCDF
> files into IDL? I am having a heck of a time with this. Suggestions are welcome.
I, too, had the devil's own time using netCDF files with pv-wave.
My conclusion is that it is not worth the effort to make a
generalized netCDF reader because this format is extensible, and can
vary from file to file. What I resorted to was using GMT routines
which can fetch the parts I want, and then wrote the result to a
fixed-format binary file that was readable by pv-wave scripts I had
written. I used a header structure to copy the corresponding
netCDF/GMT header info, but came up against a real weird thing on
our HP 7xx's: the code I wrote insisted on sticking extra bytes into
the header if doubles followed long integers. Since I wanted to
stick with the header that GMT generated, I simply stuck the extra
bytes to match this. Be warned if you use an HP, too. BTW, I
programmed in C.
|
|
|