CFVariableL3b: CF data variable for the NASA L3b format

CFVariableL3bR Documentation

CF data variable for the NASA L3b format

Description

This class represents a CF data variable that provides access to data sets in NASA level-3 binned format, used extensively for satellite imagery.

Super classes

ncdfCF::CFObject -> ncdfCF::CFVariable -> CFVariableL3b

Methods

Public methods

Inherited methods

Method new()

Create an instance of this class.

Usage
CFVariableL3b$new(grp, units)
Arguments
grp

The group that this CF variable lives in. Must be called "/level-3_binned_data".

units

Vector of two character strings with the variable name and the physical units of the data variable in the netCDF resource.

Returns

An instance of this class.


Method subset()

This method extracts a subset of values from the data of the variable, with the range along both axes expressed in decimal degrees.

Usage
CFVariableL3b$subset(..., rightmost.closed = FALSE)
Arguments
...

One or more arguments of the form axis = range. The "axis" part should be the name of axis longitude or latitude or its orientation X or Y. The "range" part is a vector of values representing coordinates along the axis where to extract data. Axis designators and names are case-sensitive and can be specified in any order. If values for the range of an axis fall outside of the extent of the axis, the range is clipped to the extent of the axis.

rightmost.closed

Single logical value to indicate if the upper boundary of range in each axis should be included.

Details

The range of values along both axes of latitude and longitude is expressed in decimal degrees. Any axes for which no information is provided in the subset argument are extracted in whole. Values can be specified in a variety of ways that should (resolve to) be a vector of real values. A range (e.g. 100:200), a vector (⁠c(23, 46, 3, 45, 17⁠), a sequence (⁠seq(from = 78, to = 100, by = 2⁠), all work. Note, however, that only a single range is generated from the vector so these examples resolve to ⁠(100, 200)⁠, ⁠(3, 46)⁠, and ⁠(78, 100)⁠, respectively.

If the range of values for an axis in argument subset extend the valid range of the axis in x, the extracted slab will start at the beginning for smaller values and extend to the end for larger values. If the values envelope the valid range the entire axis will be extracted in the result. If the range of subset values for any axis are all either smaller or larger than the valid range of the axis in x then nothing is extracted and NULL is returned.

The extracted data has the same dimensional structure as the data in the variable, with degenerate dimensions dropped. The order of the axes in argument subset does not reorder the axes in the result; use the CFVariable$array() method for this.

Returns

A CFVariable instance, having an array with axes and attributes of the variable, or NULL if one or more of the elements in the ... argument falls entirely outside of the range of the axis. Note that degenerate dimensions (having length(.) == 1) are dropped from the array but the corresponding axis is maintained in the result as a scalar axis.


Method clone()

The objects of this class are cloneable with this method.

Usage
CFVariableL3b$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

References

https://oceancolor.gsfc.nasa.gov/resources/docs/technical/ocean_level-3_binned_data_products.pdf


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