Title: | Climate Water Balance for Irrigation Purposes |
---|---|
Description: | Calculates daily climate water balance for irrigation purposes and also calculates the reference evapotranspiration (ET) using three methods, Penman and Monteith (Allen et al. 1998, ISBN:92-5-104219-5); Priestley and Taylor (1972) <doi:10/cr3qwn>; or Hargreaves and Samani (1985) <doi:10.13031/2013.26773>. Users may specify a management allowed depletion (MAD), which is used to suggest when to irrigate. The functionality allows for the use of crop and water stress coefficients as well. |
Authors: | Gabriel Constantino Blain [aut, cre]
|
Maintainer: | Gabriel Constantino Blain <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.0.9000 |
Built: | 2025-02-21 04:30:14 UTC |
Source: | https://github.com/gabrielblain/cropwaterbalance |
Calculates measures of accuracy and agreement.
Compare(Sample1, Sample2)
Compare(Sample1, Sample2)
Sample1 |
A |
Sample2 |
A |
A data.frame
with:
Absolute mean error (AME),
square root of the mean squared error (RMSE),
Willmott's indices of agreement:
original (dorig),
modified (dmod) and
refined (dref)
, and
Pearson determination coefficient (RQuad).
# See `?DataForCWB` for more on this data set Tavg <- DataForCWB[, 2] Tmax <- DataForCWB[, 3] Tmin <- DataForCWB[, 4] Rn <- DataForCWB[, 6] WS <- DataForCWB[, 7] RH <- DataForCWB[, 8] G <- DataForCWB[, 9] Sample1 <- ET0_PM( Tavg = Tavg, Tmax = Tmax, Tmin = Tmin, Rn = Rn, RH = RH, WS = WS, G = G, Alt = 700) Sample2 <- ET0_PT(Tavg = Tavg, Rn = Rn, G = G) Compare(Sample1 = Sample1, Sample2 = Sample2)
# See `?DataForCWB` for more on this data set Tavg <- DataForCWB[, 2] Tmax <- DataForCWB[, 3] Tmin <- DataForCWB[, 4] Rn <- DataForCWB[, 6] WS <- DataForCWB[, 7] RH <- DataForCWB[, 8] G <- DataForCWB[, 9] Sample1 <- ET0_PM( Tavg = Tavg, Tmax = Tmax, Tmin = Tmin, Rn = Rn, RH = RH, WS = WS, G = G, Alt = 700) Sample2 <- ET0_PT(Tavg = Tavg, Rn = Rn, G = G) Compare(Sample1 = Sample1, Sample2 = Sample2)
Calculates several parameters of the crop water balance. It also suggests when to irrigate.
CWB( Rain, ET0, AWC, Drz, Kc = NULL, Irrig = NULL, MAD = NULL, InitialD = 0, start.date )
CWB( Rain, ET0, AWC, Drz, Kc = NULL, Irrig = NULL, MAD = NULL, InitialD = 0, start.date )
Rain |
A |
ET0 |
A |
AWC |
A |
Drz |
A |
Kc |
A |
Irrig |
A |
MAD |
A |
InitialD |
Single number defining in millimetres, the initial soil water deficit. It is used to start the water balance accounting. Default value is 0, which assumes the root zone is at the field capacity. |
start.date |
Date at which the accounting should start. Formats: “YYYY-MM-DD”, “YYYY/MM/DD”. |
A data.frame
of water balance accounting, including the soil water deficit.
Tavg <- DataForCWB[,2] Tmax <- DataForCWB[,3] Tmin <- DataForCWB[,4] Rn <- DataForCWB[,6] WS <- DataForCWB[,7] RH <- DataForCWB[,8] G <- DataForCWB[,9] ET0 <- ET0_PM(Tavg, Tmax, Tmin, Rn, RH, WS, G, Alt = 700) Rain <- DataForCWB[,10] Drz <- DataForCWB[,11] AWC <- DataForCWB[,12] MAD <- DataForCWB[,13] Kc <- DataForCWB[,14] Irrig <- DataForCWB[,15] CWB(Rain = Rain, ET0 = ET0, AWC = AWC, Drz = Drz, Kc = Kc, Irrig = Irrig, MAD = MAD, start.date = "2023-11-23")
Tavg <- DataForCWB[,2] Tmax <- DataForCWB[,3] Tmin <- DataForCWB[,4] Rn <- DataForCWB[,6] WS <- DataForCWB[,7] RH <- DataForCWB[,8] G <- DataForCWB[,9] ET0 <- ET0_PM(Tavg, Tmax, Tmin, Rn, RH, WS, G, Alt = 700) Rain <- DataForCWB[,10] Drz <- DataForCWB[,11] AWC <- DataForCWB[,12] MAD <- DataForCWB[,13] Kc <- DataForCWB[,14] Irrig <- DataForCWB[,15] CWB(Rain = Rain, ET0 = ET0, AWC = AWC, Drz = Drz, Kc = Kc, Irrig = Irrig, MAD = MAD, start.date = "2023-11-23")
Calculates several parameters of the crop water balance. It also suggests how much irrigation to apply.
CWB_FixedSchedule( Rain, ET0, AWC, Drz, Kc = NULL, Irrig = NULL, MAD = NULL, InitialD = 0, Scheduling, start.date )
CWB_FixedSchedule( Rain, ET0, AWC, Drz, Kc = NULL, Irrig = NULL, MAD = NULL, InitialD = 0, Scheduling, start.date )
Rain |
Vector, 1-column matrix or data frame with daily rainfall totals in millimetres. |
ET0 |
Vector, 1-column matrix or data frame with daily reference evapotranspiration in millimetres. |
AWC |
Vector, 1-column matrix or data frame with the available water capacity of the soil, that is: the amount of water between field capacity and permanent wilting point in millimetres of water per metres of soil. |
Drz |
Vector, 1-column matrix or data frame defining the root zone depth in metres. |
Kc |
Vector, 1-column matrix or data frame defining the crop coefficient. If NULL its values are assumed to be 1. |
Irrig |
Vector, 1-column matrix or data frame with net irrigation amount infiltrated into the soil for the current day in millimetres. |
MAD |
Vector, 1-column matrix or data frame defining the management allowed depletion. Varies between 0 and 1. |
InitialD |
Single number defining in millimetre, the initial soil water deficit. It is used to start the water balance accounting. Default value is zero, which assumes the root zone is at the field capacity. |
Scheduling |
Single integer number defining the number of days between two consecutive irrigations. |
start.date |
Date at which the accounting should start. Formats: “YYYY-MM-DD”, “YYYY/MM/DD”. |
Water balance accounting, including the soil water deficit.
Tavg <- DataForCWB[, 2] Tmax <- DataForCWB[, 3] Tmin <- DataForCWB[, 4] Rn <- DataForCWB[, 6] WS <- DataForCWB[, 7] RH <- DataForCWB[, 8] G <- DataForCWB[, 9] ET0 <- ET0_PM(Tavg, Tmax, Tmin, Rn, RH, WS, G, Alt = 700) Rain <- DataForCWB[, 10] Drz <- DataForCWB[, 11] AWC <- DataForCWB[, 12] MAD <- DataForCWB[, 13] Kc <- DataForCWB[, 14] Irrig <- DataForCWB[, 15] Scheduling <- 5 CWB_FixedSchedule( Rain = Rain, ET0 = ET0, AWC = AWC, Drz = Drz, Kc = Kc, Irrig = Irrig, MAD = MAD, Scheduling = Scheduling, start.date = "2023-11-23" )
Tavg <- DataForCWB[, 2] Tmax <- DataForCWB[, 3] Tmin <- DataForCWB[, 4] Rn <- DataForCWB[, 6] WS <- DataForCWB[, 7] RH <- DataForCWB[, 8] G <- DataForCWB[, 9] ET0 <- ET0_PM(Tavg, Tmax, Tmin, Rn, RH, WS, G, Alt = 700) Rain <- DataForCWB[, 10] Drz <- DataForCWB[, 11] AWC <- DataForCWB[, 12] MAD <- DataForCWB[, 13] Kc <- DataForCWB[, 14] Irrig <- DataForCWB[, 15] Scheduling <- 5 CWB_FixedSchedule( Rain = Rain, ET0 = ET0, AWC = AWC, Drz = Drz, Kc = Kc, Irrig = Irrig, MAD = MAD, Scheduling = Scheduling, start.date = "2023-11-23" )
AWC is the amount of water between field capacity and permanent wilting point. Given in millimetre of water per metre of soil.
DataForAWC
DataForAWC
A data frame with 4 columns and 12 rows:
Soil Texture
Available water capacity in millimetre of water per centimetre of soil
Available water capacity in millimetre of water per centimetre of soil
Available water capacity in millimetre of water per metre of soil
Irrigation Scheduling: The Water Balance Approach Fact Sheet No. 4.707 by A. A. Andales, J. L. Chávez, T. A. Bauder.
Daily meteorological data from a weather station in Campinas, Brazil and other parameters required for calculating the crop water balance. The meteorological data belongs to the Agronomic Institute (IAC).
DataForCWB
DataForCWB
An object of class data.frame
with 129 rows and 15 columns.
@format ## DataForCWB
A data frame with 15 columns and 129 rows:
date
Average air temperature in Celsius degrees
Maximum air temperature in Celsius degrees
Minimum air temperature in Celsius degrees
Extraterrestrial solar radiation in MJ m-2 day-1
Net radiation in MJ m-2 day-1
Wind speed in m s-1
Relative Humidity in %
Soil Heat Flux in MJ m-2 day-1
Rain in millimetres
Depth of the root zone in metres
available water capacity (amount of water between field capacity and permanent wilting point) in millimetre of water per metre of soil
management allowed depletion (between 0 and 1)
Crop coefficient (between 0 and 1)
Applied net irrigation in millimetres
@source http://www.ciiagro.org.br/
Soil water content at field capacity and at permanent wilting point. Given in m-3 m-3. Extracted from: Allen, R.G.; Pereira, L.S.; Raes, D.; Smith, M. Crop evapotranspiration. In Guidelines for Computing Crop Water Requirements. Irrigation and Drainage Paper 56; FAO: Rome, Italy, 1998; p. 300.
DataForSWC
DataForSWC
An object of class data.frame
with 9 rows and 5 columns.
@format ## DataForSWC
A data frame with 5 columns and 9 rows:
Soil Type
Minimum values for soil water content at field capacity
Maximum values for soil water content at field capacity
Minimum values for soil water content at permanent wilting point
Maximum values for soil water content at permanent wilting point
@source https://www.fao.org/home/en/
Calculates descriptive statistics for rainfall, evapotranspiration, or other variables.
Descriptive(Sample)
Descriptive(Sample)
Sample |
A vector, 1-column matrix or data frame with rainfall, evapotranspiration, or other variable. |
A dataframe
with:
sample mean (Avg),
sample median (Med),
sample standard variation (SD)
sample standard Error (SE)
maximum value (MaxValue)
minimum value (MinValue)
frequency of zeros (FreqZero%)
Rain <- DataForCWB[, 10] Descriptive(Sample = Rain)
Rain <- DataForCWB[, 10] Descriptive(Sample = Rain)
Estimates initial values for soil water deficit. Required to initiate the water balance accounting.
Dinitial(teta_FC, teta_Obs, Drz)
Dinitial(teta_FC, teta_Obs, Drz)
teta_FC |
Soil water content for the effective root zone at the field capacity
|
teta_Obs |
Soil water content for the effective root zone at the wilting point
|
Drz |
Vector, 1-column matrix or data frame defining the root zone depth in metres. |
Initial soil water deficit in the root zone (millimetres).
teta_FC <- 0.30 teta_Obs <- 0.17 Drz <- 0.3048 Dinitial(teta_FC = teta_FC, teta_Obs = teta_Obs, Drz = Drz)
teta_FC <- 0.30 teta_Obs <- 0.17 Drz <- 0.3048 Dinitial(teta_FC = teta_FC, teta_Obs = teta_Obs, Drz = Drz)
Calculates daily reference evapotranspiration amounts using the Hargreaves-Samani method.
ET0_HS(Ra, Tavg, Tmax, Tmin)
ET0_HS(Ra, Tavg, Tmax, Tmin)
Ra |
A |
Tavg |
A |
Tmax |
A |
Tmin |
A |
A matrix
of 1-column with the same length as 'the input values with the
daily potential evapotranspiration values in millimetres.
# See `?DataForCWB` for more on this data set Tavg <- DataForCWB[, 2] Tmax <- DataForCWB[, 3] Tmin <- DataForCWB[, 4] Ra <- DataForCWB[, 5] ET0_HS(Ra = Ra, Tavg = Tavg, Tmax = Tmax, Tmin = Tmin)
# See `?DataForCWB` for more on this data set Tavg <- DataForCWB[, 2] Tmax <- DataForCWB[, 3] Tmin <- DataForCWB[, 4] Ra <- DataForCWB[, 5] ET0_HS(Ra = Ra, Tavg = Tavg, Tmax = Tmax, Tmin = Tmin)
Calculates daily reference evapotranspiration amounts using the Penman and Monteith method.
ET0_PM(Tavg, Tmax, Tmin, Rn, RH, WS, G = NULL, Alt)
ET0_PM(Tavg, Tmax, Tmin, Rn, RH, WS, G = NULL, Alt)
Tavg |
A vector, 1-column matrix or data frame with daily average air temperature. |
Tmax |
A vector, 1-column matrix or data frame with daily maximum air temperature in Celsius degrees. |
Tmin |
A vector, 1-column matrix or data frame with daily minimum air temperature in Celsius degrees. |
Rn |
A vector, 1-column matrix or data frame with daily net radiation in
|
RH |
A vector, 1-column matrix or data frame with daily relative Humidity in \%. |
WS |
A vector, 1-column matrix or data frame with daily wind speed in
|
G |
Optional. A vector, 1-column matrix or data frame with daily soil heat flux
in |
Alt |
A single number defining the altitude at crop's location in metres. |
A matrix of daily reference evapotranspiration amounts in millimetres.
# See `?DataForCWB` for more on this data set Tavg <- DataForCWB[, 2] Tmax <- DataForCWB[, 3] Tmin <- DataForCWB[, 4] Rn <- DataForCWB[, 6] WS <- DataForCWB[, 7] RH <- DataForCWB[, 8] G <- DataForCWB[, 9] ET0_PM(Tavg = Tavg, Tmax = Tmax, Tmin = Tmin, Rn = Rn, RH = RH, WS = WS, G = G, Alt = 700)
# See `?DataForCWB` for more on this data set Tavg <- DataForCWB[, 2] Tmax <- DataForCWB[, 3] Tmin <- DataForCWB[, 4] Rn <- DataForCWB[, 6] WS <- DataForCWB[, 7] RH <- DataForCWB[, 8] G <- DataForCWB[, 9] ET0_PM(Tavg = Tavg, Tmax = Tmax, Tmin = Tmin, Rn = Rn, RH = RH, WS = WS, G = G, Alt = 700)
Calculates daily reference evapotranspiration amounts using the Priestley-Taylor method.
ET0_PT(Tavg, Rn, G = NULL, Coeff = 1.26)
ET0_PT(Tavg, Rn, G = NULL, Coeff = 1.26)
Tavg |
A vector, 1-column matrix or data frame with daily average air temperature. |
Rn |
A vector, 1-column matrix or data frame with daily net radiation in
|
G |
Optional. A vector, 1-column matrix or data frame with daily soil heat flux
in |
Coeff |
Single number defining the Priestley and Taylor coefficient. Default is 1.26. |
A matrix object of the daily potential evapotranspiration values in millimetres.
# See `?DataForCWB` for more on this data set Tavg <- DataForCWB[, 2] Rn <- DataForCWB[, 6] G <- DataForCWB[, 9] ET0_PT(Tavg = Tavg, Rn = Rn, G = G)
# See `?DataForCWB` for more on this data set Tavg <- DataForCWB[, 2] Rn <- DataForCWB[, 6] G <- DataForCWB[, 9] ET0_PT(Tavg = Tavg, Rn = Rn, G = G)
Calculates the daily amounts of soil heat flux.
Soil_Heat_Flux(Tavg)
Soil_Heat_Flux(Tavg)
Tavg |
A vector, 1-column matrix or data frame with daily average air temperature. |
Daily amounts of soil heat flux in .
# See `?DataForCWB` for more on this data set Tavg <- DataForCWB[, 2] Soil_Heat_Flux(Tavg)
# See `?DataForCWB` for more on this data set Tavg <- DataForCWB[, 2] Soil_Heat_Flux(Tavg)