Functions to interpolate meteorological data for spatial locations (at
points, grid pixels or full grids) using an object of class
MeteorologyInterpolationData-class
.
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
)
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.
An object of class
MeteorologyInterpolationData-class
.
An object of class SpatialGridTopography-class
representing the target landscape.
An object of class Date
. If this is NULL
then all dates in object
are processed.
Output file for interpolated meteorology data (netCDF format).
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
.
Boolean flag to indicate that NetCDF exists and data should be added/replaced.
Boolean flag to force overwriting an existing NetCDF.
Boolean flag to print process information.
An object of class SpatialPixelsTopography-class
representing the target landscape.
An object of class
SpatialPointsTopography-class
.
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
).
Output directory for interpolated meteorology data files (txt/rds format).
The name of the ascii text file that will store the meta data describing all written files.
Miquel De Cáceres Ainsa, CREAF
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
.
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.
penman
, SpatialPointsTopography-class
,
SpatialGridTopography
, SpatialPixelsTopography
,
MeteorologyInterpolationData