Learn R Programming

Evapotranspiration (version 1.7)

ETComparison: Plot esimtated evapotranspiration with climate variables

Description

Produce comparison plots for results and statistics from different estimations produced by using different formulations and/or different input data. The number of different sets of results can be between 2 and 7. Plotting type can be selected among daily aggregation, monthly aggregation, annual aggregation, monthly average and annual average. For each type three comparison plots will be produced including time series, non-exceedance probability and box plot.

Usage

ETComparison(results1, results2, results3 = NULL, results4 = NULL, results5 = NULL, 
results6 = NULL, results7 = NULL, labs, Sdate = NULL, Edate = NULL, 
type = "Monthly", ylim = rep(NA,2))

Arguments

results1
A list named "results" which has been derived from function ET..() which can be of any class such as "Penman", "PenmanMonteith" and "PriestleyTaylor.
results2
A list named "results" which has been derived from function ET..() which can be of any class such as "Penman", "PenmanMonteith" and "PriestleyTaylor.
results3
A list named "results" which has been derived from function ET..() which can be of any class such as "Penman", "PenmanMonteith" and "PriestleyTaylor. The default is NULL if the user requires the comparison between only two sets of results.
results4
A list named "results" which has been derived from function ET..() which can be of any class such as "Penman", "PenmanMonteith" and "PriestleyTaylor. The default is NULL if the user requires the comparison among only three sets of results.
results5
A list named "results" which has been derived from function ET..() which can be of any class such as "Penman", "PenmanMonteith" and "PriestleyTaylor. The default is NULL if the user requires the comparison among only four sets of results.
results6
A list named "results" which has been derived from function ET..() which can be of any class such as "Penman", "PenmanMonteith" and "PriestleyTaylor. The default is NULL if the user requires the comparison among only five sets of results.
results7
A list named "results" which has been derived from function ET..() which can be of any class such as "Penman", "PenmanMonteith" and "PriestleyTaylor. The default is NULL if the user requires the comparison among only six sets of results.
labs
A character vector with the length equal to the number of sets of results to compare, defining the labels for the comparison plots
Sdate
Only used when type = 'Daily', 'Monthly' and 'Annual' to define the start date for the plotting windows, which can be defined by user in the format "YYYY-MM-DD"; if missing the default is the first day of data is used.
Edate
Only used when type = 'Daily', 'Monthly' and 'Annual' to define the end date for the plotting windows, which can be defined by user in the format "YYYY-MM-DD"; if missing the default is the last day of data is used.
ylim
A numeric vector of length 2 defining the lower and upper limit of the y-axis for plotting, if missing the default is from 0 to 1.5 times of maximum value from the first set of result that is used to compare with others.
type
A character string indicating the type of plot produced, can be one of the following: "Daily" - comparison plots of estimated daily evapotranspiration; "Monthly" - comparison plots of monthly aggregated evapotranspiration; "Annual" - comparison p

Value

  • Three plots are generated for each type of comparison plot selected, including: 1) time series plot of the estimated/aggregated/averaged values from each set of result; 2) non-exceedance plot of the distribution of estimated/aggregated/averaged values from each set of result; 3) box plot of the distribution of estimated/aggregated/averaged values from each set of result.

Examples

Run this code
# Use processed existing data set from kent Town, Adelaide
data("processeddata")
data("constants")

# Set data class to be "Penman" to call function
funname <- "Penman" 
class(data) <- funname 

# Call generic function ET(data, constants, ...) with class "Penman"
results_Penman <- ET(data, constants, solar="sunshine hours", wind=
"yes", windfunction_ver = "1948", alpha = 0.26, z0 = 0.02) 

# Set data class to be "PenmanMonteith" to call function
funname <- "PenmanMonteith" 
class(data) <- funname 

# Call generic function ET(data, constants, ...) with class "PenmanMonteith"
results_PenmanMonteith <- ET(data, constants, solar="sunshine hours", wind="yes", crop="short") 

# Plot the estimated Penman open-water evaporation against average temperature
ETComparison(results_Penman, results_PenmanMonteith, type = "Monthly", ylim=c(0,400),
labs=c("Penman","PenmanMonteith"))

Run the code above in your browser using DataLab