Functions to read gridded meteorological data from the disk.
readmeteorologygrid(files, format = "netCDF", varmapping = NULL,
dates = NULL, bbox = NULL, offset = 0, verbose = FALSE)
readmeteorologypixels(files, format = "netCDF", varmapping = NULL,
dates = NULL, bbox = NULL, offset = 0, verbose = FALSE)
readmeteorologygridpoints(files, format = "netCDF", varmapping = NULL,
dates = NULL, bbox = NULL, offset = 0,
relativehumidity = FALSE, verbose = FALSE)
Character vector with the file names to be read.
Format of meteorological data. Currently, the only accepted format is "netCDF"
.
Named character vector specifying a mapping of variables in the NetCDF into variables used in meteoland (e.g. c(MinTemperature = "tmn")
specifies a map of variable 'tmn' to MinTemperature).
A character or Date vector to specify subset of dates to be read.
Boundary box (2 x 2 matrix) specifying the minimum and maximum coordinates of a study area.
A buffer to include NetCDF cells that are at a certain distance around the boundary box.
A logical flag to indicate estimation of relative humidity from specific humidity if possible.
A logical flag to output process information in the console.
Function readmeteorologygrid
returns an object SpatialGridMeteorology-class
.
Function readmeteorologypixels
returns an object SpatialPixelsMeteorology-class
.
Function readmeteorologygridpoints
returns an object SpatialPointsMeteorology-class
.
Function readmeteorologygrid
reads one or several files containing the meteorology over a grid for a set of days. Function readmeteorologypixels
reads one or several file containing the meteorology over a grid for a set of days and filters those pixels with missing data. If more than one file is specificated, the functions read all of them and then try to merge the data into a single meteorology object (see function mergegrids
).
Function readmeteorologygridpoints
is similar to the preceding ones, but is meant to extract specific grid pixels and return them as spatial points. If more than one file is specificated, the function reads all of them and then tries to merge the data into a single meteorology object (see function mergepoints
).
The functions are primarily meant to read NetCDF written by package meteoland, but also to import data written by other software. In this case, a mapping can be supplied to map variable names in the netCDF to variables used in meteoland. Rotated grids should not be read using functions readmeteorologygrid
or readmeteorologypixels
.
writemeteorologygrid
, writemeteorologypixels
, SpatialPointsMeteorology-class
, SpatialGridMeteorology-class
, SpatialPixelsMeteorology-class
, mergegrids
, mergepoints