-
Notifications
You must be signed in to change notification settings - Fork 267
Description
From [email protected] on July 22, 2011 12:08:31
If the 'fill_value' keyword is not used when creating a variable, the default NetCDF _FillValue is used, but the _FillValue attribute is not explicitely written to the NetCDF file (and it can't be written to afterwards). I would like to have the ability to make the _FillValue attribute appear with its default value.
Is there any way I can get the default NetCDF _FillValue for a given data type?
e.g.:
ncdtype = 'i2'
x = # some function that returns the default NetCDF _FillValue of ncdtype
nc.createVariable(...,dtype=ncdtype,fill_value=x)
I assume that would output the _FillValue attribute to the NetCDF file, even if it seems redundant... Perhaps there is some other way to achieve this?
Original issue: http://code.google.com/p/netcdf4-python/issues/detail?id=94