geotopPSO: GEOtop calibration through Particle Swam Optimization

View source: R/geotop.pso.2.R

geotopPSOR Documentation

GEOtop calibration through Particle Swam Optimization

Description

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.

Usage

geotopPSO(
  par = NULL,
  fn = geotopGOF,
  gof.mes = "KGE",
  final.run = TRUE,
  upper,
  lower,
  temporary.runpath = TRUE,
  ...,
  hydroPSOfun = c("hydroPSO", "lhoat")
)

geotoplhoat(...)

Arguments

par

model parameters. ((TO DO) See hydroPSO,geotopGOF and geotopExec

fn

function to optimize (minimize or maximize). Default is geotopGOF. See hydroPSO.

gof.mes

string(s) containing adopted numerical goodness-of-fit measure. If it is NULL (Default), all mesasures returned by gof are calculated.

final.run

logical value. It is TRUE (default), simulated time series with optimal set of parameteers are added in the list object returned by the function.

upper, lower

see upper and lowe in hydroPSO

temporary.runpath

see geotopExec. Default is TRUE.

...

further arguments for hydroPSO.

hydroPSOfun

used function name of hydroPSO package: hydroPSO or lhoat.

Details

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.

See Also

hydroPSO,goflhoat

Examples




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


ecor/geotopOptim2 documentation built on April 19, 2023, 4:35 a.m.