Calculate a timeseries of ETo across a set of input rasters.
calc_etr_spatial.Rd
Assumes that all inputs share the same resolution, extent, projection. Also assumes that rasters have the number of layers with each layer corresponding to a day. For hargreaves, only t_mean, t_min and t_max are required arguments. For PM, t_mean, srad, rh, and ws must all be supplied.
Usage
calc_etr_spatial(
t_mean = NULL,
t_min = NULL,
t_max = NULL,
srad = NULL,
rh = NULL,
rh_min = NULL,
rh_max = NULL,
ws = NULL,
elev = NULL,
days = NULL,
reference = 0.23,
z = 9,
wind_height = 2,
method = "penman"
)
Arguments
- t_mean
A multilayer timeseries
terra::rast
of mean daily temperature in degrees C.- t_min
A multilayer timeseries
terra::rast
of max daily temperature in degrees C.- t_max
A multilayer timeseries
terra::rast
of min daily temperature in degrees C.- srad
A multilayer timeseries
terra::rast
of daily solar radiation in W m^-2.- rh
A multilayer timeseries
terra::rast
of mean daily relative humidity (%).- rh_min
A multilayer timeseries
terra::rast
of minimum daily relative humidity (%; defaults to NULL).- rh_max
A multilayer timeseries
terra::rast
of maximum daily relative humidity (%).- ws
A multilayer timeseries
terra::rast
of mean daily wind speed at 2m height in m s^-1.- elev
A
terra::rast
of elevation in meters. If left blank, elevation will be derived using theelevatr
package.- days
A multilayer timeseries
terra::rast
where each day is a constant value of the Julian day. If left blank, it is assumed thet_mean
input has a time attribute and the raster will be derived usingterra::time
.- reference
The albedo of the reference surface ranging from 0 - 1. Defaults to 0.23 for grass.
- z
The zoom level download elevation data at ranging from 1 - 14. One if coarser resolution, 14 is finer resolution. For more information, look at
?elevatr::get_elev_raster
- wind_height
The height of the wind observation in meters. (defaults to 2). If it is not 2 meters, the wind speed will be corrected to a 2 meter observation.
- method
The method to calculate ETo. Can either be "penman" or "hargreaves".
Value
A terra::rast
timeseries of ETo for the input domain.
Examples
if (FALSE) {
# Load data. Need to read with terra::rast to unpack to a raster.
srad <- terra::rast(srad) |> terra::subset(1:10)
t_mean <- terra::rast(t_mean) |> terra::subset(1:10)
# Convert from K to C
t_mean <- t_mean - 273.15
t_max <- terra::rast(t_max) |> terra::subset(1:10)
# Convert from K to C
t_max <- t_max - 273.15
t_min <- terra::rast(t_min) |> terra::subset(1:10)
# Convert from K to C
t_min <- t_min - 273.15
rh <- terra::rast(rh) |> terra::subset(1:10)
ws <- terra::rast(ws) |> terra::subset(1:10)
penman <- calc_etr_spatial(
t_mean = t_mean, srad = srad, rh = rh, ws = ws,
method = "penman", reference = 0.23, z = 3
)
hargreaves <- calc_etr_spatial(
t_mean = t_mean, t_max = t_max, t_min = t_min, method = "hargreaves", z = 3
)
}