geotopPSO | R Documentation |
This function performs a calibration or a senisitivity analyisis of
the GEOtop Distributed Hydrological Model through a Particle Swam Optimization or LH-OAT method respectively.
This function is a wrapper of hydroPSO
or lhoat
.
The use of either hydroPSO
or lhoat
is declared by the argument hydroPSOfun
.
geotopPSO(
par = NULL,
fn = geotopGOF,
gof.mes = "KGE",
final.run = TRUE,
upper,
lower,
temporary.runpath = TRUE,
...,
hydroPSOfun = c("hydroPSO", "lhoat")
)
geotoplhoat(...)
par |
model parameters. ((TO DO) See |
fn |
function to optimize (minimize or maximize). Default is |
gof.mes |
string(s) containing adopted numerical goodness-of-fit measure. If it is |
final.run |
logical value. It is |
upper , lower |
see |
temporary.runpath |
see |
... |
further arguments for |
hydroPSOfun |
used function name of |
The function fn
, in case it is different from the default value geotopGOF
, must always have the arguments gof.mes
and gof.expected.value.for.optim
.
hydroPSO
,gof
lhoat
wpath <- system.file('geotop-simulation/B2site',package="geotopOptim2")
bin <- "/home/ecor/local/sw/rendena100/geotop/geotop"
runpath <- tempdir() ###"/home/ecor/temp/geotopOptim_tests"
var <- 'soil_moisture_content_50'
param <- c(N=1.4,Alpha=0.0021,ThetaRes=0.05)
ssout <- geotopGOF(x=param,run.geotop=TRUE,bin=bin,
simpath=wpath,runpath=runpath,clean=TRUE,data.frame=TRUE,
level=1,intern=TRUE,target=var,temporary.runpath=TRUE)
x <- param <- c(N=1.4,Alpha=0.0021,ThetaRes=0.05,
LateralHydrConductivity=0.021,NormalHydrConductivity=0.021)
upper <- x*3
upper["LateralHydrConductivity"] <- 0.1
upper["NormalHydrConductivity"] <- 0.1
lower <- x/3
lower["N"] <- 1.1
lower["LateralHydrConductivity"] <- 0
lower["NormalHydrConductivity"] <- 0
control <- list(maxit=4,npart=2) ## Maximim 4 iterations!!
## Not run:
pso <- geotopPSO(par=x,run.geotop=TRUE,bin=bin,
simpath=wpath,runpath=runpath,clean=TRUE,data.frame=TRUE,
level=1,intern=TRUE,target=var,gof.mes="KGE",lower=lower,upper=upper,control=control)
## End(Not run)
#####lhoat <- geotoplhoat(par=x,obs=obs_SWC,... ## TO DO
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.