Title: | Evaluation of Sprinkler Irrigation Uniformity and Efficiency |
---|---|
Description: | Processing and analysis of field collected or simulated sprinkler system catch data (depths) to characterize irrigation uniformity and efficiency using standard and other measures. Standard measures include the Christiansen coefficient of uniformity (CU) as found in Christiansen, J.E.(1942, ISBN:0138779295, "Irrigation by Sprinkling"); and distribution uniformity (DU), potential efficiency of the low quarter (PELQ), and application efficiency of the low quarter (AELQ) that are implementations of measures of the same notation in Keller, J. and Merriam, J.L. (1978) "Farm Irrigation System Evaluation: A Guide for Management" <https://pdf.usaid.gov/pdf_docs/PNAAG745.pdf>. spreval::DU.lh is similar to spreval::DU but is the distribution uniformity of the low half instead of low quarter as in DU. spreval::PELQT is a version of spreval::PELQ adapted for traveling systems instead of lateral move or solid-set sprinkler systems. The function spreval::eff is analogous to the method used to compute application efficiency for furrow irrigation presented in Walker, W. and Skogerboe, G.V. (1987,ISBN:0138779295, "Surface Irrigation: Theory and Practice"),that uses piecewise integration of infiltrated depth compared against soil-moisture deficit (SMD), when the argument "target" is set equal to SMD. The other functions contained in the package provide graphical representation of sprinkler system uniformity, and other standard univariate parametric and non-parametric statistical measures as applied to sprinkler system catch depths. A sample data set of field test data spreval::catchcan (catch depths) is provided and is used in examples and vignettes. Agricultural systems emphasized, but this package can be used for landscape irrigation evaluation, and a landscape (turf) vignette is included as an example application. |
Authors: | Garry Grabow [aut, cre, cph] |
Maintainer: | Garry Grabow <[email protected]> |
License: | GPL-3 |
Version: | 1.1.0 |
Built: | 2025-01-29 04:23:16 UTC |
Source: | https://github.com/glgrabow/spreval |
This returns measures of the percentage (fraction) of areas receiving less or more application than the target depth, assuming catch cans represent approximately equal areas. It also a measure of adequacy and efficiency determined from areas of a density curve receiving amounts equal to or more of the target (adequacy) and less than or equal to target (efficiency).
adper(x,target,plot=TRUE)
adper(x,target,plot=TRUE)
x |
array of catch can depths. |
target |
target depth meant to be applied. |
plot |
logical; plot density and ecdf plots of depths and target line. |
results are given as determined by both a density function and empirical cumulative
distribution function (ecdf). If target is equal to soil moisture depletion, then 1- efficiency is
the percentile of area that loses water to deep percolation (not held in root zone). Adequacy and efficiency (eff) percentiles should add to approximately 1.0. Note that definitions of adequacy and efficiency here based only on percentiles is not a standard definition as deviation from target depth is not considered. See eff for a more traditional approach.
named list, including;
adequacy.density |
percentile receiving >= target amount determined from density curve |
eff.density |
percentile receiving <=target amount as determined from density curve |
adequacy.ecdf |
same as adequacy.density but as determined from |
eff.ecdf |
same as eff.density but as determined from |
Garry Grabow [email protected]
#data from same exercise as PELQ example x<-c(.23,.31,.24,.24,.28,.31,.27,.22,.26,.31, .31,.25,.20,.22,.32)# catch can depths in inches caught during 1.0 hr. test x<-x*23.5 # extend to 23.5 hour irrigation target<-4.4 # replace soil water deficit of 4.4 in. adper(x,target) #change target to average catch target2<-mean(x) adper(x,target2)
#data from same exercise as PELQ example x<-c(.23,.31,.24,.24,.28,.31,.27,.22,.26,.31, .31,.25,.20,.22,.32)# catch can depths in inches caught during 1.0 hr. test x<-x*23.5 # extend to 23.5 hour irrigation target<-4.4 # replace soil water deficit of 4.4 in. adper(x,target) #change target to average catch target2<-mean(x) adper(x,target2)
AELQ is a measure of both operation (duration of irrigation) and inherent sprinkler system uniformity. AELQ is based upon soil moisture depletion (SMD) at time of irrigation, the system application rate, and irrigation duration. If the low quarter caught depth is less than or equal to the SMD, AELQ is calculated as the low quarter average caught depth (from catch cans) divided by the average applied depth (sys. app. rate x duration). If the infiltrated (caught) low quarter depth is greater than SMD, AELQ is calculated as SMD/avg. applied depth in %. Whenever the irrigation (caught or infiltrated) in the low quarter exactly matches the SMD in the low quarter AELQ=PELQ. If the duration of irrigation is such that the infiltrated depth exceeds the SMD, then AELQ will be less than PELQ.
AELQ(x, rate,ss,sl,dur,smd,SI=TRUE)
AELQ(x, rate,ss,sl,dur,smd,SI=TRUE)
x |
array of catch can caught rates - not depths (mm/hr or in/hr). |
rate |
sprinkler discharge rate (lpm or gpm). |
ss |
sprinkler spacing (m or ft). |
sl |
lateral spacing (m or ft). |
dur |
duration of irrigation event, hr |
smd |
soil moisture depletion at begin irrigation, mm or in. |
SI |
logical; units SI (mm, m, lpm) or US Customary (in., ft, gpm). SI (TRUE) is default. |
x will be used to determine mode of AELQ computation by determining if the low quarter catch rate (and depth) is less than or greater than the SMD.
AELQ (application efficiency of low quarter, %)
Garry Grabow [email protected]
Mirriam and Keller, 1978. Farm System Irrigation Evaluation: A Guide for Management. PP 43,44. Utah State University, Logan, Utah. https://pdf.usaid.gov/pdf_docs/PNAAG745.pdf
#see pp 41-44 of reference document x<-c(.23,.31,.24,.24,.28,.31,.27,.22,.26,.31, .31,.25,.20,.22,.32)# catch can depths caught during test converted to in/hr SI<-FALSE # use U.S. customary units smd<-4.4 #soil moisture depletion of 4.4 inches rate<-4.6 # 4.6 gpm sprinkler discharge sl<-50; ss<-30 # 30 x 50 ft sprinkler x lateral spacing dur<-23.5 #23.5 hr duration (24 hour set) AELQ(x,rate,ss,sl,dur,smd,SI) # now for a lower applied depth for alternate mode of AELQ #computation dur<-11.5 #change irrigation duration to a 12 hour set (11.5 hrs) AELQ(x,rate,ss,sl,dur,smd,SI)
#see pp 41-44 of reference document x<-c(.23,.31,.24,.24,.28,.31,.27,.22,.26,.31, .31,.25,.20,.22,.32)# catch can depths caught during test converted to in/hr SI<-FALSE # use U.S. customary units smd<-4.4 #soil moisture depletion of 4.4 inches rate<-4.6 # 4.6 gpm sprinkler discharge sl<-50; ss<-30 # 30 x 50 ft sprinkler x lateral spacing dur<-23.5 #23.5 hr duration (24 hour set) AELQ(x,rate,ss,sl,dur,smd,SI) # now for a lower applied depth for alternate mode of AELQ #computation dur<-11.5 #change irrigation duration to a 12 hour set (11.5 hrs) AELQ(x,rate,ss,sl,dur,smd,SI)
Four catch can data sets, one each for lateral, hose pull, and solid set agricultural sprinkler systems, and one for a landscape (turf) irrigation system.
data("catchcan")
data("catchcan")
A named list of 4 catch can data sets; lateral, traveler, solid.set and landscape.
catchcan$lateral
6x7 matrix of catch can data, units are in./hr. Grid spacing of 10 ft x 10 ft
ln
a numeric vector of catch can data - nth can to left of lateral
rn
a numeric vector of catch can data - nth can to right of lateral
catachcan$traveler
16X2 matrix of catch can data. Effective (lane) spacing is 224 ft in example.
station
distance (ft) of catch can relative to hose (0), neg. is left of hose in plan view
depth
collected depth, in.
catchcan$solid.set
4x4 matrix of catch can data, units are in. Can grid spacing of 20 ft x 20 ft inside of 4 operating sprinklers on 80x80 ft sprinkler x lateral spacing.
catchcan$landscape
9X7 matrix of catch can data, units are in ml. Can opening is 72 mm (7.2 cm). Can grid spacing of 9 ft X 9 ft.
(lateral)Form II-1, item 10, p.29. Utah State University, Logan, Utah. https://pdf.usaid.gov/pdf_docs/PNAAG745.pdf
(traveler)Table 1, pg. 8. Evans, R.O., Barker J.C., Smith J.T., Sheffield R.E. 1997b. Field calibration procedures for animal wastewater application equipment, hard hose and cable tow traveler irrigation system. NC Cooperative Extension Service publication AG-553-2. Raleigh, NC.
(solid set)Work Sheet 1. p. 13. Evans, R.O., Barker J.C., Smith J.T., Sheffield R.E. 1997a. Field calibration procedures for animal wastewater application equipment, stationary sprinkler irrigation system. NC Cooperative Extension Service publication AG 553-1. Raleigh, NC.
Mirriam and Keller, 1978. Farm System Irrigation Evaluation: A Guide for Management. Form II-1, item 10, p.29. Utah State University, Logan, Utah. https://pdf.usaid.gov/pdf_docs/PNAAG745.pdf
Evans, R.O., Barker J.C., Smith J.T., Sheffield R.E. 1997b. Field calibration procedures for animal wastewater application equipment, hard hose and cable tow traveler irrigation system. NC Cooperative Extension Service publication AG-553-2. Raleigh, NC. https://p2infohouse.org/ref/32/31084/ag-553-2.pdf
Evans, R.O., Barker J.C., Smith J.T., Sheffield R.E. 1997a. Field calibration procedures for animal wastewater application equipment, stationary sprinkler irrigation system. NC Cooperative Extension Service publication AG 553-1. Raleigh, NC. https://irrigation.wordpress.ncsu.edu/files/2017/01/ag-553-1-stationary-sprinkler.pdf
library(fields) # for easy grid construction data(catchcan) use.data<-catchcan$lateral #matrix can be viewed as plan view of catch data #x,y matrix 10 ft x 10 ft catch can spacing x<-seq(-35,25,10) # x=0 is lateral position y<-seq(55,5,-10) #plan view top to bottom grd<-list(x,y) # prepare list for make.surface function [fields] grid<-make.surface.grid(grd) plot(grid) labels<-matrix(t(use.data),ncol=1)#transpose matrix and stack rows into 1 column text(grid[ ,1],grid[ ,2],labels,cex=0.8,pos=1) # plot catch data at collection point ## or plot using function plotss. Shows test data from 1 lateral with no overlap. cdata<-cbind(grid[ ,1],grid[ ,2],labels) #construct required catch can data matrix sp.x<-rep(0,3);sp.y<-seq(60,0,-30)# sprinkler spacing (y) = 30 ft, plot top to bottom sploc<-cbind(sp.x,sp.y) #construct required sprinkler location matrix plotss(cdata,sploc)
library(fields) # for easy grid construction data(catchcan) use.data<-catchcan$lateral #matrix can be viewed as plan view of catch data #x,y matrix 10 ft x 10 ft catch can spacing x<-seq(-35,25,10) # x=0 is lateral position y<-seq(55,5,-10) #plan view top to bottom grd<-list(x,y) # prepare list for make.surface function [fields] grid<-make.surface.grid(grd) plot(grid) labels<-matrix(t(use.data),ncol=1)#transpose matrix and stack rows into 1 column text(grid[ ,1],grid[ ,2],labels,cex=0.8,pos=1) # plot catch data at collection point ## or plot using function plotss. Shows test data from 1 lateral with no overlap. cdata<-cbind(grid[ ,1],grid[ ,2],labels) #construct required catch can data matrix sp.x<-rep(0,3);sp.y<-seq(60,0,-30)# sprinkler spacing (y) = 30 ft, plot top to bottom sploc<-cbind(sp.x,sp.y) #construct required sprinkler location matrix plotss(cdata,sploc)
Compute Christiansen Coefficient of Uniformity (CU or UC). Coefficient is based upon the average deviation from the mean value and the mean value.
CU(x)
CU(x)
x |
numeric array of catch can data. Array may include missing (NA) data. NA values will be removed in function. |
where ; absolute deviation of catch
from average catch
based on
observations (catches).
CU value in percentage. Note that CU can take on a negative value if the average deviation from the mean is greater than the mean.
Garry Grabow [email protected]
Christiansen, J. E. 1942. Irrigation by sprinkling. California Agricultural Experiment Station Bulletin 670. Berkeley, Cal.: University of California.
Keller, J., and R. D. Bliesner. 2000. Sprinkler and Trickle Irrigation. Caldwell, N.J.: Blackburn Press. ISBN 1-930665-19-9.
# data below are volumes caught in ml. Catch cans must be of # equal surface area at top when using volume data x<-c(47,42,45,24,13,26,33,34,27,30,40,44,32,12,12) xcu<-CU(x) #round results curnd<-round(xcu,2) xcu curnd
# data below are volumes caught in ml. Catch cans must be of # equal surface area at top when using volume data x<-c(47,42,45,24,13,26,33,34,27,30,40,44,32,12,12) xcu<-CU(x) #round results curnd<-round(xcu,2) xcu curnd
Computes DU (distribution uniformity of low quarter) for sprinkler systems using catch can data.
DU(x)
DU(x)
x |
numeric array of catch can data. Array may include missing (NA) data. NA values will be removed in function. |
mean of lowest quarter of observations divided by overall mean X 100
Distribution Uniformity (of low quarter) in percentage
Garry Grabow [email protected]
Keller, J., and R. D. Bliesner. 2000. Sprinkler and Trickle Irrigation. Caldwell, N.J.: Blackburn Press. ISBN 1-930665-19-9.
# data below are volumes caught in ml. Catch cans must be of # equal surface area at top when using volume data x<-c(47,42,45,24,13,26,33,34,27,30,40,44,32,12,12) xdu<-DU(x) #round results durnd<-round(xdu,2) xdu durnd
# data below are volumes caught in ml. Catch cans must be of # equal surface area at top when using volume data x<-c(47,42,45,24,13,26,33,34,27,30,40,44,32,12,12) xdu<-DU(x) #round results durnd<-round(xdu,2) xdu durnd
Computes uniformity of lower half of a solid set sprinkler system vs. lower quarter as does DU. Note that this computation uses the same method as low quarter, except it uses the observations of the low half rather than low quarter. It does not use an empirical equation that converts DU (low quarter) to DUlh (lower half) as some have proposed.
DU.lh(x)
DU.lh(x)
x |
a numeric array of catch depths or volumes. Array may include missing (NA) data. NA values will be removed in function. |
mean of lower half of ranked data divided by overall mean x 100.
DU of lower half value in percentage.
Garry Grabow [email protected]
# data below are volumes caught in ml. Catch cans must be of # equal surface area at top when using volume data x<-c(47,42,45,24,13,26,33,34,27,30,40,44,32,12,12) xdulh<-DU.lh(x) #round results dulhrnd<-round(xdulh,2) xdulh dulhrnd
# data below are volumes caught in ml. Catch cans must be of # equal surface area at top when using volume data x<-c(47,42,45,24,13,26,33,34,27,30,40,44,32,12,12) xdulh<-DU.lh(x) #round results dulhrnd<-round(xdulh,2) xdulh dulhrnd
Generate histogram, boxplot, density, and quartile plots.
eda.shape(x,qq=TRUE,main=NULL,xlab,...)
eda.shape(x,qq=TRUE,main=NULL,xlab,...)
x |
numeric array. |
qq |
logical; for plotting quartile plot, default=TRUE. |
main |
character; main title for plots. |
xlab |
x axis label for histogram and density plots, y axis label for boxplot. If not provided, will default to name of object x. |
... |
additional graphical parameters to pass to the plot functions called within 'eda.shape'. |
This function is modified from the SPlus version of the same name, see references. Additional graphical parameters passed to 'eda.shape' are ignored if not applicable/accepted by all internally called plot functions to prevent warning messages and/or null plots. To suppress axis labeling pass ann=FALSE as additional argument.
Four plots on one page [mfrow = c(2, 2)]- histogram, boxplot, density, and quartile.
Wrapper functions for each internally called plot type strip graphical parameters that are not applicable to the specific plot type to prevent warnings and errors.
Garry Grabow [email protected]
TIBCO Spotfire S+ 8.2 2010. Guide to Statistics, vol. 1, p.124ff.
eda.stats
,hist
,
boxplot
,density
,
qqnorm
#generate and plot univariate normally distributed data require(graphics) x<-rnorm(25,1,0.25) eda.shape(x) #defaults #add main title, and pass additional parameters, "col" and #"notch""for notched boxplot eda.shape(x,main="my normal data",col="blue",notch=TRUE)
#generate and plot univariate normally distributed data require(graphics) x<-rnorm(25,1,0.25) eda.shape(x) #defaults #add main title, and pass additional parameters, "col" and #"notch""for notched boxplot eda.shape(x,main="my normal data",col="blue",notch=TRUE)
Generates summary statistics of mean, median, skew, kurtosis, min, max and quartiles.
eda.stats(x)
eda.stats(x)
x |
numeric array |
requires timeDate library
Named list with the following items:
summary |
min, 1st quartile, median, mean, 3rd quartile, max |
skew |
skewness |
kurt |
kurtosis |
Garry Grabow
eda.shape
,
summary
,skewness
,
kurtosis
require(timeDate) # summary statistics for random normal data # mean of 1. sd = 0.3 ndata<-rnorm(25,1,.3) eda.stats(ndata) #summary statistics for right-skewed data #mean of 1, sd=1 rdata<-rexp(25,rate=1) eda.stats(rdata)
require(timeDate) # summary statistics for random normal data # mean of 1. sd = 0.3 ndata<-rnorm(25,1,.3) eda.stats(ndata) #summary statistics for right-skewed data #mean of 1, sd=1 rdata<-rexp(25,rate=1) eda.stats(rdata)
determines amount of water above and below target depth to determine efficiency and adequacy from catch can data. If target depth is equal to soil moisture depletion in the root zone, all catch can depths greater than target are, in concept, lost to deep percolation and reduce efficiency, and all depths less than target are 100% efficient but reduce adequacy.
eff(x, target)
eff(x, target)
x |
numeric array of catch can depths |
target |
target depth |
computes efficiency and adequacy as amount of catch equal or less than target depth. Efficiency is defined and calculated as the applied (catch can caught) water retained in root zone divided by the total water applied when the target depth is set equal to the soil moisture deficit (SMD). Adequacy is the amount of catch equal or exceeding the target depth (adequacy). Amounts within the root zone and below the root zone are obtained using the results of 'stats::density' using piecewise integration and normalized to target depth (normally SMD). Both efficiency and adequacy are reported in decimal (not percent) form.
A named list with the following items:
appeff |
application efficiency based on target depth, decimal |
appadeq |
application adequacy based on target depth, decimal |
If all catch can depths (and resultant density curve) are all below the target depth, the application efficiency is 100%. This assumes that the target depth is equal to the soil water deficit (or less). So deficit irrigation events are likely to be 100% or nearly 100% efficient.
Garry Grabow [email protected]
target<-3 # generate data with mean of target amount and high variability (non-uniformity) x<-rnorm(25,3,1.75) eff(x,target) # generate data with mean of target amount and low varibility (uniformity) xx<-rnorm(25,3,0.5) eff(xx,target)
target<-3 # generate data with mean of target amount and high variability (non-uniformity) x<-rnorm(25,3,1.75) eff(x,target) # generate data with mean of target amount and low varibility (uniformity) xx<-rnorm(25,3,0.5) eff(xx,target)
Simulate overlap from adjacent laterals using data from one lateral.
overlap(sl,sc,lcdata,rcdata)
overlap(sl,sc,lcdata,rcdata)
sl |
lateral spacing. |
sc |
catch can spacing perpendicular to lateral. |
lcdata |
data from cans left of lateral; order is proximal to distal of lateral. |
rcdata |
data from cans right of lateral; order as in lcdata. |
Superimposes and sums one row of catch can data as if adjacent lateral had same catch pattern. Repeat function for multiple rows of catch cans between laterals, to normally include all rows of cans between two sprinklers.
A named list with the following items:
sum.left |
numeric array of summed overlap catch can data between tested lateral and simulated lateral to the left. |
sum.right |
numeric array of summed overlap catch can data between tested lateral and simulated lateral to the right. |
both items of list will have same summed values but in inversely ordered. Only can data receiving water need to be entered into lcdata and rcdata. The function will automatically produce "phantom cans" to fill between adjacent laterals if not entered and set catch to 0.
Garry Grabow [email protected]
sl<-60 #lateral spacing. Units are feet sc<-10 #catch cans spacing along single "row". Units are feet #note that neither lcdata or rcdata have 6 cans. function will generate "0" cans. lcdata<-c(0.28,0.24,0.21,0.10) rcdata<-c(0.23,0.21,0.3) #generate summed catch for one row at 60 foot lateral spacing spacing.60<-overlap(sl,sc,lcdata,rcdata) spacing.60 #now generate summed catch assuming a 50 foot lateral spacing sl<-50 spacing.50<-overlap(sl,sc,lcdata,rcdata) spacing.50
sl<-60 #lateral spacing. Units are feet sc<-10 #catch cans spacing along single "row". Units are feet #note that neither lcdata or rcdata have 6 cans. function will generate "0" cans. lcdata<-c(0.28,0.24,0.21,0.10) rcdata<-c(0.23,0.21,0.3) #generate summed catch for one row at 60 foot lateral spacing spacing.60<-overlap(sl,sc,lcdata,rcdata) spacing.60 #now generate summed catch assuming a 50 foot lateral spacing sl<-50 spacing.50<-overlap(sl,sc,lcdata,rcdata) spacing.50
This function determines PELQ as the average of the low quarter catch rates divided by the average catch rate of applied water. As such is is a measure of the potential of the sprinkler irrigation system considering uniformity (low quarter) and any losses due to drift and evaporation (uses catch can rates).
PELQ(x,SI=TRUE,rate,ss,sl,dur)
PELQ(x,SI=TRUE,rate,ss,sl,dur)
x |
numeric array of catch can depths. |
SI |
logical; units SI (mm, m, lpm) or US Customary (in., ft, gpm). SI (TRUE) is default. |
rate |
sprinkler discharge rate (lpm or gpm). |
ss |
sprinkler spacing (m or ft). |
sl |
lateral spacing (m or ft). |
dur |
duration of irrigation event, hr. |
catch can depths converted to catch rates.
PELQ (potential application efficiency of low quarter, %
Garry Grabow [email protected]
Mirriam and Keller, 1978. Farm System Irrigation Evaluation: A Guide for Management. PP 41-43. Utah State University, Logan, Utah. https://pdf.usaid.gov/pdf_docs/PNAAG745.pdf
#see pp 41-43 of reference document SI<-FALSE # use U.S. customary units x<-c(.23,.31,.24,.24,.28,.31,.27,.22,.26,.31, .31,.25,.20,.22,.32)# catch can depths caught during test converted to in/hr rate<-4.6 # 4.6 gpm sprinkler discharge rate (measured) sl<-50; ss<-30 # 30 x 50 ft sprinkler x lateral spacing dur<-1 # 1 hr test duration (dur. in min) PELQ(x,SI=FALSE,rate,ss,sl,dur)
#see pp 41-43 of reference document SI<-FALSE # use U.S. customary units x<-c(.23,.31,.24,.24,.28,.31,.27,.22,.26,.31, .31,.25,.20,.22,.32)# catch can depths caught during test converted to in/hr rate<-4.6 # 4.6 gpm sprinkler discharge rate (measured) sl<-50; ss<-30 # 30 x 50 ft sprinkler x lateral spacing dur<-1 # 1 hr test duration (dur. in min) PELQ(x,SI=FALSE,rate,ss,sl,dur)
This function determines PELQ as the average of the low quarter catch depths divided by the average catch depth of applied water. As such is is a measure of the potential of the sprinkler irrigation system considering uniformity (low quarter) and any losses due to drift and evaporation (uses catch can depths overlapped at specified lane spacing).
PELQT(x,SI=TRUE,rate,ls,ts)
PELQT(x,SI=TRUE,rate,ls,ts)
x |
numeric array of catch can depths, overlapped. |
SI |
logical; units SI (mm, m, lpm) or US Customary (in., ft, gpm). SI (TRUE) is default. |
rate |
sprinkler discharge rate (lps or gpm). |
ls |
lane spacing (m or ft). |
ts |
travel speed (m/min or ft/min). |
catch can depths overlapped to specified lane spacing.
PELQT (potential application efficiency of low quarter for traveling system, %
Garry Grabow [email protected]
Evans, R.O., Barker J.C., Smith J.T., Sheffield R.E. 1997b. Field calibration procedures for animal wastewater application equipment, hard hose and cable tow traveler irrigation system. NC Cooperative Extension Service publication AG-553-2. Raleigh, NC https://p2infohouse.org/ref/32/31084/ag-553-2.pdf
Liu, Z., G.L. Grabow, R.L. Huffman, J. Osborne, and R.O. Evans. 2012. Factors Affecting Uniformity of Irrigation-Type Manure Application Systems. Applied Eng. in Agric. 28(1):43-56.
Mirriam and Keller, 1978. Farm System Irrigation Evaluation: A Guide for Management. PP 97-107. Utah State University, Logan, Utah. https://pdf.usaid.gov/pdf_docs/PNAAG745.pdf
#see pp 41-43 of reference document SI<-FALSE # use U.S. customary units left<-c(0.94,0.80,0.59,0.61,0.50,0.42,0.33,0.07) right<-c(0.73,0.81,0.92,0.64,0.50,0.27,0.20,0.13) ls<-224;gs<-20 #first call travunif to return overlapped data given gage spacing and lane spacing out<-travunif(ls,gs,left,right) x<-out$o.depths rate<-197 # 197 gpm sprinkler discharge rate (measured) PELQT(x,SI=FALSE,rate,ls,1.5)#call PELQ for traveling systems
#see pp 41-43 of reference document SI<-FALSE # use U.S. customary units left<-c(0.94,0.80,0.59,0.61,0.50,0.42,0.33,0.07) right<-c(0.73,0.81,0.92,0.64,0.50,0.27,0.20,0.13) ls<-224;gs<-20 #first call travunif to return overlapped data given gage spacing and lane spacing out<-travunif(ls,gs,left,right) x<-out$o.depths rate<-197 # 197 gpm sprinkler discharge rate (measured) PELQT(x,SI=FALSE,rate,ls,1.5)#call PELQ for traveling systems
plots a densigram with optional contour plot of catch can depths, with an option to label points. Both contour and point labeling are invoked by default (TRUE).
plotss(cdata,sploc,con=TRUE,xlab=NULL,ylab=NULL,xlim=NULL, ylim=NULL,main=NULL,labelpoints=TRUE,pos=1,spklab=NULL, pch=16,cex=0.8,edastat=FALSE,...)
plotss(cdata,sploc,con=TRUE,xlab=NULL,ylab=NULL,xlim=NULL, ylim=NULL,main=NULL,labelpoints=TRUE,pos=1,spklab=NULL, pch=16,cex=0.8,edastat=FALSE,...)
cdata |
n x 3 matrix of catch can data; 1st column x, 2nd column y can locations, 3rd column catch depths |
sploc |
n x 2 matrix of sprinkler location data; 1st column xi, second column yi. i=4 for 4 sprinklers with cans in-between. |
con |
Logical; TRUE to overlay contour plot on densigram. |
xlab |
label for x axis of plot. |
ylab |
label for y axis of plot. |
xlim |
bounds of x-axis. |
ylim |
bounds of y-axis. |
main |
main title for plot. |
labelpoints |
logical; plot amounts at can locations? Default is TRUE. |
pos |
if labelpoints=TRUE, position of point labels, see |
spklab |
character vector of labels for sprinklers. Defaults to bold italic to distinguish from can labels. |
pch |
symbol type. See |
cex |
scaling factor for plotting points and point labels.See |
edastat |
Logical; call eda.stat function for stats on catch depths? |
... |
further graphical parameters to pass to internal calls to |
densigram (from interp
with optional contour plot overlay) and optional summary catch can statistics. Returned object is par(usr) to obtain x,y user coordinates for scaling subsequent plotting of low level plot functions on plotted densigram.
requires interp package
Garry Grabow [email protected]
# set sprinkler locations (ft here) sprinklerx<-c(0,0,60,60) sprinklery<-c(60,0,60,0) sploc<-cbind(sprinklerx,sprinklery) #construct can data matrix gage.space<-15 x<-c(rep(7.5,4),rep(22.5,4),rep(37.5,4),rep(52.5,4)) y<-rep(seq(52.5,7.5,-gage.space),4) depth<-c(0.3,0.32,0.26,0.26,0.16,0.32,0.14,0.41, 0.14,0.27,0.38,0.34,0.29,0.32,0.45,0.25) cdata<-cbind(x,y,depth) plotss(cdata,sploc,xlab="ft",ylab="ft") #now grey scale colors, pass "col" plotss(cdata,sploc,xlab="ft",ylab="ft",col=grey.colors(16))
# set sprinkler locations (ft here) sprinklerx<-c(0,0,60,60) sprinklery<-c(60,0,60,0) sploc<-cbind(sprinklerx,sprinklery) #construct can data matrix gage.space<-15 x<-c(rep(7.5,4),rep(22.5,4),rep(37.5,4),rep(52.5,4)) y<-rep(seq(52.5,7.5,-gage.space),4) depth<-c(0.3,0.32,0.26,0.26,0.16,0.32,0.14,0.41, 0.14,0.27,0.38,0.34,0.29,0.32,0.45,0.25) cdata<-cbind(x,y,depth) plotss(cdata,sploc,xlab="ft",ylab="ft") #now grey scale colors, pass "col" plotss(cdata,sploc,xlab="ft",ylab="ft",col=grey.colors(16))
generates quantiles at 0.1, 1,5,10-90, 95, 99, 99,9 percentiles.
quart(x)
quart(x)
x |
numeric array |
Uses 'stats::quantile'
named list with following items:
q |
quantiles at 0.1, 1,5,10-90, 95, 99, 99,9 percentiles |
d |
interquartile range - i.e., 75th quantile minus 25th quantile |
Garry Grabow [email protected]
# quantiles for random normal data x<-rnorm(25,10,1) xn<-quart(x)
# quantiles for random normal data x<-rnorm(25,10,1) xn<-quart(x)
plots points generated from an 'stats::ecdf' object with x and y axis swapped (x is cumulative frequency) and with y axis reversed so that min(y)=0 is at top. Plots points without step function lines.
rotecdf(x,target=NA,xlab=NULL,ylab=NULL,...)
rotecdf(x,target=NA,xlab=NULL,ylab=NULL,...)
x |
numeric array |
target |
target, a constant, e.g., target depth of irrigation. |
xlab |
label for x axis, standard default provided. |
ylab |
label for y axis, e.g., depth applied. Default is name of object x if not supplied. |
... |
further graphical parameters to pass to internal calls to
|
A minimum y of 0 is forced such that the plot can be interpreted at 0 being ground surface. If 'target' is supplied, a horizontal line at the value of target is drawn. Points and area below the target line indicate water applied in excess of the target amount.
rotated ecdf plot.
Wrapper functions for internally called plot and sub-plot functions within 'rotecfd' prevent warnings and errors for graphical parameters passed via '...' that are not recognized by subplolot functions, i.e., abline
, text
. Therefore not all graphical parameters passed via '...' will be realized in the generated plot.
Garry Grabow [email protected]
target<-3 # generate data with mean of target amount and high variability (non-uniformity) x<-rnorm(25,3,1.75) rotecdf(x,target,ylab="depth applied (caught)") # generate data with mean of target amount and low varibility (uniformity) xx<-rnorm(25,3,0.5) #no y axis label provided - defaults to array object name. Pass additional non-default #graphical parameters rotecdf(xx,target,lty=2,pch=2)
target<-3 # generate data with mean of target amount and high variability (non-uniformity) x<-rnorm(25,3,1.75) rotecdf(x,target,ylab="depth applied (caught)") # generate data with mean of target amount and low varibility (uniformity) xx<-rnorm(25,3,0.5) #no y axis label provided - defaults to array object name. Pass additional non-default #graphical parameters rotecdf(xx,target,lty=2,pch=2)
Uses an 'stats::ecdf' object to plot a step function plot with cumulative frequency on x axis and input array (catch can depths) on y axis with y-axis reversed (min(y)= 0 at top of y-axis). Top of plot represents soil surface.
sfplot(x,target=NA,xlab=NULL,ylab=NULL,...)
sfplot(x,target=NA,xlab=NULL,ylab=NULL,...)
x |
numeric array |
target |
target, a constant, e.g., target depth of irrigation. |
xlab |
label for x axis, standard default provided. |
ylab |
label for y axis, e.g., depth applied. Default is name of object x if not supplied. |
... |
further graphical parameters to pass to internal calls to |
Plot includes step function lines unlike rotecdf
. A minimum y of 0 is forced such that the plot can be interpreted as 0 being ground surface. If "target" is supplied, a horizontal line at the value of target is drawn. Points and area below the target line indicate water applied in excess of the target amount.
Step function plot as empirical cumulative distribution function with x on y-axis and f(x), i.e., cum. prob., on x-axis.
Wrapper functions for internally called plot and sub-plot functions within 'rotecfd' prevent warnings and errors for graphical parameters passed via '...' that are not recognized by subplolot functions, i.e., abline
, text
. Therefore not all graphical parameters passed via '...' will be realized in the generated plot.
Garry Grabow [email protected]
target<-3 # generate data with mean of target amount and high variability (non-uniformity) x<-rnorm(25,3,1.75) sfplot(x,target,ylab="depth applied (caught)") # generate data with mean of target amount and low varibility (uniformity) xx<-rnorm(25,3,0.5) sfplot(xx,target)#no y axis label provided - defaults to array object name #customize graphical parameters sfplot(xx,target,main="Good uniformity",xlab="cum. probability",lwd=2, col="blue")
target<-3 # generate data with mean of target amount and high variability (non-uniformity) x<-rnorm(25,3,1.75) sfplot(x,target,ylab="depth applied (caught)") # generate data with mean of target amount and low varibility (uniformity) xx<-rnorm(25,3,0.5) sfplot(xx,target)#no y axis label provided - defaults to array object name #customize graphical parameters sfplot(xx,target,main="Good uniformity",xlab="cum. probability",lwd=2, col="blue")
This function computes 3 values of sprinkler irrigation distribution uniformity - CU (Christiansen's coefficient of uniformity), DU (dist. unif. of low quarter), DU.lh (dist. unif. of low half) for traveling gun irrigation systems. Data from a single transect of catch cans from one hard hose pull is used, and data is overlapped to account for additional contribution from adjacent traveler pulls. Overlapped catch depths are also returned.
travunif(ls,cs,lcdata,rcdata,site=NULL,plot=TRUE)
travunif(ls,cs,lcdata,rcdata,site=NULL,plot=TRUE)
ls |
lane spacing. |
cs |
catch can spacing. |
lcdata |
catch can data from cans left of hose - order is from closet to hose outward. |
rcdata |
catch can data from cans right of hose - order is from closet to hose outward. |
site |
optional character label for location (site) of evaluation - used in plot titles. |
plot |
logical argument to invoke plotting, default is TRUE. |
It is not necessary that lcdata and rcdata be of equal length. This might occur if windy conditions prevail and the wetted width of one side is greater than another, and data is not entered for empty cans. The function will automatically assign 0 depths to the "missing" catch cans if not explicitly done. While using volume instead of depth data will result in the same uniformity values, depth is more intuitive and will be required if the 'o.depths' output will be used to compute 'PELQT'.
A named list with the following items:
o.depths |
collected depths as overlapped within travel lane |
CU |
CU from catch can data with overlap from adjacent lanes |
DUlh |
DU low half (using function |
DU |
DU from catch can data with overlap from adjacent lanes |
Garry Grabow [email protected]
Evans, R.O., Barker J.C., Smith J.T., Sheffield R.E. 1997b. Field calibration procedures for animal wastewater application equipment, hard hose and cable tow traveler irrigation system. NC Cooperative Extension Service publication AG-553-2. Raleigh, NC
Liu, Z., G.L. Grabow, R.L. Huffman, J. Osborne, and R.O. Evans. 2012. Factors Affecting Uniformity of Irrigation-Type Manure Application Systems. Applied Eng. in Agric. 28(1):43-56.
# units can be SI or US Customary, e.g. # SI - mm for catch can data and m for lane and catch # can spacing # U.S. cust. - in. for catch can data and ft for lane # and catch can spacing left<-c(0.17,0.22,0.18,0.21,0.13,0.05,0.02,0) # units are in. right<-c(0.16,0.2,0.21,0.2,0.21,0.13,0.06,0.02) ls<-165;gs<-16 # units are ft travunif(ls,gs,left,right)
# units can be SI or US Customary, e.g. # SI - mm for catch can data and m for lane and catch # can spacing # U.S. cust. - in. for catch can data and ft for lane # and catch can spacing left<-c(0.17,0.22,0.18,0.21,0.13,0.05,0.02,0) # units are in. right<-c(0.16,0.2,0.21,0.2,0.21,0.13,0.06,0.02) ls<-165;gs<-16 # units are ft travunif(ls,gs,left,right)