NCVariable: NetCDF variable

NCVariableR Documentation

NetCDF variable

Description

This class represents a netCDF variable, the object that holds the properties and data of elements like dimensions and variables of a netCDF file.

Direct access to netCDF variables is usually not necessary. NetCDF variables are linked from CF data variables and axes and all relevant properties are thus made accessible.

Super class

ncdfCF::NCObject -> NCVariable

Public fields

group

NetCDF group where this variable is located.

vtype

The netCDF data type of this variable. This could be the packed type. Don't check this field but use the appropriate method in the class of the object whose data type you are looking for.

ndims

Number of dimensions that this variable uses.

dimids

Vector of dimension identifiers that this variable uses. These are the so-called "NUG coordinate variables".

netcdf4

Additional properties for a netcdf4 resource.

Active bindings

CF

List of CF objects that use this netCDF variable.

fullname

(read-only) Name of the NC variable including the group path from the root group.

Methods

Public methods

Inherited methods

Method new()

Create a new netCDF variable. This class should not be instantiated directly, they are created automatically when opening a netCDF resource.

Usage
NCVariable$new(id, name, group, vtype, ndims, dimids)
Arguments
id

Numeric identifier of the netCDF object.

name

Character string with the name of the netCDF object.

group

The NCGroup this variable is located in.

vtype

The netCDF data type of the variable.

ndims

The number of dimensions this variable uses.

dimids

The identifiers of the dimensions this variable uses.

Returns

An instance of this class.


Method print()

Summary of the NC variable printed to the console.

Usage
NCVariable$print(...)
Arguments
...

Passed on to other methods.


Method shard()

Very concise information on the variable. The information returned by this function is very concise and most useful when combined with similar information from other variables.

Usage
NCVariable$shard()
Returns

Character string with very basic variable information.


Method clone()

The objects of this class are cloneable with this method.

Usage
NCVariable$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


ncdfCF documentation built on April 16, 2025, 9:08 a.m.