openmmtools.storage.iodrivers.NCVariableCodec¶
- class openmmtools.storage.iodrivers.NCVariableCodec(parent_driver, target, storage_object=None)[source]¶
Pointer class which provides instructions on how to handle a given nc_variable
Bind to a given nc_storage_object on ncfile with given final_target_name, If no nc_storage_object is None, it defaults to the top level ncfile
- Parameters:
- parent_driverParent NetCDF driver
Class which can manipulate the NetCDF file at the top level for dimension creation and meta handling
- targetstring
String of the name of the object. Not explicitly a variable nor a group since the object could be either
- storage_objectNetCDF file or NetCDF group, optional, Default to ncfile on parent_driver
Object the variable/object will be written onto
- Attributes:
dtype
Define the Python data type for this variable
storage_type
Tell the Codec what NetCDF storage type this Codec treats the data as.
Methods
add_metadata
(name, value)Add metadata to self on disk, extra bits of information that can be used for flags or other variables This is NOT a staticmethod of the top data set since you can buffer this before binding
append
(data)Tell this writer how to write to the NetCDF file given the final object that it is bound to
dtype_string
()Short name of variable for strings and errors
read
()Return the property read from the ncfile
write
(data[, at_index])Tell this writer how to write to the NetCDF file given the final object that it is bound to
Methods
__init__
(parent_driver, target[, storage_object])add_metadata
(name, value)Add metadata to self on disk, extra bits of information that can be used for flags or other variables This is NOT a staticmethod of the top data set since you can buffer this before binding
append
(data)Tell this writer how to write to the NetCDF file given the final object that it is bound to
dtype_string
()Short name of variable for strings and errors
read
()Return the property read from the ncfile
write
(data[, at_index])Tell this writer how to write to the NetCDF file given the final object that it is bound to
Attributes
dtype
Define the Python data type for this variable
storage_type
Tell the Codec what NetCDF storage type this Codec treats the data as.