Automatically calibrates the model with the help of a combination of golden section search and successive parabolic interpolation.
# S4 method for RPhosFate
autoCalibrate(
x,
substance,
col,
interval,
metric,
tol = min(interval) * 0.1,
parameter = NULL
)
An S4 RPhosFate
river catchment object.
A character string specifying the substance to calculate.
A character string specifying the calibration data column with the respective substance river loads.
A numeric vector specifying the end-points of the interval to be searched.
A character string specifying the metric to optimise. See
calibrationQuality
for available metrics.
A numeric scalar specifying the desired accuracy of the parameter used for optimisation (not the metric).
By default, SS are calibrated utilising the overland
deposition rate and all other substances are calibrated utilising their
respective enrichment ratio. This argument can be used to specify a
dedicated parameter utilised for calibration via a character string:
"ns_dep_ovl"
for overland or "ns_dep_cha"
for channel deposition rate.
An S4 RPhosFate
river catchment object and side effects in
the form of raster files.
# \donttest{
# temporary demonstration project copy
cv_dir <- demoProject()
# load temporary demonstration project
x <- RPhosFate(
cv_dir = cv_dir,
ls_ini = TRUE
)
#> Warning: sf required
#> Warning: sf required
# presupposed method calls
x <- firstRun(x, "SS")
x <- snapGauges(x)
x <- autoCalibrate(
x,
"SS",
col = "SS_load",
interval = c(10e-4, 20e-4),
metric = "NSE"
)# }
#> NSE: 0.9202848
#> mNSE: 0.7948886
#> KGE: 0.8813162
#> RMSE: 3.013774
#> PBIAS: 11.4
#> RSR: 0.2305286
#> RCV: 0.974027
#> GMRAE: 0.07787891
#> MdRAE: 0.05117665
#>
#> In-channel retention ratio: 0
#>
#> NSE: 0.9481625
#> mNSE: 0.7967036
#> KGE: 0.931081
#> RMSE: 2.430313
#> PBIAS: -6.2
#> RSR: 0.1858987
#> RCV: 0.9769786
#> GMRAE: 0.1784269
#> MdRAE: 0.3456409
#>
#> In-channel retention ratio: 0
#>
#> NSE: 0.8845115
#> mNSE: 0.7383309
#> KGE: 0.8475804
#> RMSE: 3.627519
#> PBIAS: -14.9
#> RSR: 0.277475
#> RCV: 0.9772123
#> GMRAE: 0.1727009
#> MdRAE: 0.2020938
#>
#> In-channel retention ratio: 1.110223e-16
#>
#> NSE: 0.961589
#> mNSE: 0.8081648
#> KGE: 0.9681348
#> RMSE: 2.09203
#> PBIAS: -1
#> RSR: 0.1600229
#> RCV: 0.9764393
#> GMRAE: 0.1737914
#> MdRAE: 0.2273883
#>
#> In-channel retention ratio: -2.220446e-16
#>
#> NSE: 0.9615765
#> mNSE: 0.8134918
#> KGE: 0.9661575
#> RMSE: 2.09237
#> PBIAS: 1.4
#> RSR: 0.1600489
#> RCV: 0.9760944
#> GMRAE: 0.1602222
#> MdRAE: 0.1731449
#>
#> In-channel retention ratio: -2.220446e-16
#>
#> NSE: 0.9579342
#> mNSE: 0.8030787
#> KGE: 0.9554299
#> RMSE: 2.189297
#> PBIAS: -3.3
#> RSR: 0.167463
#> RCV: 0.9767136
#> GMRAE: 0.1804247
#> MdRAE: 0.2796064
#>
#> In-channel retention ratio: -2.220446e-16
#>
#> NSE: 0.961589
#> mNSE: 0.8081648
#> KGE: 0.9681348
#> RMSE: 2.09203
#> PBIAS: -1
#> RSR: 0.1600229
#> RCV: 0.9764393
#> GMRAE: 0.1737914
#> MdRAE: 0.2273883
#>
#> In-channel retention ratio: -2.220446e-16
#>
#> $maximum
#> [1] 0.001540684
#>
#> $objective
#> NSE
#> 0.961589
#>