Creating NetCDF files in IGOR
JonnyCro
I needed to distribute some data in NetCDF format and its not currently possible in IGOR Pro. So what i've done is write a few functions and made a GUI in IGOR which allows you to do this. It works in conjunction with the ncgen.exe utility freely available on the web. Would there be anyone interested in using this? If so i can create a project space for it and upload it. If not then i wont bother. I think it will only work on a window machine as the code creates windows batch files which are later executed from IGOR.
Jonny
That would be great. I spent the better part of the morning trying to figure out how to write netCDF files from Labview and came to the conclusion that it would be easier to do it from some other program.
Thanks, Dean
June 24, 2010 at 01:52 pm - Permalink
I know that new NetCDF files are in fact HDF5 file files.
Are most NetCDF-oriented programs able to deal with HDF5-based NetCDF files?
Do recent NetCDF libraries support reading HDF5-based NetCDF files?
If the answers to the questions above are yes then it seems like it might be possible to write a NetCDF file using the HDF5 XOP.
June 25, 2010 at 08:19 am - Permalink
October 12, 2010 at 06:55 am - Permalink
I presume most NetCDF files that people have are not compatible with HDF5.
I would think the the HDF5 XOP should be able to load a NetCDF file that is based on HDF5.
It would help if you could point me to documentation that explained the history of NetCDF, what the current NetCDF libraries support, and any other background material that would help me understand how NetCDF fits into the bigger picture.
October 12, 2010 at 12:06 pm - Permalink
http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#fv1
ANdy
October 12, 2010 at 03:51 pm - Permalink
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/
I imagine the jobs of many of the individual functions are the same as those called by the hdf5 xop, and that in theory a netCDF xop could use a similar template as the hdf5 xop.
October 14, 2010 at 09:31 am - Permalink
- There is an issue with building the NetCDF libraries in Visual C++.
- They provide pre-built Windows DLLs but apparently 32-bit DLLs only.
- Windows is clearly a pain in the neck to them.
- Most NetCDF files use the "classic" format and are not HDF5-based.
- NetCDF-4 (HDF5-based files) should be readable using the Igor HDF5 browser. This is not much use since most NetCDF files use the "classic" format.
- It seems like it should be possible to create a NetCDF-4 (HDF5-based) file using the HDF5 XOP, at least in theory.
When WaveMetrics creates a file loader, we have to try to be as general as possible. With a totally general file format like HDF5, and with its myriad of features, this is quite difficult.
It took me about 9 months to create the HDF5 XOP and the HDF5 browser, including documentation, and testing. It took me at least a month of reading just get my head around HDF5.
NetCDF is also a very general format. Though it does seem worth supporting, it would be a large undertaking and I can't devote the time to it.
To read and write a specific type of NetCDF or a very limited subset of possible NetCDF file is much simpler.
I can provide technical support if you want to develop an NetCDF XOP.
Another approach is to call the NetCDF utilities such as ncdump and ncgen using Igor's ExecuteScriptText operation.
October 14, 2010 at 09:13 pm - Permalink
http://www.igorexchange.com/project/NCGEN
You need to have netcdf binaries and ncgen.exe installed (see the project description for links to the netcdf files). You can create a variety of netcdf file types. The code works on Windows and Mac.
November 2, 2016 at 02:25 pm - Permalink