cal.kc | R Documentation |
This function can estimate up to 23 parameters of FAO single and dual crop
parameters. The parameters include soil parameters: WP,FC, REW;
crop parameters: kcini,kcmid,kcend,kcbini,kcbmid,kcbend,h,Zr;
the evaporation parameters: p and Ze,
runoff coefficients: CNII or rc, as well as groundwater and capillary rise
parameters: initgw,a1,b1,a2,b2,a3,b3,a4,b4. For each parameter initial, maximum and range
values must be provided if one wants to optimise it.
There are also 12 goodness of fit tests for the evaluation of the model with
fitting
:r-square, index of agreement, F-value, p-value, sse,sst, AIC,
BIC, RMSE, NRMSE and nashSutcliffe coefficients. A calibrated model that uses more
parameters gets punished by AIC and BIC as well as adjusted R2, RMSE, NRMSE.
Both point and spatial model can be calibrated. The actual model is available at kc
cal.kc(ETo, P, RHmin, soil, crop, I = 0, CNII = c(30, 100, 1), u2 = 2,
FC = NULL, WP = NULL, h = NULL, Zr = NULL, Ze = c(0.1, 0.15, 0.01),
kc = c(c(0.1, 0.3, 0.05), c(0.1, 1, 0.1), c(0.1, 1, 0.1)), p = c(0.1, 1,
0.1), lengths = NULL, fw = 0.8, fc = NULL, kctype = "dual",
region = NULL, regexpr = "sweet", initgw = 50, LAI = 3, rc = NULL,
Kb = 0, Rn = NULL, hmodel = "gaussian", Zrmodel = "linear",
xydata = NULL, REW = c(2, 12, 0.5), a1 = 360, b1 = c(-1, 1, 0.1),
a2 = 240, b2 = c(-1, 1, 0.1), a3 = c(-2, 1, 0.1), b3 = 6.6,
a4 = 4.6, b4 = c(-1.5, 1, 0.1), ETa = NULL, report = "stages",
time = "06:00", HWR = 1, latitude = NULL, density = "full",
DOY = NULL, slope = NULL, y = NULL, r1 = 100, nongrowing = "weeds",
theta = NULL, profile = "variable", Kcmin = 0.15, Ky = NULL)
ETo |
Numeric. Reference evapotranspiration [mm]. This can be estimated with |
P |
numeric. Precipitation [mm] |
RHmin |
numeric. Minimum Relative Humidity [per cent] |
soil |
character. Name of soil texture as written in FAO56 TABLE 19 |
crop |
character. Name of the crop as written on FAO56 Table 11, TABLE 12 and TABLE 17 |
I |
numeric. Irrigation [mm] |
CNII |
numeric. The initial Curve Number of the study site.
This can be calibrated with |
u2 |
numeric. Wind speed of the nearby weather station [m/s] measured at 2m |
FC |
numeric. soil water content at field capacity [-][m3 m-3].
This can be calibrated with |
WP |
numeric. soil water content at wilting point [-][m3 m-3].
This can be calibrated with |
h |
numeric. Maximum crop height [m]. See details below.
This can be calibrated with |
Zr |
numeric. Rooting depth. See details below.
This can be calibrated with |
Ze |
numeric. The depth of the surface soil layer that is subject to drying
by way of evaporation [0.10-0.15 m]. This can be calibrated with |
kc |
list. The tabulated Kc values for single crop c(kcini,kcmid,kcend)
or dual crop model c(kcbini,kcbmid,kcbend). To use with |
p |
The depletion coefficient. This can be calibrated with |
lengths |
list. The lengths of the crop growth stages. It can take dates in the form of c(start of planting ('YYYY-mm-dd), start of rapid growth, start of mid season, start of maturity, harvesting) or in the form number of days: c(initial days, dev days, mid days, late days). See FAO56 TABLE 11. If performing time series simulation, different dates or one season dates can be set; for instance two seasons simulation can be of the form c(initial days, dev days, mid days, late days, initial days, dev days, mid days, late days) or just c(initial days, dev days, mid days, late days) |
fw |
list or numeric or character. This can take different fw values throughout the growing season. It can also take one numeric value and this will be transform depending on the type of wetting. If the wetting event is only Precipitation, it is set to 1; if it is only Irrigation it is set to the provided fw value. If it is both Precipitation and Irrigation weights are assigned for calculation of fw. fw can also take a character such as "Drip", "Sprinkler", "Basin", "Border", "alternated furrows", "Trickle", "narrow bed" and "wide bed". In this case fw values from FAO56 are assigned. |
fc |
numeric. fraction of ground covered by tree canopy |
kctype |
character. The type of model either "single" or "double". In spatial modelling involving Evaporation Fraction, kctype can be set to "METRIC" or "SSEB" so that Actual Evapotranspiration will be estimated as ETo*EF else it will be estimated with Rn as ETa=(EF*Rn)/2.45. Note that Rn is in MJm-2 day-1. |
region |
character. The region of the crop as on FAO56 TABLE 11 |
regexpr |
character. Extra term that can be used to search crop names on FAO56 Tables |
initgw |
numeric. Initial ground water level [m] |
LAI |
numeric. Leaf Area Index |
rc |
numeric Runoff coefficient [0-1].
This must be used if there is no information on Curve Number.
This can be calibrated with |
Kb |
ground water (base flow) recession parameter. The default is zero where no baseflow occurs |
Rn |
Net daily radiation [w/m2]. Estimated this with |
hmodel |
character. The type of crop growth model during the simulation. It takes "gaussian","linear", "exponential" |
Zrmodel |
character. The type of root growth model during the simulation. It takes "gaussian","linear", "exponential" |
xydata |
list c(longitude, latitude). The observation points of the model. This should be set only if the model is spatial. |
REW |
numeric Readily Evaporable Water. It can be calibrated with |
a1 |
soil water storage to maximum root depth (Zr) at field capacity |
b1 |
Liu et al. (2006) parameter for computing capillary rise [-0.17]. It can calibrated with
|
a2 |
Liu et al. (2006) parameter for computing capillary rise [240]. It can be calibrated with
|
b2 |
Liu et al. (2006) parameter for computing capillary rise [-0.27]. It can be calibrated with
|
a3 |
Liu et al. (2006) parameter for computing capillary rise [-1.3]. It can be calibrated with
|
b3 |
Liu et al. (2006) parameter for computing capillary rise [6.6]. It can be calibrated with
|
a4 |
Liu et al. (2006) parameter for computing capillary rise [4.6]. It can be calibrated with
|
b4 |
Liu et al. (2006) parameter for computing capillary rise [-0.65]. It can be calibrated with
|
ETa |
Measured Actual Evapotranspiration [mm] |
report |
list. In case of spatial modelling, which days' map should be reported. The default is "stages" where the periods of stages maps are reported as values. In an ascending order it can take values such as 1:12 days or c(1,3,6:12) days. |
time |
character. Time of the occurrence Irrigation or Precipitation. |
HWR |
numeric. Default is 1. Height to width ratio of individual plants or groups of plants when viewed from the east or from the west [-]. |
latitude |
geographical coordinates in decimal degrees. It should be negative for southern hemisphere |
density |
character. density factor for the trees, vines or shrubs on how they are arranged. It can take "full", "row" or "random" or "round". |
DOY |
Numeric or Date [YYYY-mm-dd]. Day of the Year. If you give data in the form of date [YYYY-mm-dd], it will be converted to DOY |
slope |
numeric. slope of saturation vapour pressure curve at air temperature T [kPa oC-1]. |
y |
numeric. psychometric constant [kPa oC-1] |
r1 |
leaf resistance FOR STOMATAL CONTROL [s/m] |
nongrowing |
character. The type of surface during non-growing season. It can take "weeds", "bare", or "mulch" |
theta |
numeric. The measured soil water content [m3/m3] in the profile. Leave those days without measured data blank. |
profile |
numeric or character. The profile depth to perform water balance. It takes "variable" when updating the depth with root growth (default). Or taking "fixed" when the maximum root zone is used. It can also take numeric value and this can be longer than maximum root length. |
Kcmin |
Minimum Kc value |
Ky |
list or array. yield response factor [-] in the form of c(initial Ky,crop dev't Ky, mid season Ky, late season Ky, total season Ky). For instance Maize Ky is c(0.4,0.4,1.3,0.5,1.25) and it is available at http://www.fao.org/nr/water/cropinfo_maize.html. Other crops Ky can be found at http://www.fao.org/nr/water/cropinfo.html If only one Ky value is supplied it will be repeated for all the seasons. |
There are several ways to use cal.kc:
The kc model can be calibrated against either Actual Evapotranspiration (ETa) or
Available Soil Water; the user must specify theta. If the calibration is done on a point data then time series for
that location must be provided. If multiple locations are provided with xydata and corresponding
multiple locations as input data, then ETa or theta must be provided for all locations. See also kc
for more details on locations.
There is a need to limit the number of calibrated parameters. One can compare models by observing the adjusted goodness of fit tests. The more parameters that one uses the less are the values of R-square but RMSE, BIC, AIC increases. Unadjusted and adjusted goodness of fit tests are provided with this function.
The function returns optimised parameters as "parameters", goodness of fit
as "fit", and calibrated model as "mod". It also prints candidates of parameters and
goodness of fit of the local optimum values. For the explanation of calibrated model
output and optimised parameters see the return values of kc
. Here, only
goodness of fit tests explanations are given.
mod: The optimised model. See return of kc
for more details
parameters: parameters of the optimised model
fit: Goodness of fit tests. See fitting
for explanation of variables
George Owusu
kc
## Not run:
#fewer iteration
file=system.file("extdata","sys","irrigation.txt",package="sebkc")
data=read.table(file,header=TRUE)
P=data$P
rc=0
I=data$I
ETo=data$ETo
Zr=data$Zr
p=0.6
FC=0.23
WP=0.10
u2=1.6
RHmin=35
soil="sandy loam"
crop="Broccoli"
#single kc calibration with fewer iteration
cal=cal.kc(ETo,P,RHmin,soil,crop,I=0,kc=NULL,CNII=67,
u2=2,FC=NULL,WP=NULL,h=NULL,Zr=NULL,lengths=NULL,fc=NULL,
kctype="single",region=NULL,regexpr=NULL,initgw=50,LAI=3,
rc=NULL,Rn=NULL,hmodel="gaussian",Zrmodel="linear",
xydata=NULL,ETa=ETo,a1=360,b1=-0.17,a2=240,b2=-0.27,
a3=-1.3,b3=6.6,a4=4.6,b4=-0.65)
parameters=cal$parameters
output=cal$mod$output
gof=cal$fit
ETc=cal$mod$output$ETc
TAW=cal$mod$output$TAW
#Single kc with different kcs. kc uses default values
#RMSE_adj and NRMSE_adj equal to NAN because the number of parameters more than time steps(days)
cal=cal.kc(ETo,P,RHmin,soil,crop,I=0,CNII=67,u2=2,FC=NULL,WP=NULL,
h=NULL,Zr=NULL,lengths=NULL,fc=NULL,kctype="single",region=NULL,
regexpr=NULL,initgw=50,a1=c(100,400,10),b1=c(-1,-0.1,0.1),
a2=c(100,400,10),b2=c(-1,1,0.1),a3=c(-2,1,0.1),b3=c(1,10,1),
a4=c(1,10,1),b4=c(-1.5,1,0.1),LAI=3,rc=NULL,
Rn=NULL,hmodel="gaussian",Zrmodel="linear",xydata=NULL,ETa=ETo)
#Example with fixed kcs
cal=cal.kc(ETo,P,RHmin,soil,crop,I=0,CNII=67,kc=c(0.1,1.15,1),
u2=2,FC=NULL,WP=NULL,h=NULL,Zr=NULL,lengths=NULL,
fc=NULL,kctype="single",region=NULL,regexpr=NULL,initgw=50,
b1=c(-1,-0.1,0.1),b2=c(-1,1,0.1),LAI=3,rc=NULL,Rn=NULL,
hmodel="gaussian",Zrmodel="linear",xydata=NULL,ETa=ETo)
#Example with spatial kcs
#landsat folder with original files but a subset
folder=system.file("extdata","stack",package="sebkc")
sebiauto=sebi(folder=folder,welev=317,Tmax=31,Tmin=28) #sebi model
kc2=stack(sebiauto$EF/2,sebiauto$EF,sebiauto$EF/3) #assign EF to kc
xydata=data.frame(cbind(longitude=data$longitude,latitude=data$latitude))
modEF=kc(ETo,P=P,RHmin,soil,crop,I,kc=kc2,Rn=8,lengths = c(4,4,2,2),xydata=xydata)
ETa=modEF$ETcxy[3:14]
calsp=cal.kc(ETo,P,RHmin,soil,crop,I=0,CNII=67,kc=kc2,u2=2,FC=NULL,
WP=WP,h=NULL,Zr=NULL,lengths = c(4,4,2,2),fc=NULL,kctype="single",
region=NULL,regexpr=NULL,initgw=50,b1=c(-1,-0.1,0.1),b2=c(-1,1,0.1),
LAI=3,rc=NULL,Rn=7,hmodel="gaussian",Zrmodel="linear",xydata=xydata,ETa=ETa)
gof=cal$fit
r2=cal$fit$r2
AIC=cal$fit$AIC
ETcxy=cal$mod$ETcxy
TAW=cal$mod$TAW
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.