Learn R Programming

meteoland (version 2.0.1)

interpolationgrid: Interpolate daily meteorology over a landscape

Description

[Deprecated]

Functions to interpolate meteorological data for spatial locations (at points, grid pixels or full grids) using an object of class MeteorologyInterpolationData-class.

Usage

interpolationgrid(
  object,
  grid,
  dates = NULL,
  exportFile = NULL,
  exportFormat = "netCDF",
  add = FALSE,
  overwrite = FALSE,
  verbose = TRUE
)

interpolationpixels( object, pixels, dates = NULL, exportFile = NULL, exportFormat = "netCDF", add = FALSE, overwrite = FALSE, verbose = TRUE )

interpolationpoints( object, points, dates = NULL, export = FALSE, exportDir = getwd(), exportFile = NULL, exportFormat = "meteoland/txt", metadataFile = "MP.txt", verbose = TRUE )

Value

If export = FALSE, function interpolationpoints

returns an object of SpatialPointsMeteorology-class. If export = TRUE files and written in the disk. For text/rds format the function returns an object of class SpatialPointsDataFrame containing point meta data.

If export = FALSE, function interpolationpixels returns an object of SpatialPixelsMeteorology-class, or an object of SpatialPixelsDataFrame if a single date is interpolated. If export = TRUE, the function writes the results in a NetCDF.

If export = FALSE, function interpolationgrid returns an object of SpatialGridMeteorology-class, or an object of SpatialGridDataFrame if a single date is interpolated. If export = TRUE, the function writes the results in files and a data.frame with columns 'dir' and 'filename' is returned.

Arguments

object

An object of class MeteorologyInterpolationData-class.

grid

An object of class SpatialGridTopography-class representing the target landscape.

dates

An object of class Date. If this is NULL then all dates in object are processed.

exportFile

Output file for interpolated meteorology data (netCDF format).

exportFormat

Export format for meteorological data (see writemeteorologypoint). If format is "meteoland/txt", "meteoland/rds", "castanea/txt" or "castanea/rds" the function tries to write one file per point in exportDir. If format is "netCDF" the function will write data to a single file specified by exportFile.

add

Boolean flag to indicate that NetCDF exists and data should be added/replaced.

overwrite

Boolean flag to force overwriting an existing NetCDF.

verbose

Boolean flag to print process information.

pixels

An object of class SpatialPixelsTopography-class representing the target landscape.

points

An object of class SpatialPointsTopography-class.

export

If export = FALSE the result of interpolation is stored in memory. Otherwise the result is written in the disk (using the format specified in exportFormat).

exportDir

Output directory for interpolated meteorology data files (txt/rds format).

metadataFile

The name of the ascii text file that will store the meta data describing all written files.

Functions

  • interpolationgrid(): [Deprecated]

  • interpolationpixels(): [Deprecated]

Author

Miquel De Cáceres Ainsa, CREAF

Details

CRS projection needs to be defined for both object and points/pixels/grid. If CRS projection is different between object and points/pixels/grid, the function transforms the coordinates of points/pixels/grid to adapt them to the CRS of object.

References

Thornton, P.E., Running, S.W., White, M. A., 1997. Generating surfaces of daily meteorological variables over large regions of complex terrain. J. Hydrol. 190, 214–251. doi:10.1016/S0022-1694(96)03128-9.

De Caceres M, Martin-StPaul N, Turco M, Cabon A, Granda V (2018) Estimating daily meteorological data and downscaling climate models over landscapes. Environmental Modelling and Software 108: 186-196.

See Also

penman, SpatialPointsTopography-class, SpatialGridTopography, SpatialPixelsTopography, MeteorologyInterpolationData