CFVariableL3b | R Documentation |
This class represents a CF data variable that provides access to data sets in NASA level-3 binned format, used extensively for satellite imagery.
ncdfCF::CFObject
-> ncdfCF::CFVariableBase
-> ncdfCF::CFVariable
-> CFVariableL3b
variable
The name of the variable contained in this L3b data.
index
The index data of the L3b structure.
ncdfCF::CFObject$append_attribute()
ncdfCF::CFObject$attribute()
ncdfCF::CFObject$delete_attribute()
ncdfCF::CFObject$print_attributes()
ncdfCF::CFObject$set_attribute()
ncdfCF::CFObject$write_attributes()
ncdfCF::CFVariableBase$summarise()
ncdfCF::CFVariableBase$time()
ncdfCF::CFVariable$brief()
ncdfCF::CFVariable$peek()
ncdfCF::CFVariable$print()
ncdfCF::CFVariable$shard()
new()
Create an instance of this class.
CFVariableL3b$new(grp, units)
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.
An instance of this class.
as_matrix()
Read all the data from the file and turn the data into a
matrix. If an aoi
is specified, the data will be subset to that area.
This method returns a bare-bones matrix without any metadata or other
identifying information. Use method data()
, subset()
or the [
operator rather than this method to obtain a more informative result.
CFVariableL3b$as_matrix(aoi = NULL)
aoi
An instance of class AOI
, optional, to select an area in
latitude - longitude coordinates.
A matrix with the data of the variable in raw format.
data()
Retrieve all data of the L3b variable.
CFVariableL3b$data()
A CFArray instance with all data from this L3b variable.
subset()
This method extracts a subset of values from the data of the variable, with the range along both axes expressed in decimal degrees.
CFVariableL3b$subset(subset = NULL, aoi = NULL, rightmost.closed = FALSE, ...)
subset
A list with the range to extract from each axis. The list
should have elements for the axes to extract a subset from - if an axis
is not present in the list the entire axis will be extracted from the
array. List element names should be the axis name or designator
longitude
or X
, or latitude
or Y
. Axis designators and names
are case-sensitive and can be specified in any order. If values for the
range per axis fall outside of the extent of the axis, the range is
clipped to the extent of the axis.
aoi
Optional, an area-of-interest instance of class AOI
created
with the aoi()
function to indicate the horizontal area that should
be extracted. The longitude and latitude coordinates must be included;
the X and Y resolution will be calculated if not given. When provided,
this argument will take precedence over the subset
argument.
rightmost.closed
Single logical value to indicate if the upper boundary of range in each axis should be included.
...
Ignored.
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
CFArray$array() method for this.
A CFArray instance, having an array with axes and attributes of
the variable, or NULL
if one or more of the elements in the subset
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.
clone()
The objects of this class are cloneable with this method.
CFVariableL3b$clone(deep = FALSE)
deep
Whether to make a deep clone.
https://oceancolor.gsfc.nasa.gov/resources/docs/technical/ocean_level-3_binned_data_products.pdf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.