Learn R Programming

meteoland (version 2.0.1)

readmeteorologygrid: Reads gridded meteorology from the disk

Description

[Deprecated]

Functions to read gridded meteorological data from the disk.

Usage

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 )

Value

  • Function readmeteorologygrid returns an object SpatialGridMeteorology-class.

  • Function readmeteorologypixels returns an object SpatialPixelsMeteorology-class.

  • Function readmeteorologygridpoints returns an object SpatialPointsMeteorology-class.

Arguments

files

Character vector with the file names to be read.

format

Format of meteorological data. Currently, the only accepted format is "netCDF".

varmapping

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).

dates

A character or Date vector to specify subset of dates to be read.

bbox

Boundary box (2 x 2 matrix) specifying the minimum and maximum coordinates of a study area.

offset

A buffer to include NetCDF cells that are at a certain distance around the boundary box.

verbose

A logical flag to output process information in the console.

relativehumidity

A logical flag to indicate estimation of relative humidity from specific humidity if possible.

Functions

  • readmeteorologypixels(): [Deprecated]

  • readmeteorologygridpoints(): [Deprecated]

Author

Miquel De Cáceres Ainsa, CREAF

Details

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 specified, 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 specified, 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.

See Also

writemeteorologygrid, writemeteorologypixels, SpatialPointsMeteorology-class, SpatialGridMeteorology-class, SpatialPixelsMeteorology-class, mergegrids, mergepoints