How do you open/set up an existing netCDF file so that you can append data to it?
When you open/set up the netCDF file
(for instance, using the constructor for the NetCDFFile
class
in module Scientific.IO.NetCDF
), you specify
'a'
instead of 'w'
,
which tells Python you will append to the existing file.
Then, instead of specifying the length of the
unlimited axis (usually the time axis), set the length
to None
.
Remember you can only have one unlimited axis at a time.
Note: Thanks to Helene Brogniez for the tip!