This class represents the longitude and latitude variables that compose auxiliary coordinate variable axes for X-Y grids that are not longitude-latitude.
The class provides access to the data arrays for longitude and latitude from the netCDF resource, as well as all the details that have been associated with both axes. Additionally, this class can generate the index to extract values on a long-lat grid of the associated X-Y grid data variable using a user-selectable extent and resolution.
Auxiliary longitude-latitude grids are only supported for reading from a netCDF resource. Creating an instance manually therefore has no practical purpose.
ncdfCF::CFObject -> CFAuxiliaryLongLat
varLongThe NCVariable instance of the longitude values.
varLatThe NCVariable instance of the latitude values.
boundsLongThe CFBounds instance for the longitude values of the grid.
boundsLatThe CFBounds instance for the latitude values of the grid.
axis_orderEither c("X", "Y") (default) or c("Y", "X") to
indicate the orientation of the latitude and longitude grids.
friendlyClassName(read-only) A nice description of the class.
name(read-only) The name of the auxiliary lon-lat grid.
aoiSet or retrieve the AOI for the long-lat grid.
lon(read-only) Retrieve the longitude grid.
lat(read-only) Retrieve the latitude grid.
extent(read-only) Retrieve the extent of the longitude and latitude grids, including bounds if they have been set. The extent is reported as a numeric vector of the four elements minumum and maximum longitude and minimum and maximum latitude.
dim(read-only) The dimensions of the longitude and latitude grids.
dimids(read-only) The dimids of the longitude and latitude grids.
new()Creating a new instance. It should normally not be useful to create an instance of this class other than upon reading a netCDF resource.
CFAuxiliaryLongLat$new(varLong, varLat, boundsLong, boundsLat)varLong, varLatThe NCVariable instances with the longitude and latitude grid values, respectively.
boundsLong, boundsLatThe bounds of the grid cells for the longitude and latitude, respectively, if set.
print()Summary of the auxiliary longitude-latitude variable printed to the console.
CFAuxiliaryLongLat$print()
brief()Some details of the auxiliary longitude-latitude grid.
CFAuxiliaryLongLat$brief()A 2-row data.frame with some details of the grid components.
sample_index()Return the indexes into the X (longitude) and Y (latitude) axes of the original data grid of the points closest to the supplied longitudes and latitudes, up to a maximum distance.
CFAuxiliaryLongLat$sample_index(x, y, maxDist = NULL)x, yVectors of longitude and latitude values in decimal degrees, respectively.
maxDistNumeric value in decimal degrees of the maximum distance between the sampling point and the closest grid cell. If omitted (default), the distance is calculated from the nominal resolution of the grids.
A matrix with two columns X and Y and as many rows as
arguments x and y. The X and Y columns give the index into the
grid of the sampling points, or c(NA, NA) is no grid point is located
within the maxDist distance from the sampling point.
grid_index()Compute the indices for the AOI into the data grid.
CFAuxiliaryLongLat$grid_index()An integer matrix with the dimensions of the AOI, where each grid cell gives the linear index value into the longitude and latitude grids.
clear_cache()Clears the cache of pre-computed grid index values if an AOI has been set.
CFAuxiliaryLongLat$clear_cache(full = FALSE)fullLogical (default = FALSE) that indicates if longitude and
latitude grid arrays should be cleared as well to save space. These will
then be re-read from file if a new AOI is set.
clone()The objects of this class are cloneable with this method.
CFAuxiliaryLongLat$clone(deep = FALSE)deepWhether to make a deep clone.