Package 'CropWaterBalance'

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] , Graciela R. Sobierajski [aut] , Regina C. Matos Pires [aut] , Adam H. Sparks [aut] , Leticia L. Martins [aut]
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

Help Index


Compare Data From Two Samples

Description

Calculates measures of accuracy and agreement.

Usage

Compare(Sample1, Sample2)

Arguments

Sample1

A vector, 1-column matrix or data.frame with evapotranspiration or other variable.

Sample2

A vector, 1-column matrix or data.frame with evapotranspiration or other variable.

Value

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).

Examples

# 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)

Crop Water Balance Accounting

Description

Calculates several parameters of the crop water balance. It also suggests when to irrigate.

Usage

CWB(
  Rain,
  ET0,
  AWC,
  Drz,
  Kc = NULL,
  Irrig = NULL,
  MAD = NULL,
  InitialD = 0,
  start.date
)

Arguments

Rain

A vector, 1-column matrix or data.frame with daily rainfall totals in millimetres.

ET0

A vector, 1-column matrix or data.frame with daily reference evapotranspiration in millimetres.

AWC

A 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 millimetre of water per metres of soil, must be greater than or equal to 0.

Drz

A vector, 1-column matrix or data.frame defining the root zone depth in metres.

Kc

A vector, 1-column matrix or data.frame defining the crop coefficient. If NULL its values are assumed to be 1.

Irrig

A vector, 1-column matrix or data.frame with net irrigation amount infiltrated into the soil for the current day in millimetres.

MAD

A vector, 1-column matrix or data.frame defining the management allowed depletion. Varies between 0 and 1.

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”.

Value

A data.frame of water balance accounting, including the soil water deficit.

Examples

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")

Crop Water Balance Accounting With Fixed Time Periods for Irrigation

Description

Calculates several parameters of the crop water balance. It also suggests how much irrigation to apply.

Usage

CWB_FixedSchedule(
  Rain,
  ET0,
  AWC,
  Drz,
  Kc = NULL,
  Irrig = NULL,
  MAD = NULL,
  InitialD = 0,
  Scheduling,
  start.date
)

Arguments

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”.

Value

Water balance accounting, including the soil water deficit.

Examples

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"
)

Soil Texture and Plant Available Water Capacity (AWC)

Description

AWC is the amount of water between field capacity and permanent wilting point. Given in millimetre of water per metre of soil.

Usage

DataForAWC

Format

A data frame with 4 columns and 12 rows:

Soil.Texture

Soil Texture

AWC.Low

Available water capacity in millimetre of water per centimetre of soil

AWC.High

Available water capacity in millimetre of water per centimetre of soil

AWC.Average

Available water capacity in millimetre of water per metre of soil

Source

https://extension.colostate.edu/topic-areas/agriculture/irrigation-scheduling-the-water-balance-approach-4-707/

References

Irrigation Scheduling: The Water Balance Approach Fact Sheet No. 4.707 by A. A. Andales, J. L. Chávez, T. A. Bauder.


Data for Water Balance Accounting

Description

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).

Usage

DataForCWB

Format

An object of class data.frame with 129 rows and 15 columns.

Details

@format ## DataForCWB A data frame with 15 columns and 129 rows:

date

date

tmed

Average air temperature in Celsius degrees

tmax

Maximum air temperature in Celsius degrees

tmin

Minimum air temperature in Celsius degrees

Ra

Extraterrestrial solar radiation in MJ m-2 day-1

Rn

Net radiation in MJ m-2 day-1

W

Wind speed in m s-1

RH

Relative Humidity in %

G

Soil Heat Flux in MJ m-2 day-1

Rain

Rain in millimetres

Drz

Depth of the root zone in metres

AWC

available water capacity (amount of water between field capacity and permanent wilting point) in millimetre of water per metre of soil

MAD

management allowed depletion (between 0 and 1)

Kc

Crop coefficient (between 0 and 1)

Irrig

Applied net irrigation in millimetres

@source http://www.ciiagro.org.br/


Typical Soil Water Characteristics for Different Soil Types (Teta)

Description

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.

Usage

DataForSWC

Format

An object of class data.frame with 9 rows and 5 columns.

Details

@format ## DataForSWC A data frame with 5 columns and 9 rows:

Soil type

Soil Type

Teta_FC_Min

Minimum values for soil water content at field capacity

Teta_FC_Max

Maximum values for soil water content at field capacity

Teta_PWP_Min

Minimum values for soil water content at permanent wilting point

Teta_PWP_Max

Maximum values for soil water content at permanent wilting point

@source https://www.fao.org/home/en/


Descriptive Statistics for Weather Variables

Description

Calculates descriptive statistics for rainfall, evapotranspiration, or other variables.

Usage

Descriptive(Sample)

Arguments

Sample

A vector, 1-column matrix or data frame with rainfall, evapotranspiration, or other variable.

Value

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%)

Examples

Rain <- DataForCWB[, 10]
Descriptive(Sample = Rain)

Soil Water Deficit in the Root Zone

Description

Estimates initial values for soil water deficit. Required to initiate the water balance accounting.

Usage

Dinitial(teta_FC, teta_Obs, Drz)

Arguments

teta_FC

Soil water content for the effective root zone at the field capacity m3/m3m3/m3

teta_Obs

Soil water content for the effective root zone at the wilting point m3/m3m3/m3

Drz

Vector, 1-column matrix or data frame defining the root zone depth in metres.

Value

Initial soil water deficit in the root zone (millimetres).

Examples

teta_FC <- 0.30
teta_Obs <- 0.17
Drz <- 0.3048
Dinitial(teta_FC = teta_FC, teta_Obs = teta_Obs, Drz = Drz)

Reference Evapotranspiration Using Hargreaves-Samani Method

Description

Calculates daily reference evapotranspiration amounts using the Hargreaves-Samani method.

Usage

ET0_HS(Ra, Tavg, Tmax, Tmin)

Arguments

Ra

A vector, 1-column matrix or data.frame with extraterrestrial solar radiation in MJ m-2 day-1.

Tavg

A vector, 1-column matrix or data.frame column 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.

Value

A matrix of 1-column with the same length as 'the input values with the daily potential evapotranspiration values in millimetres.

See Also

ET0_PM() ET0_PT()

Examples

# 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)

Reference Evapotranspiration Using the Penman and Monteith Method

Description

Calculates daily reference evapotranspiration amounts using the Penman and Monteith method.

Usage

ET0_PM(Tavg, Tmax, Tmin, Rn, RH, WS, G = NULL, Alt)

Arguments

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 MJm2day1MJ m-2 day-1.

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 ms1m s-1.

G

Optional. A vector, 1-column matrix or data frame with daily soil heat flux in MJm2day1MJ m-2 day-1. Default is NULL and if NULL it is assumed to be zero. May be provided by Soil_Heat_Flux

Alt

A single number defining the altitude at crop's location in metres.

Value

A matrix of daily reference evapotranspiration amounts in millimetres.

Examples

# 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)

Reference Evapotranspiration Using the Preistley-Taylor Method

Description

Calculates daily reference evapotranspiration amounts using the Priestley-Taylor method.

Usage

ET0_PT(Tavg, Rn, G = NULL, Coeff = 1.26)

Arguments

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 MJm2day1MJ m-2 day-1.

G

Optional. A vector, 1-column matrix or data frame with daily soil heat flux in MJm2day1MJ m-2 day-1. May be provided by Soil_Heat_Flux

Coeff

Single number defining the Priestley and Taylor coefficient. Default is 1.26.

Value

A matrix object of the daily potential evapotranspiration values in millimetres.

Examples

# 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)

Soil Heat Flux

Description

Calculates the daily amounts of soil heat flux.

Usage

Soil_Heat_Flux(Tavg)

Arguments

Tavg

A vector, 1-column matrix or data frame with daily average air temperature.

Value

Daily amounts of soil heat flux in MJm2day1MJ m-2 day-1.

Examples

# See `?DataForCWB` for more on this data set
Tavg <- DataForCWB[, 2]
Soil_Heat_Flux(Tavg)