Dataset¶
-
class
metpy.io.cdm.
Dataset
(**kwargs)[source]¶ Represents a set of data using the Common Data Model (CDM).
This is currently only a wrapper around the root Group.
Methods Summary
__init__
(**kwargs)createDimension
(name, size)Create a new Dimension
in thisGroup
.createGroup
(name)Create a new Group as a descendant of this one. createVariable
(name, datatype[, dimensions, …])Create a new Variable in this Group. ncattrs
()Get a list of the names of the netCDF attributes. Methods Documentation
-
__init__
(**kwargs)¶
-
createDimension
(name, size)¶ Create a new
Dimension
in thisGroup
.Parameters: Returns: Dimension – The newly created
Dimension
-
createGroup
(name)¶ Create a new Group as a descendant of this one.
Parameters: name (str) – The name of the new Group. Returns: Group – The newly created Group
-
createVariable
(name, datatype, dimensions=(), fill_value=None, wrap_array=None)¶ Create a new Variable in this Group.
Parameters: - name (str) – The name of the new Variable.
- datatype (str or numpy.dtype) – A valid Numpy dtype that describes the layout of the data within the Variable.
- dimensions (tuple[str], optional) – The dimensions of this Variable. Defaults to empty, which implies a scalar variable.
- fill_value (number, optional) – A scalar value that is used to fill the created storage. Defaults to None, which performs no filling, leaving the storage uninitialized.
- wrap_array (numpy.ndarray, optional) – Instead of creating an array, the Variable instance will assume ownership of the passed in array as its data storage. This is a performance optimization to avoid copying large data blocks. Defaults to None, which means a new array will be created.
Returns: Variable – The newly created
Variable
-
ncattrs
()¶ Get a list of the names of the netCDF attributes.
Returns: List[str]
-