Closed mhidas closed 6 years ago
The example is just an example.
The code accepts an empty dimension or no dimension dictionary at all (AFAICR). It will just fail at creation time though, but you can change it on the fly by going into the methods of the class before calling the create netcdf file or adding from another instance.
EDIT: I was wrong in the statement above. The code accepts only empty dims dictionaries if variables dicts are also empty. The dimensions keys (name of dimension) on the dict have to be defined in that case (they can be anything). This is a residual of feeding this class with cdlreader derived dicts.
I'm just going to merge this in for now. We can add other tweaks and fixes after we've added some tests.
As a starting point, we're going to import @ocehugo's
nc_dict.py
, which already does most of what we need for netCDF templating.