IDL to write GrADS netCDF (SDF) [message #77654] |
Wed, 14 September 2011 02:28  |
Rich Bantges
Messages: 3 Registered: September 2011
|
Junior Member |
|
|
Hi,
I'm trying to write a netCDF file that is compatible with the GrADS
software, so that the netCDF file can be read using the sdfopen
command in GrADS.
I can write a binary file in IDL (using WRITEU) and generate a GrADS
control file (in ASCII), and I can write a netCDF file in IDL. The
problem is, I cannot seem to write a fully compatible netCDF file
using IDL that can then be read in using the GrADS sdfopen command.
Does anyone have a simple IDL procedure that I can work from as an
example please?
I've seen various examples here http://www.unidata.ucar.edu/software/netcdf/examples/program s/
but they don't quite do it.
I know that I can convert binary files to netCDF using tools likes
xconv, but ideally I'd like to just write an SDF (self describing
format) netCDF file directly from IDL (especially as the data I have
are currently saved in IDL .sav files).
Any help would be greatly appreciated!
Rich
|
|
|
|
|
Re: IDL to write GrADS netCDF (SDF) [message #77707 is a reply to message #77654] |
Fri, 16 September 2011 07:36  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Kenneth P. Bowman writes:
> Be careful. I don't follow the COARDS standard myself (never
> found a need to), but they are probably referring to the
> C-language convention, where the last index varies fastest.
>
> This is what you see when you use ncdump. You need to remember
> to reverse the apparent order for IDL and Fortran.
You see! I LOVE standards! :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|