createVariable — SciPy v1.15.2 Manual (original) (raw)
scipy.io.netcdf_file.
netcdf_file.createVariable(name, type, dimensions)[source]#
Create an empty variable for the netcdf_file object, specifying its data type and the dimensions it uses.
Parameters:
namestr
Name of the new variable.
typedtype or str
Data type of the variable.
dimensionssequence of str
List of the dimension names used by the variable, in the desired order.
Returns:
variablenetcdf_variable
The newly created netcdf_variable
object. This object has also been added to the netcdf_file object as well.
Notes
Any dimensions to be used by the variable should already exist in the NetCDF data structure or should be created by createDimension prior to creating the NetCDF variable.