[gradsusr] Writing GrADS netCDF files with IDL

Bantges, Richard J r.bantges at imperial.ac.uk
Thu Sep 15 13:07:36 EDT 2011


Hi - thanks to everyone that took the time to reply to my query, apologies that I didn't respond to each of you individually.

I've managed to write a GrADS compatible netCDF file (using IDL) that can be opened using sdfopen in GrADS. 

However, I'm now trying to figure out if it's possible to do the following with the realms of sdfopen (i.e. I don't want to write a control file if  it can be avoided):
1. Define what the missing values in my data array are. I know how this could be done using a control file, but is it possible to include this within the netCDF?
2. I have a 2D data array, that ideally I'd like to make 3D (x,y,z)   (where x longitude, y latitude, and z would be levels). Again I know how to do this using a control file, but would like to know if it's possible to do this within the netCDF file, such that sdfopen in GrADS will read it.

 If I have to write a control file, then so be it, but I don't use GrADS at all (I'm learning) but I need to supply some data in this format.

Many thanks,
Rich 


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