The delta method computes the difference between an observed raster and the
equivalent predictions from a model for a given time step, and then applies
that difference (delta) to all other time steps. You will first need to
create the delta raster with delta_compute()
, and thus use it
as an argument for this function.
Usage
delta_downscale(
x,
delta_rast,
x_landmask_high = NULL,
range_limits = NULL,
nmax = 7,
set = list(idp = 0.5),
...
)
Arguments
- x
a
terra::SpatRaster
for the variable of interest, with all time steps of interest- delta_rast
a
terra::SpatRaster
generated bypastclim::delta_compute
- x_landmask_high
a
terra::SpatRaster
with the same number of layers as x. If left NULL, the original landmask of x is used.- range_limits
range to which the downscaled reconstructions are forced to be within (usually based on the observed values). Ignored if left to NULL.
- nmax
the number of nearest observations that should be used for a kriging prediction or simulation, where nearest is defined in terms of the space of the spatial locations (see
gstat::gstat()
for details)- set
named list with optional parameters to be passed to gstat (only set commands of gstat are allowed, and not all of them may be relevant; see the gstat manual for gstat stand-alone, URL and more details in the
gstat::gstat()
help page)- ...
further parameters to be passed to
gstat::gstat()
Value
a terra::SpatRaster
of the downscaled variable, where each
layers is a time step.
Details
It is possible to also provide a high resolution landmask to this function.
For cells which are not included in the original simulation (e.g. because
the landmask was discretised at lower resolution), an inverse
distance weighted algorithm (as implemented in gstat::gstat()
) is used
to interpolate the missing values. See the manpage for gstat::gstat()
for more parameters that can change the behaviour of the iwd interpolation.