cdf2idl, but I need code to WRITE the file [message #86894] |
Tue, 10 December 2013 12:05  |
MarioIncandenza
Messages: 231 Registered: February 2005
|
Senior Member |
|
|
Hello IDL Wizards,
I have been training up on NetCDF, and I am very excited as it seems that there are now tools that will make a small investment in developing a data structure and modifying the workflow around it pay off 1000-fold in analysis, archiving, and general handling of the data. Also, I like the fact that there are A LOT of tools to make the boring part quick.
The workflow I am building is based around maintaining a master NetCDF template as a CDL descriptor file. This can then be turned into a blank NetCDF file using the 'ncgen' tools. I have located tools that will turn the blank NetCDF file into reading and writing routines in FORTRAN and C++: ftp://ftp.orbit.nesdis.noaa.gov/pub/star/tmavor/IGOR/GOES-R% 20Reports/FlowChartPackage/tools/code_generator
There is also a nice tool called cdf2idl (Appears to be orphaned by its creators, the "Center for Clouds Chemistry and Climate (C4) Integrated Data Systems (CIDS) group", but I found it here: http://cheas.psu.edu/data/people/ricciuto/iss2/cdf2idl.pro
This routine takes your NetCDF file and spits out IDL code to read it. Has anyone ever seen (or written) code that take a NetCDF file and spits out IDL code to write to it?
For what it's worth, I don't actually intend to *create* the file in IDL. I intend to make a copy of the template and use IDL to write the attributes and data into the blank file.
Regards,
--Edward H.
|
|
|
Re: cdf2idl, but I need code to WRITE the file [message #86895 is a reply to message #86894] |
Tue, 10 December 2013 12:19  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Edward Hyer writes:
>
> Hello IDL Wizards,
>
> I have been training up on NetCDF, and I am very excited as it seems that there are now tools that will make a small investment in developing a data structure and modifying the workflow around it pay off 1000-fold in analysis, archiving, and general handling of the data. Also, I like the fact that there are A LOT of tools to make the boring part quick.
>
> The workflow I am building is based around maintaining a master NetCDF template as a CDL descriptor file. This can then be turned into a blank NetCDF file using the 'ncgen' tools. I have located tools that will turn the blank NetCDF file into reading and writing routines in FORTRAN and C++: ftp://ftp.orbit.nesdis.noaa.gov/pub/star/tmavor/IGOR/GOES-R% 20Reports/FlowChartPackage/tools/code_generator
>
> There is also a nice tool called cdf2idl (Appears to be orphaned by its creators, the "Center for Clouds Chemistry and Climate (C4) Integrated Data Systems (CIDS) group", but I found it here: http://cheas.psu.edu/data/people/ricciuto/iss2/cdf2idl.pro
>
> This routine takes your NetCDF file and spits out IDL code to read it. Has anyone ever seen (or written) code that take a NetCDF file and spits out IDL code to write to it?
>
> For what it's worth, I don't actually intend to *create* the file in IDL. I intend to make a copy of the template and use IDL to write the attributes and data into the blank file.
You can use the COPY methods of the NCDF_File object on the Coyote
Library to copy attributes and data from one netCDF file to another.
See the NCDF_File_Examples program in the Library for an example of how
this is done.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|