[gradsusr] Writing GrADS netCDF files with IDL
Dave Allured
dave.allured at noaa.gov
Tue Sep 13 13:29:53 EDT 2011
Richard,
A control file is used with the Grads xdfopen command, but *not* the
sdfopen command. sdfopen is used to *directly* open a netcdf file.
http://www.iges.org/grads/gadoc/SDFdescriptorfile.html
Use xdfopen and a control file to make up for certain missing
metadata, such as coordinate arrays or coordinate units. But
hopefully you will be writing a sufficient netcdf file so that you
do not need xdfopen.
Sorry, I do not have sample IDL code for this. But the IDL
documentation shows that all of the necessary functions should be
available to write good netcdf. There is sample code to write
netcdf in the IDL 8.1 help system, under "NetCDF files".
If you are already creating a netcdf file from IDL, then post the
results of ncdump -h, and we can try to tell you what's missing for
sdfopen to work perfectly.
--Dave
On 9/13/2011 9:49 AM, Bantges, Richard J wrote:
> Hi there,
>
> I’m trying to write a GrADS compatible netCDF file using ITT’s IDL
> software, that can then be read in using GrADS’s sdfopen command.
> Does anyone have an example IDL procedure that does this please?
>
> I’ve managed to write out data in a gridded binary data file that is
> described here
> http://grads.iges.org/grads/gadoc/aboutgriddeddata.html but ideally
> I’d like to write these in netCDF format. The main problem is
> writing the netCDF so that the associated control file accurately
> describes the netCDF file content.
>
> So, if anyone has a very simple IDL procedure that writes out a
> netCDF file that can be directly read by GrADS using the sdfopen
> command that would be fantastic.
More information about the gradsusr
mailing list