Title: | Evapotranspiration R Recipes |
Version: | 1.0.1 |
Description: | An R-based application for exploratory data analysis of global EvapoTranspiration (ET) datasets. 'evapoRe' enables users to download, validate, visualize, and analyze multi-source ET data across various spatio-temporal scales. Also, the package offers calculation methods for estimating potential ET (PET), including temperature-based, combined type, and radiation-based approaches described in : Oudin et al., (2005) <doi:10.1016/j.jhydrol.2004.08.026>. 'evapoRe' supports hydrological modeling, climate studies, agricultural research, and other data-driven fields by facilitating access to ET data and offering powerful analysis capabilities. Users can seamlessly integrate the package into their research applications and explore diverse ET data at different resolutions. |
Depends: | R (≥ 4.0.0) |
Imports: | methods, parallel, utils, data.table, doParallel, foreach, lubridate, raster,twc |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
URL: | https://github.com/AkbarR1184/evapoRe |
BugReports: | https://github.com/AkbarR1184/evapoRe/issues |
SystemRequirements: | PROJ (>= 6, https://proj.org/download.html), GDAL (>= 3, https://gdal.org/download.html), NetCDF (>= 4, https://www.unidata.ucar.edu/software/netcdf/). |
RoxygenNote: | 7.3.2 |
Suggests: | rmarkdown, ggpubr, knitr, spelling, kableExtra, tibble, testthat (≥ 3.0.0) |
Language: | en-US |
VignetteBuilder: | knitr |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2025-04-10 19:57:02 UTC; akbar |
Author: | Akbar Rahmati Ziveh
|
Maintainer: | Akbar Rahmati Ziveh <rahmati_ziveh@fzp.czu.cz> |
Repository: | CRAN |
Date/Publication: | 2025-04-10 20:10:02 UTC |
Calculate Potential Evapotranspiration (PET) using Abtew Method
Description
The function abtew
computes PET by Abtew method
Usage
abtew(tavg, rs, x = NULL)
## S4 method for signature 'missing,missing'
abtew(x)
## S4 method for signature 'Raster,Raster'
abtew(tavg, rs, x = NULL)
## S4 method for signature 'character,character'
abtew(tavg, rs, x = NULL)
Arguments
tavg |
Raster* object or file path; average temperature (°C) |
rs |
Raster* object or file path; shortwave radiation (MJ m-2 day-1) |
x |
A 'data.table' with columns: "lon", "lat", "date", "tavg", "rs" |
Details
For Raster inputs, provide raster objects or file paths for 'tavg' and 'rs'. For 'data.table' input, provide a single 'data.table' with columns: "lon", "lat", "date", "tavg", and "rs".
Value
RasterBrick or data.table of PET values (mm/day)
Calculate Potential Evapotranspiration (PET) using Baier-Robertson method
Description
The function baier_robertson
computes PET using the Baier and Robertson method.
Usage
baier_robertson(tmax, tmin, x = NULL)
## S4 method for signature 'Raster,Raster'
baier_robertson(tmax, tmin, x = NULL)
## S4 method for signature 'character,character'
baier_robertson(tmax, tmin, x = NULL)
## S4 method for signature 'missing,missing'
baier_robertson(x)
Arguments
tmax |
Raster* object or file path; maximum temperature (°C) |
tmin |
Raster* object or file path; minimum temperature (°C) |
x |
A 'data.table' with columns: "lon", "lat", "date", "tmax", "tmin". |
Details
For Raster inputs, provide raster objects or file paths for maximum ('tmax') and minimum ('tmin') temperature.For 'data.table' input, provide a table with columns: "lon", "lat", "date", "tmax", and "tmin".
Value
RasterBrick or data.table of PET values (mm/day)
Calculate Potential Evapotranspiration (PET) using Blaney-Criddle method
Description
The function blaney_criddle
computes PET using the Blaney-Criddle method.
Usage
blaney_criddle(x)
## S4 method for signature 'Raster'
blaney_criddle(x)
## S4 method for signature 'character'
blaney_criddle(x)
## S4 method for signature 'data.table'
blaney_criddle(x)
Arguments
x |
Raster* object, character file path, or data.table (see details) |
Details
For Raster input, provide a raster object or file path for average temperature. For 'data.table' input, provide a table with columns: "lon", "lat", "date", and "tavg".
Value
RasterBrick or data.table of PET values (mm/day)
Calculate Net Radiation (Rn)
Description
Computes net radiation (Rn) based on solar radiation, temperature, and elevation.
Usage
calc_rn(tmax, tmin, rs, elevation, albedo = 0.23, x = NULL)
## S4 method for signature 'missing,missing,missing,missing,missing'
calc_rn(x)
## S4 method for signature 'Raster,Raster,Raster,Raster,ANY'
calc_rn(tmax, tmin, rs, elevation, albedo = 0.23, x = NULL)
## S4 method for signature 'character,character,character,character,ANY'
calc_rn(tmax, tmin, rs, elevation, albedo = 0.23, x = NULL)
Arguments
tmax |
Raster* object or file path for maximum temperature (°C) |
tmin |
Raster* object or file path for minimum temperature (°C) |
rs |
Raster* object or file path for solar radiation (MJ m-2 day-1) |
elevation |
Raster* object or file path for elevation (m) |
albedo |
Numeric, Raster*, or file path for albedo (optional, default = 0.23) |
x |
A 'data.table' with columns: "lon", "lat", "date", "rs", "tmax", "tmin", "elevation", and optionally "albedo" |
Details
For raster inputs, provide individual raster objects or file paths for 'tmax', 'tmin', 'rs', 'elevation', and optionally 'albedo'. For 'data.table' input, provide a single 'data.table' with columns: "lon", "lat", "date", "rs", "tmax", "tmin", "elevation", and optionally "albedo".
Value
RasterBrick or data.table of net radiation values (MJ m-2 day-1)
Examples
# Example using Raster* input
if (requireNamespace("raster", quietly = TRUE)) {
tmax_path <- file.path(tempdir(), "tmax.nc")
tmin_path <- file.path(tempdir(), "tmin.nc")
rs_path <- file.path(tempdir(), "rs.nc")
elev_path <- file.path(tempdir(), "elevation.nc")
if (file.exists(tmax_path) && file.exists(tmin_path) &&
file.exists(rs_path) && file.exists(elev_path)) {
tmax <- raster::brick(tmax_path)
tmin <- raster::brick(tmin_path)
rs <- raster::brick(rs_path)
elev <- raster::brick(elev_path)
rn <- calc_rn(tmax = tmax, tmin = tmin, rs = rs, elevation = elev)
}
}
# Example using data.table input
if (requireNamespace("data.table", quietly = TRUE)) {
dt <- data.table::data.table(
lon = c(10.0, 10.5),
lat = c(45.0, 45.5),
date = as.Date(c("2001-06-01", "2001-06-01")),
tmax = c(28.3, 27.6),
tmin = c(14.1, 13.5),
rs = c(22.5, 21.9),
elevation = c(400, 420)
)
rn_dt <- calc_rn(x = dt)
}
Calculate Wind Speed at 2 Meters (u2)
Description
Computes wind speed at 2 meters (u2) based on wind speed measured at a different height ('z_u').
Usage
calc_u2(x, z_u = 10)
## S4 method for signature 'Raster'
calc_u2(x, z_u = 10)
## S4 method for signature 'character'
calc_u2(x, z_u = 10)
## S4 method for signature 'data.table'
calc_u2(x, z_u = 10)
Arguments
x |
A 'Raster*' object, a file path ('character') to a raster file, or a 'data.table' containing wind speed data. |
z_u |
Measurement height (m) of the provided wind speed. Default is 10. |
Details
For raster inputs, provide a 'Raster*' object or file path ('character') for wind speed at height 'z_u'. For 'data.table' input, provide a single 'data.table' with columns: '"lon"', '"lat"', '"date"', and '"value"', where '"value"' contains wind speeds at height 'z_u'.
If 'z_u' is 2, the function returns the input unchanged.
Value
Wind speed adjusted to 2 meters, returned as:
A 'RasterBrick', if input is a raster object or file path.
A 'data.table' with updated '"value"' column, if input is a 'data.table'.
Examples
# Raster input
if (requireNamespace("raster", quietly = TRUE)) {
wind_path <- file.path(tempdir(), "wind_speed.nc")
if (file.exists(wind_path)) {
dummie_u <- raster::brick(wind_path)
u2_raster <- calc_u2(dummie_u, z_u = 10)
}
}
# File path input
wind_path <- file.path(tempdir(), "wind_speed.nc")
if (file.exists(wind_path)) {
u2_from_file <- calc_u2(wind_path, z_u = 10)
}
# data.table input
if (requireNamespace("data.table", quietly = TRUE)) {
dt <- data.table::data.table(
lon = c(10.0, 10.5),
lat = c(45.0, 45.5),
date = as.Date(c("2001-06-01", "2001-06-02")),
value = c(3.5, 4.1)
)
u2_dt <- calc_u2(dt, z_u = 10)
}
Day Length
Description
Calculate Day Length for a given raster template
Usage
day_length(x)
Arguments
x |
a character string with the path to the data file. |
Value
data.table
Detect Extreme Evaporation Events (ExEvE)
Description
The function detect_exeve
identifies extreme evaporation events based
on standardized evaporation and extreme thresholds.
Usage
detect_exeve(x, EXTREMES_THRES = 0.95, LOW_THRES = 0.8)
Arguments
x |
A |
EXTREMES_THRES |
Numeric. Quantile threshold used to define extreme evaporation events. Default is 0.95. |
LOW_THRES |
Numeric. Lower quantile threshold. Default is 0.80. |
Value
A data.table
with original columns and added columns:
-
std_value
— standardized evaporation -
pentad_std_q80
,pentad_std_q95
— pentad thresholds -
value_above_low_thres
,extreme
,evap_event
— flags -
above_low_thres_id
,extreme_id
,event_id
— event group IDs
Examples
# Example using an RDS file (only run if file exists)
evap_path <- file.path(tempdir(), "czechia_evap_gleam.rds")
if (file.exists(evap_path)) {
evap <- readRDS(evap_path)
events <- detect_exeve(evap)
}
All data downloader
Description
Downloading all datasets
Usage
download_all(path = "", domain = "raw", time_res = "monthly", variable = "e")
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
Value
No return value, called to download the data set.
BESS data downloader
Description
Downloading BESS evapotranspiration data
Usage
download_bess(path = "", domain = "raw", time_res = "monthly", variable = "e")
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
Value
No return value, called to download the data set.
CAMELE data downloader
Description
Downloading CAMELE evapotranspiration data
Usage
download_camele(
path = "",
domain = "raw",
time_res = "monthly",
variable = "e"
)
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
Value
No return value, called to download the data set.
Download various evapotranspiration data products
Description
The function download_data
downloads the selected data product.
Usage
download_data(
data_name = "all",
path = "",
domain = "raw",
time_res = "monthly",
variable = "e"
)
Arguments
data_name |
a character string with the name(s) of the desired data set. Suitable options are:
|
path |
a character string with the path where the database will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string specifying the variable to download (default = "e"). |
Value
No return value, called to download the required data sets.
Examples
download_data("gldas-vic-v2-1", tempdir())
ERA5 data downloader
Description
Downloading ERA5 evapotranspiration data
Usage
download_era5(path = "", domain = "raw", time_res = "monthly", variable = "e")
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
Value
No return value, called to download the data set.
ERA5-Land data downloader
Description
Downloading ERA5-Land evapotranspiration data
Usage
download_era5_land(
path = "",
domain = "raw",
time_res = "monthly",
variable = "e"
)
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
Value
No return value, called to download the data set.
ETMonitor data downloader
Description
Downloading ETMonitor evapotranspiration data
Usage
download_etmonitor(
path = "",
domain = "raw",
time_res = "monthly",
variable = "e"
)
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
Value
No return value, called to download the data set.
ETSynthesis data downloader
Description
Downloading ETSynthesis evapotranspiration data
Usage
download_etsynthesis(
path = "",
domain = "raw",
time_res = "monthly",
variable = "e"
)
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
Value
No return value, called to download the data set.
FLDAS data downloader
Description
Downloading FLDAS evapotranspiration data
Usage
download_fldas(path = "", domain = "raw", time_res = "monthly", variable = "e")
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
Value
No return value, called to download the data set.
GLDAS_CLSM data downloader
Description
Downloading GLDAS CLSM evapotranspiration data
Usage
download_gldas_clsm(
path = "",
domain = "raw",
time_res = "monthly",
variable = "e",
version = ""
)
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
version |
an optional character string for the version. Suitable options are:
|
Value
No return value, called to download the data set.
GLDAS_NOAH data downloader
Description
Downloading GLDAS NOAH evapotranspiration data
Usage
download_gldas_noah(
path = "",
domain = "raw",
time_res = "monthly",
variable = "e",
version = ""
)
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
version |
an optional character string for the version. Suitable options are:
|
Value
No return value, called to download the data set.
GLDAS_VIC data downloader
Description
Downloading GLDAS VIC evapotranspiration data
Usage
download_gldas_vic(
path = "",
domain = "raw",
time_res = "monthly",
variable = "e",
version = ""
)
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
version |
an optional character string for the version. Suitable options are:
|
Value
No return value, called to download the data set.
GLEAM data downloader
Description
Downloading GLEAM evapotranspiration data
Usage
download_gleam(
path = "",
domain = "raw",
time_res = "monthly",
variable = "e",
version = ""
)
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
version |
an optional character string for the version. Suitable options are:
|
Value
No return value, called to download the data set.
JRA-55 data downloader
Description
Downloading JRA-55 evapotranspiration data
Usage
download_jra55(path = "", domain = "raw", time_res = "monthly", variable = "e")
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
Value
No return value, called to download the data set.
MERRA-2 data downloader
Description
Downloading MERRA-2 evapotranspiration data
Usage
download_merra2(
path = "",
domain = "raw",
time_res = "monthly",
variable = "e"
)
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
Value
No return value, called to download the data set.
SITH-V2 data downloader
Description
Downloading SITH-V2 evapotranspiration data
Usage
download_sith(path = "", domain = "raw", time_res = "monthly", variable = "e")
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
Value
No return value, called to download the data set.
Temperature Data Downloader
Description
Downloading Temperature data from different datasets
Usage
download_t_data(
data_name,
path = "",
domain = "raw",
time_res = "monthly",
variable = "all"
)
Arguments
data_name |
a character string indicating the dataset to download. Suitable options are:
|
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string indicating the variable to download. Suitable options are: For TerraClimate dataset:
Use "all" to download all available variables for the dataset. |
Value
No return value, called to download the required data sets.
Examples
download_t_data("cru", tempdir())
TerraClimate data downloader
Description
Downloading TerraClimate evapotranspiration data
Usage
download_terraclimate(
path = "",
domain = "raw",
time_res = "monthly",
variable = "e"
)
Arguments
path |
a character string with the path where the data will be downloaded. |
domain |
a character string with the desired domain data set. Suitable options are:
|
time_res |
a character string with the desired time resolution. Suitable options are:
|
variable |
a character string for the variable. Suitable options are:
|
Value
No return value, called to download the data set.
Calculate Extraterrestrial Solar Radiation (ESR)
Description
Computes extraterrestrial solar radiation (MJ m-2 day-1) based on latitude and day of the year.
Usage
esr(x)
## S4 method for signature 'Raster'
esr(x)
## S4 method for signature 'character'
esr(x)
Arguments
x |
A 'Raster*' object or a file path ('character') to a raster file. |
Details
For raster inputs, provide a 'Raster*' object or file path ('character') The function estimates extraterrestrial radiation.
Value
A 'RasterBrick' of daily extraterrestrial solar radiation (MJ m-2 day-1).
Extraterrestrial Solar Radiation (ESR) Dates
Description
Fix dates for best ESR estimates
Usage
esr_dates(x)
Arguments
x |
a character string with the path to the data file. |
Value
data.table
Monthly Evapotranspiration data
Description
A subset of GLDAS CLSM monthly Evapotranspiration data in mm over Spain. More detail about raw data can be found here.
Usage
gldas_clsm_esp_ts
Format
A data.table with 120 obs. of 2 variables:
- date
IDate format %Y-%m-%d
- value
monthly average values
Source
National Aeronautics and Space Administration (NASA)
Monthly Evapotranspiration data
Description
Global GLDAS monthly Evapotranspiration data in mm. More details of the raw data can be found here.
Usage
gldas_clsm_global_ts
Format
A data.table with 120 obs. of 2 variables:
- date
IDate format %Y-%m-%d
- value
monthly average values
Source
National Aeronautics and Space Administration (NASA)
Monthly Evapotranspiration data
Description
A subset of GLDAS monthly Evapotranspiration data in mm over -10-40E, 30-45N. More details of the raw data can be found here.
Usage
gldas_clsm_subset_ts
Format
A data.table with 120 obs. of 2 variables:
- date
IDate format %Y-%m-%d
- value
monthly average values
Source
National Aeronautics and Space Administration (NASA)
Calculate Potential Evapotranspiration (PET) using Hamon method
Description
The function hamon
computes PET using the Hamon method.
Usage
hamon(x)
## S4 method for signature 'Raster'
hamon(x)
## S4 method for signature 'character'
hamon(x)
## S4 method for signature 'data.table'
hamon(x)
Arguments
x |
Raster* object, character file path, or data.table (see details) |
Details
For Raster input, provide a raster object or file path for average temperature. For 'data.table' input, provide a table with columns: "lon", "lat", "date", and "tavg".
Value
RasterBrick or data.table of PET values (mm/day)
Calculate Potential Evapotranspiration (PET) using Hargreaves-Samani method
Description
The function hargreaves_samani
computes PET using the Hargreaves and Samani method.
Usage
hargreaves_samani(tavg, tmax, tmin, x = NULL)
## S4 method for signature 'Raster,Raster,Raster'
hargreaves_samani(tavg, tmax, tmin, x = NULL)
## S4 method for signature 'character,character,character'
hargreaves_samani(tavg, tmax, tmin, x = NULL)
## S4 method for signature 'missing,missing,missing'
hargreaves_samani(x)
Arguments
tavg |
Raster* object or file path; average temperature (°C) |
tmax |
Raster* object or file path; maximum temperature (°C) |
tmin |
Raster* object or file path; minimum temperature (°C) |
x |
A 'data.table' with columns: "lon", "lat", "date", "tavg", "tmin", "tmax". |
Details
For Raster inputs, provide raster objects or file paths for average ('tavg'), maximum ('tmax'), and minimum ('tmin') temperature. For 'data.table' input, provide a table with columns: "lon", "lat", "date", "tavg", "tmin", and "tmax".
Value
RasterBrick or data.table of PET values (mm/day)
Annual Heat Index
Description
Calculate Annual Heat Index
Usage
heat_index(x)
Arguments
x |
a character string with the path to the data file. |
Value
data.table
Calculate Potential Evapotranspiration (PET) using Jensen-Haise method
Description
The function jensen_haise
computes PET using the Jensen-Haise method.
Usage
jensen_haise(x)
## S4 method for signature 'Raster'
jensen_haise(x)
## S4 method for signature 'character'
jensen_haise(x)
## S4 method for signature 'data.table'
jensen_haise(x)
Arguments
x |
Raster* object, character file path, or data.table (see details) |
Details
For Raster input, provide a raster object or file path for average temperature. For 'data.table' input, provide a table with columns: "lon", "lat", "date", and "tavg".
Value
RasterBrick or data.table of PET values (mm/day)
Calculate Potential Evapotranspiration (PET) using McGuinness-Bordne method
Description
The function mcguinness_bordne
computes PET using the McGuinness and Bordne method.
Usage
mcguinness_bordne(x)
## S4 method for signature 'Raster'
mcguinness_bordne(x)
## S4 method for signature 'character'
mcguinness_bordne(x)
## S4 method for signature 'data.table'
mcguinness_bordne(x)
Arguments
x |
Raster* object, character file path, or data.table (see details) |
Details
For Raster input, provide a raster object or file path for average temperature. For 'data.table' input, provide a table with columns: "lon", "lat", "date", and "tavg".
Value
RasterBrick or data.table of PET values (mm/day)
Calculate Potential Evapotranspiration (PET) using Oudin method
Description
The function oudin
computes PET using the Oudin method.
Usage
oudin(x)
## S4 method for signature 'Raster'
oudin(x)
## S4 method for signature 'data.table'
oudin(x)
## S4 method for signature 'character'
oudin(x)
Arguments
x |
Raster* object, character file path, or data.table (see details) |
Details
For Raster inputs, provide a raster object or file path for average temperature. For 'data.table' input, provide a table with columns: "lon", "lat", "date", and "tavg".
Value
RasterBrick or data.table of PET values (mm/day)
Calculate Potential Evapotranspiration (PET) using FAO Penman-Monteith
Description
The function penman_monteith_f56
computes PET by FAO Penman-Monteith method.
Usage
penman_monteith_f56(
tavg,
tmin,
tmax,
rn,
u,
tdew,
elevation = NULL,
pres = NULL,
x = NULL
)
## S4 method for signature
## 'missing,missing,missing,missing,missing,missing,missing,missing'
penman_monteith_f56(x)
## S4 method for signature 'Raster,Raster,Raster,Raster,Raster,Raster,ANY,ANY'
penman_monteith_f56(
tavg,
tmin,
tmax,
rn,
u,
tdew,
elevation = NULL,
pres = NULL,
x = NULL
)
## S4 method for signature
## 'character,character,character,character,character,character,ANY,ANY'
penman_monteith_f56(
tavg,
tmin,
tmax,
rn,
u,
tdew,
elevation = NULL,
pres = NULL,
x = NULL
)
Arguments
tavg |
Raster* object or file path; average temperature (°C) |
tmin |
Raster* object or file path; minimum temperature (°C) |
tmax |
Raster* object or file path; maximum temperature (°C) |
rn |
Raster* object or file path; net radiation (MJ m-2 day-1) |
u |
Raster* object or file path; wind speed at 2 meters (m/s) |
tdew |
Raster* object or file path; dew point temperature (°C) |
elevation |
Raster* object or file path; elevation (m). Optional if 'pres' is provided. |
pres |
Optional. Raster* object or file path; atmospheric pressure (kPa) |
x |
A 'data.table' with columns: "lon", "lat", "date", "tavg", "tmin", "tmax", "rn", "u", "tdew", and either "elevation" or "pres". |
Details
For Raster inputs, provide raster objects or file paths for 'tavg', 'tmin', 'tmax', 'rn', 'u', 'tdew', and either 'elevation' or 'pres'. For data.table input, provide a single 'data.table' with columns: "lon", "lat", "date", "tavg", "tmin", "tmax", "rn", "u", "tdew", and either "elevation" or "pres".
Value
RasterBrick or data.table of PET values (mm/day)
Potential Evapotranspiration
Description
The function pet
estimates PET using various methods.
Usage
pet(method = "oudin", ...)
Arguments
method |
Character string indicating the PET estimation method. Available options include:
|
... |
Inputs passed to the selected method. These can be:
|
Details
For single-input methods (e.g., Oudin), you can pass the input directly.
For multi-input methods (e.g., Penman-Monteith), use named arguments or a data.table.
Use pet_method_requirements()
to check required variables.
Value
A 'Raster*' object in mm/day (if raster-based inputs) or a 'data.table'
with columns lon
, lat
, date
, and value
(PET in mm/day).
Examples
# Oudin method with NetCDF path
tavg_path <- file.path(tempdir(), "tavg.nc")
if (file.exists(tavg_path)) {
pet_od <- pet(method = "oudin", x = tavg_path)
pet_od <- muldpm(pet_od)
}
# Oudin method with raster
if (requireNamespace("raster", quietly = TRUE)) {
if (file.exists(tavg_path)) {
tavg <- raster::brick(tavg_path)
pet_od <- pet("oudin", tavg)
pet_od <- muldpm(pet_od)
}
}
# Oudin method with data.table
if (requireNamespace("data.table", quietly = TRUE)) {
dt <- data.table::data.table(
lon = c(10.0, 10.5),
lat = c(45.0, 45.5),
date = as.Date(c("2001-06-01", "2001-06-02")),
tavg = c(18.5, 19.2)
)
pet_od <- pet(method = "oudin", x = dt)
pet_od <- muldpm(pet_od)
}
# Hargreaves-Samani method with multiple raster inputs
tmax_path <- file.path(tempdir(), "tmax.nc")
tmin_path <- file.path(tempdir(), "tmin.nc")
if (requireNamespace("raster", quietly = TRUE)) {
if (file.exists(tavg_path) && file.exists(tmax_path) && file.exists(tmin_path)) {
tavg <- raster::brick(tavg_path)
tmax <- raster::brick(tmax_path)
tmin <- raster::brick(tmin_path)
pet_hs <- pet(method = "hargreaves_samani", tavg = tavg, tmin = tmin, tmax = tmax)
pet_hs <- muldpm(pet_hs)
}
}
Required Input Variables for PET Methods
Description
This function returns the required input variables for a given PET method, or all methods if none is specified.
Usage
pet_method_requirements(x = NULL)
Arguments
x |
Optional. A character string naming a PET method. If NULL (default), the function returns a named list of all available methods and their required input variables. |
Value
A character vector of required input variables (if x
is
provided), or a named list of all PET methods and their required inputs
(if x
is NULL).
Examples
# PET method requirements
pet_method_requirements()
Monthly Potential Evapotranspiration data
Description
A subset of calculated monthly Potential Evapotranspiration data in mm over Spain. More details of the used method can be found ‘https://www.sciencedirect.com/science/article/pii/S0022169404004056’.
Usage
pet_oudin_esp_ts
Format
A data.table with 120 obs. of 2 variables:
- date
IDate format %Y-%m-%d
- value
monthly average values
Source
Data was calculated using the Oudin method based on raw temperature data. More details of the raw data can be found ‘https://journals.ametsoc.org/view/journals/bams/103/3/BAMS-D-21-0145.1.xml’.
Monthly Potential Evapotranspiration data
Description
Monthly Potential Evapotranspiration data in mm calculated by Oudin method. More details of the used method can be found ‘https://www.sciencedirect.com/science/article/pii/S0022169404004056’.
Usage
pet_oudin_global_ts
Format
A data.table with 120 obs. of 2 variables:
- date
IDate format %Y-%m-%d
- value
monthly average values
Source
Data was calculated using the Oudin method based on raw temperature data. More details of the raw data can be found ‘https://journals.ametsoc.org/view/journals/bams/103/3/BAMS-D-21-0145.1.xml’.
Monthly Potential Evapotranspiration data
Description
A subset of Monthly Potential Evapotranspiration data in mm calculated by Oudin method over -10-40E, 30-45N. More details of the used method can be found ‘https://www.sciencedirect.com/science/article/pii/S0022169404004056’.
Usage
pet_oudin_subset_ts
Format
A data.table with 120 obs. of 2 variables:
- date
IDate format %Y-%m-%d
- value
monthly average values
Source
Data was calculated using the Oudin method based on raw temperature data. More details of the raw data can be found ‘https://journals.ametsoc.org/view/journals/bams/103/3/BAMS-D-21-0145.1.xml’.
Potential Evapotranspiration (PET) Parameters
Description
Calculate parameters related to PET, including 'esr_date', 'omega', 'ext_rad', 'delta','lat_rad', and, 'dr'
Usage
pet_params_calc(x)
Arguments
x |
a data.table, its columns should be named: "lon", "lat", "date", and "value". |
Value
data.table
Calculate Potential Evapotranspiration (PET) using Priestley-Taylor Method
Description
The function priestley_taylor
computes PET by Priestley-Taylor method.
Usage
priestley_taylor(tavg, rn, elevation = NULL, pres = NULL, x = NULL)
## S4 method for signature 'missing,missing,missing,missing'
priestley_taylor(x)
## S4 method for signature 'Raster,Raster,ANY,ANY'
priestley_taylor(tavg, rn, elevation = NULL, pres = NULL, x = NULL)
## S4 method for signature 'character,character,ANY,ANY'
priestley_taylor(tavg, rn, elevation = NULL, pres = NULL, x = NULL)
Arguments
tavg |
Raster* object or file path; average temperature (°C) |
rn |
Raster* object or file path; net radiation (MJ m-2 day-1) |
elevation |
Raster* object or file path; elevation (m). Optional if 'pres' is provided. |
pres |
Optional. Raster* object or file path; atmospheric pressure (kPa) |
x |
A 'data.table' with columns: "lon", "lat", "date", "tavg", "rn", and either "elevation" or "pres". |
Details
For Raster inputs, provide raster objects or file paths for 'tavg', 'rn', and either 'elevation' or 'pres'. For 'data.table' input, provide a single 'data.table' with columns: "lon", "lat", "date", "tavg", "rn", and either "elevation" or "pres".
Value
RasterBrick or data.table of PET values (mm/day)
Objects exported from other packages
Description
These objects are imported from other packages. Follow the links below to see their documentation.
- twc
crop_data
,fldmean
,infoNC
,muldpm
,pRecipe_masks
,remap
,saveNC
,subset_data
,tabular
,trend
,yearstat
Calculate Potential Evapotranspiration (PET) using Thornthwaite method
Description
The function thornthwaite
computes PET using the Thornthwaite method.
Usage
thornthwaite(x)
## S4 method for signature 'Raster'
thornthwaite(x)
## S4 method for signature 'character'
thornthwaite(x)
## S4 method for signature 'data.table'
thornthwaite(x)
Arguments
x |
Raster* object, character file path, or data.table (see details) |
Details
For Raster input, provide a raster object or file path for average temperature. For 'data.table' input, provide a table with columns: "lon", "lat", "date", and "tavg".
Value
RasterBrick or data.table of PET values (mm/day)
Calculate Potential Evapotranspiration (PET) using the Turc Method
Description
The function turc
Computes PET using the Turc formula.
Usage
turc(tavg, rs, rh, x = NULL)
## S4 method for signature 'missing,missing,missing'
turc(x)
## S4 method for signature 'Raster,Raster,Raster'
turc(tavg, rs, rh, x = NULL)
## S4 method for signature 'character,character,character'
turc(tavg, rs, rh, x = NULL)
Arguments
tavg |
Raster* object or file path; average temperature (°C) |
rs |
Raster* object or file path; shortwave radiation (MJ m-2 day-1) |
rh |
Raster* object or file path; relative humidity (percent) |
x |
A 'data.table' with columns: "lon", "lat", "date", "tavg", "rs", and "rh" |
Details
For Raster inputs, provide raster objects or file paths for 'tavg', 'rs', and 'rh'. For data.table input, provide a single 'data.table' with columns: "lon", "lat", "date", "tavg", "rs", and "rh".
Value
RasterBrick or data.table of PET values (mm/day)