We have been using actual NetCDF files as the template files when creating AWIPS NetCDF files. This uses a ton of space (~250MB for 4 grids). I would like to use NCML files instead and right a python function that reads the NCML file (via XML readers) and creates a new NetCDF file, filling it with the attributes and variables in the NCML. The other option is CDL, but there's no easy way (AFAIK) to parse these files without using "ncgen" directly. I would like to stay away from command line utilities being called from a python script.
We have been using actual NetCDF files as the template files when creating AWIPS NetCDF files. This uses a ton of space (~250MB for 4 grids). I would like to use NCML files instead and right a python function that reads the NCML file (via XML readers) and creates a new NetCDF file, filling it with the attributes and variables in the NCML. The other option is CDL, but there's no easy way (AFAIK) to parse these files without using "ncgen" directly. I would like to stay away from command line utilities being called from a python script.