Learn R Programming

ncdfCF (version 0.3.0)

CFVariable: CF data variable

Description

This class represents the basic structure of a CF data variable, the object that provides access to an array of data.

The CF data variable instance provides access to the data array from the netCDF resource, as well as all the details that have been associated with the data variable, such as axis information, grid mapping parameters, etc.

Do not use this class directly. Instead, use CFVariableGeneric of any of the more specific CFVariable* classes.

Arguments

Super class

ncdfCF::CFObject -> CFVariable

Public fields

axes

List of instances of classes descending from CFAxis that are the axes of the variable.

grid_mapping

The coordinate reference system of this variable, as an instance of CFGridMapping. If this field is NULL, the horizontal component of the axes are in decimal degrees of longitude and latitude.

Active bindings

friendlyClassName

(read-only) A nice description of the class.

gridLongLat

The grid of longitude and latitude values of every grid cell when the main variable grid has a different coordinate system.

crs

(read-only) Retrieve the coordinate reference system description of the variable as a WKT2 string.

Methods

Inherited methods


Method new()

Create an instance of this class.

Usage

CFVariable$new(grp, nc_var, axes)

Arguments

grp

The group that this CF variable lives in.

nc_var

The netCDF variable that defines this CF variable.

axes

List of CFAxis instances that describe the dimensions.

Returns

An instance of this class.


Method print()

Print a summary of the data variable to the console.

Usage

CFVariable$print()


Method brief()

Some details of the data variable.

Usage

CFVariable$brief()

Returns

A 1-row data.frame with some details of the data variable.


Method shard()

The information returned by this method is very concise and most useful when combined with similar information from other variables.

Usage

CFVariable$shard()

Returns

Character string with very basic variable information.


Method peek()

Retrieve interesting details of the data variable.

Usage

CFVariable$peek(with_groups = TRUE)

Arguments

with_groups

Should group information be included? The save option is TRUE (default) when the netCDF resource has groups because names may be duplicated among objects in different groups.

Returns

A 1-row data.frame with details of the data variable.


Method data()

Retrieve all data of the variable. Scalar variables are not present in the result.

Usage

CFVariable$data()

Returns

A CFData instance with all data from this variable.


Method clone()

The objects of this class are cloneable with this method.

Usage

CFVariable$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.