CFVerticalParametricTerm: Parametric formula term for a vertical CF axis object

CFVerticalParametricTermR Documentation

Parametric formula term for a vertical CF axis object

Description

This class represents a formula term for a parametric vertical axis.

Super classes

ncdfCF::CFObject -> ncdfCF::CFVariable -> CFVerticalParametricTerm

Active bindings

has_data

Logical flag that indicates of the instance has an associated data variable. If not, the instance will report 0 as its data.

values

(read-only) The values of the parametric term. Depending on the definition of the term, this could be a large array or a simple scalar. Specifically, if the term is defined but no data is included in the netCDF resource, this method will return 0, as per the CF Metadata Conventions.

Methods

Public methods

Inherited methods

Method new()

Create an instance of this class.

Usage
CFVerticalParametricTerm$new(
  var,
  axes,
  values = values,
  start = NA,
  count = NA,
  attributes = data.frame()
)
Arguments
var

The NCVariable instance upon which this CF variable is based when read from a netCDF resource, or the name for the new CF variable to be created.

axes

A list of CFAxis descendant instances that describe the axes of the data object.

values

Optional. The values of the variable in an array.

start

Optional. Vector of indices where to start reading data along the dimensions of the array on file. The vector must be NA to read all data, otherwise it must have agree with the dimensions of the array on file. Ignored when argument var is not an NCVariable instance.

count

Optional. Vector of number of elements to read along each dimension of the array on file. The vector must be NA to read to the end of each dimension, otherwise its value must agree with the corresponding start value and the dimension of the array on file. Ignored when argument var is not an NCVariable instance.

attributes

Optional. A data.frame with the attributes of the object. When argument var is an NCVariable instance and this argument is an empty data.frame (default), arguments will be read from the resource.

Returns

An instance of this class.


Method print()

Prints a summary of the parametric formula term to the console.

Usage
CFVerticalParametricTerm$print(...)
Arguments
...

Arguments passed on to other functions. Of particular interest is ⁠width = ⁠ to indicate a maximum width of attribute columns.

Returns

self, invisibly.


Method subset()

Subset the indices to read a smaller portion of the data from the netCDF file. The passed indices should be named after the axes that they refer to. There may be more indices than axes and they may be in a different order than the axes of the term.

Usage
CFVerticalParametricTerm$subset(
  original_axis_names,
  new_axes,
  start,
  count,
  aux = NULL,
  ZT_dim = NULL
)
Arguments
original_axis_names

Character vector of names of the axes prior to a modifying operation in the owning data variable.

new_axes

List of CFAxis instances to use for the subsetting.

start

The indices to start reading data from the file, as an integer vector at least as long as the number of axis for the term.

count

The number of values to read from the file, as an integer vector at least as long as the number of axis for the term.

aux

Optional. List with the parameters for an auxiliary grid transformation. Default is NULL.

ZT_dim

Optional. Dimensions of the non-grid axes when an auxiliary grid transformation is specified.

Returns

The new parametric term object.


Method clone()

The objects of this class are cloneable with this method.

Usage
CFVerticalParametricTerm$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


ncdfCF documentation built on Sept. 13, 2025, 5:07 p.m.