Description Usage Arguments Details Value Author(s) References See Also Examples
Interpolates meteorological data on spatial points/pixels/grid using an object of class MeteorologyInterpolationData-class
.
1 2 3 4 5 6 7 8 9 | interpolationpoints(object, points, dates = NULL, export = FALSE,
exportDir = getwd(), exportFormat = "meteoland/txt",
metadatafile = "MP.txt", verbose=TRUE)
interpolationpixels(object, pixels, dates, export = FALSE,
exportDir=getwd(), exportFormat = "netCDF",
metadatafile = "MG.txt", verbose=TRUE)
interpolationgrid(object, grid, dates, export = FALSE,
exportDir=getwd(), exportFormat = "netCDF",
metadatafile = "MG.txt", verbose=TRUE)
|
object |
An object of class |
points |
An object of class |
pixels |
An object of class |
grid |
An object of class |
dates |
An object of class |
export |
If |
exportDir |
Output directory for interpolated meteorology data. |
exportFormat |
Export format for meteorological data (see |
metadatafile |
The name of the ascii text file that will store the meta data describing all written files. |
verbose |
Boolean flag to print process information. |
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
.
If export = FALSE
, function interpolationpoints
returns an object of SpatialPointsMeteorology-class
. If export = TRUE
, the function returns an object of class SpatialPointsDataFrame-class
containing the meta data of the files written in the disk.
If export = FALSE
, function interpolationpixels
returns an object of SpatialPixelsMeteorology-class
. If export = TRUE
, the function writes the results in files and a data.frame
with columns 'dir' and 'filename' is returned.
If export = FALSE
, function interpolationgrid
returns an object of SpatialGridMeteorology-class
. If export = TRUE
, the function writes the results in files and a data.frame
with columns 'dir' and 'filename' is returned.
Miquel De Cáceres Ainsa, CTFC
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | data(examplegridtopography)
data(exampleinterpolationdata)
####### INTERPOLATION on particular POINTS
#Creates spatial topography points from the grid
p = 1:2
spt = as(examplegridtopography, "SpatialPointsTopography")[p]
#Interpolation of two points for the whole time period (2000-2003)
mp = interpolationpoints(exampleinterpolationdata, spt)
#Plot interpolated meteorological series
meteoplot(mp,1, ylab="Mean temperature")
####### INTERPOLATION on PIXELS
# Creates spatial topography pixels as a subset of grid pixels
# and select pixels at maximum distance of 2km from center
spt = as(examplegridtopography,"SpatialPointsTopography")
cc = spt@coords
center = 5160
d = sqrt((cc[,1]-cc[center,1])^2+(cc[,2]-cc[center,2])^2)
spxt = as(spt[which(d<2000)], "SpatialPixelsTopography")
# Interpolation of meteorology over pixels for two days
ml = interpolationpixels(exampleinterpolationdata, spxt,
as.Date(c("2001-02-03", "2001-06-03")))
#Plot PET corresponding to 2001-06-03
spplot(ml,2,"PET")
####### INTERPOLATION over a complete GRID
#Interpolation of meteorology over a grid for two days
ml = interpolationgrid(exampleinterpolationdata, examplegridtopography,
as.Date(c("2001-02-03", "2001-06-03")))
#Plot PET corresponding to 2001-06-03
spplot(ml,2,"PET")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.