Extracts meteorological data from an object.
extractdates(object, dates = NULL, verbose=FALSE)
extractvars(object, vars, verbose=FALSE)
extractgridindex(grid, index)
extractgridpoints(grid, points, verbose=FALSE)
An object of class SpatialPointsMeteorology
, SpatialGridMeteorology
or SpatialPixelsMeteorology
.
A vector of Date
with a (subset) of dates to be extracted. If NULL
all dates will be returned.
A character vector with the set of variables to be extracted.
An object of class SpatialGridMeteorology-class
or SpatialPixelsMeteorology-class
with the meteorological data for a full grid or a subset of grid cells, respectively. Alternatively, a string specifying a NetCDF to be read from the disk.
An integer with a grid index.
An object of class SpatialPoints
.
Boolean flag to print process information.
Function extractdates()
, returns a list
with the same length as dates
. Each element of the list is a spatial object (SpatialPointsDataFrame
, SpatialGridDataFrame
or SpatialPixelsDataFrame
, depending on the input) with the meteorological data for all the spatial elements. If only one date is asked, the function returns directly the spatial object, without embedding it into a list.
Function extractvars()
, returns a list
with the same length as vars
. Each element of the list is a spatial object (SpatialPointsDataFrame
, SpatialGridDataFrame
or SpatialPixelsDataFrame
, depending on the input) with the meteorological data for all the spatial elements. If only one variable is asked, the function returns directly the spatial object, without embedding it into a list.
Function extractgridindex()
returns a data frame.
Function extractgridpoints()
returns an object of class SpatialPointsMeteorology
.
Function extractpoints
is deprecated, because its functionality can be achieved using subsetting of spatial classes SpatialGridMeteorology
and SpatialPixelsMeteorology
.