2010 Unidata NetCDF Workshop > The Two NetCDF Data Models
4.5 Variable Methods
Things you can do with a netCDF variable include getting information
about it, putting data values into it, and getting data values out of it.
In the netCDF C-based interfaces, operations on variables include:
- Create a variable, given its name, data type, and shape.
- Get a variable from its name.
- Get a variable's name, data type, shape, or number of attributes.
- Put/get all data values into/from a variable.
- Put/get a single data value into/from a variable, given the indices and value.
- Put/get an array of values into/from a variable, given
corner indices,
edge lengths, and a block of values.
- Put/get a sub-sampled array-section of values into/from a
variable, given corner indices, edge lengths, stride vector, and a block of values.
- Put/get a mapped array-section of values into/from a variable,
given corner indices, edge lengths, stride vector, index mapping
vector, and a block of values.
- Rename a variable.
The netCDF Java interface supports some additional operations on
variables including array section operations.
2010 Unidata NetCDF Workshop > The Two NetCDF Data Models