NetCDFGroup
A group of NetCDF variables, dimensions, attributes, and child groups.
Declaration
classdef NetCDFGroup < handleOverview
NetCDFGroup represents a single NetCDF group (including the root group) and
provides a uniform interface for:
- Creating and registering coordinate dimensions (and their coordinate variables)
- Creating, registering, and reading variables (real and complex)
- Creating and traversing a group hierarchy
- Managing group-level (global) attributes
Typical usage is through NetCDFFile, which constructs the root group and then
exposes methods that delegate to this class.
Topics
- Initializing
NetCDFGroupCreate and manage a NetCDF group.
- Accessing group properties
dumpDisplay group contents to the command window.idof the groupnameof the groupparentGroupparent group (may be nil)
- Working with dimensions
addDimensionAdd a new coordinate dimension and associated coordinate variable.dimensionPathWithNameReturn the full group-qualified path of a dimension name.dimensionWithIDRetrieve dimensions by NetCDF dimension ID.dimensionsarray of NetCDFDimension objectshasDimensionWithNameDetermine whether a dimension exists in this group.
- Working with variables
addFunctionHandleAdd a lazily-evaluated variable backed by a function handle.addVariableAdd a real or complex variable to the group.complexVariablesarray of NetCDFComplexVariable objectsreadVariablesRead one or more variables from file.readVariablesAtIndexAlongDimensionRead variables at a single index along a named dimension.realVariablesarray of NetCDFVariable objectsvariablePathsWithNameReturn all group-qualified paths matching a variable name.variableWithNameRetrieve a variable by name or path.
- Working with groups
addDuplicateGroupDuplicate an existing group into this group.addGroupCreate a new child group.groupPathpath of groupgroupWithNameRetrieve a child group by name.groupsarray of NetCDFGroup objectshasGroupWithNameDetermine whether a child group exists in this group.
- Working with global attributes
addAttributeAdd or replace a global attribute on this group.attributeskey-value Map of group attributeshasAttributeWithNameDetermine whether a global attribute exists on this group.
- Other
dimensionWithNameRetrieve a dimension by name.hasVariableWithNameDetermine whether a variable exists in this group.