scipy.io.netcdf_file.createVariable¶
-
netcdf_file.createVariable(name, type, dimensions)[source]¶ Create an empty variable for the
netcdf_fileobject, specifying its data type and the dimensions it uses.Parameters: name : str
Name of the new variable.
type : dtype or str
Data type of the variable.
dimensions : sequence of str
List of the dimension names used by the variable, in the desired order.
Returns: variable : netcdf_variable
The newly created
netcdf_variableobject. This object has also been added to thenetcdf_fileobject as well.See also
Notes
Any dimensions to be used by the variable should already exist in the NetCDF data structure or should be created by
createDimensionprior to creating the NetCDF variable.