pyfvcom2.fvcom_writer module
- class pyfvcom2.fvcom_writer.FVCOMWriter(filename, dimensions, global_attributes=None, **kwargs)[source]
Bases:
objectCreate an FVCOM netCDF input file.
- add_variable(name, data, dimensions, attributes=None, format='f4', ncopts={})[source]
Create a `name’ variable with the given `attributes’ and `data’.
- Parameters:
name (str) – Variable name to add.
data (np.ndararay, list, float, str) – Data to add to the netCDF file object.
dimensions (list, tuple) – List of dimension names to apply to the new variable.
attributes (dict, optional) – Attributes to add to the netCDF variable object.
format (str, optional) – Data format for the new variable. Defaults to ‘f4’ (float32).
ncopts (dict) – Dictionary of options to use when creating the netCDF variables.