geotopExec: Execution of GEOtop Hydrological Model

Description Usage Arguments Details Examples

Description

Execution of GEOtop Hydrological Model

Usage

1
2
3
4
5
6
7
8
geotopExec(param = NULL,
  bin = "/home/ecor/local/geotop/GEOtop/bin/geotop-2.0.0", simpath,
  inpts.file = "geotop.inpts",
  runpath = "/home/ecor/temp/geotopOptim_tests", temporary.runpath = FALSE,
  clean = TRUE, recovery = !clean, getKeywords = NULL,
  data.frame = TRUE, date_field = "Date12.DDMMYYYYhhmm.", intern = FALSE,
  param.soil = TRUE, formatter = "%04d", paramPrefix = "Header",
  names_par = NULL, SoilType = 1, level = 1, time.aggregate = NULL, ...)

Arguments

param

vector of parameters to set for GEOtop simulation. Actually implemented only for soil type parameters. Deafault is NULL.

bin

binary executable file of GEOtop with full path

simpath

directory containg the inpts.file.

inpts.file

GEOtop configuretion *.inpts file. Default is geotop.inpts.

runpath

directory where to run GEOtop

temporary.runpath

logical value. If it TRUE GEOtop is running in a sub-directory of runpath made with randomly generated name. Default is FALSE.

clean

logical value. If it is TRUE previous simulations and other stuff in runpath were removed. See file.remove for functionality.

recovery

logical value. If it is TRUE, GEOtop simulation are recovered or overwriiten according to the GEOtop settings in inpts.file.

getKeywords

character vector containing the keywords of inpts.file which can be imported after the GEOtop run. Default is NULL, nothing is imported.

data.frame

logical vaue, see get.geotop.inpts.keyword.value. Default is TRUE, is enabled if getKeywords is not NULL.

date_field

character vaue, see get.geotop.inpts.keyword.value. Default is "Date12.DDMMYYYYhhmm.", is enabled if getKeywords is not NULL.

intern

logical value, see system.

param.soil

logical value If it TRUE (default) the vaues in param concerns soil parameters.

formatter

character decimal formatter. See get.geotop.inpts.keyword.value. Default is "%04d".

paramPrefix

character string. Default is "Header". If param.soil==TRUE, the soil parameters in param are named with the corrosponding parameter keywords in inpts.file to which the string paramPrefix is attached as a prefix. If paramPrefix is NA or NULL , the names of param elements must be matched with the corresponimg paramater name in the soil parameter data frame.

names_par

OPTIONAL vector of names for param

SoilType

soil type used for GEOtop Calibration. This must be an ID of the soil types indicated in the inpts.file of The GEOtop Simulation. Default is 1. If it is NA or NULL, the soil type is extracted from the soil map (SoilMapFile).

level

ID check point of a distributed or quasi-distributed GEOtop simulatiion where to perform the Point Calibration. Default is 1. See get.geotop.inpts.keyword.value

time.aggregate

list of the arguments for aggregate.zoo. If it is NULL (default) no time aggragation is applied to the function outputs. Otherwise, the outputs are aggregated within time intervals. In case of monthly averaged values, it must be set as list(FUN=mean,by="%Y-%m",na.rm=TRUE) where the by item is the string format according to POSIX standard for times and dates represented the aggregation interval ( sse strptime.

...

further arguments for get.geotop.inpts.keyword.value

Details

In this function, implementation, The parameters entered through param replace only the ones of the first ("0001") soil type declared in the GEOtop simulation directory, if SoilType argument is omitted. The elements of the vector param must be named with the respective keywords preceded by the prefix SOIL__ if the parameter is a soil property through SoilParFIle file (see package documentation); SCALAR__ if the parameter is scalar (one numeric value) and assigned directly in the inpts.file file (e.g. "geotop.inpts"); VECTOR__[X]__ if the parameter is assigned in the inpts.file file and is the X-th element of a vector (e.g. assignments of land use proprties).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
simpath <- system.file("Muntatschini_pnt_1_225_B2_004",package="geotopOptim")
bin <-   "/home/ecor/local/geotop/GEOtop/bin/geotop-2.0.0"
runpath <- "/home/ecor/temp/geotopOptim_tests"

vars <- c("SoilAveragedTempProfileFile",	"SoilLiqWaterPressProfileFile",
"SoilLiqContentProfileFile","SoilIceContentProfileFile","AvailableSoilWaterContent","PointOutputFile")


out <- geotopExec(bin=bin,simpath=simpath,runpath=runpath,
      clean=TRUE,getKeywords=vars,data.frame=TRUE,level=1)

param <- c(N=1.4,Alpha=0.0021,ThetaRes=0.05) 
out1 <- geotopExec(param=param,bin=bin,simpath=simpath,
			runpath=runpath,clean=TRUE,getKeywords=vars,
			data.frame=TRUE,level=1,intern=TRUE)


 ## Monthly-Aggregated Results: 

 out2 <- geotopExec(param=param,bin=bin,simpath=simpath,
			runpath=runpath,clean=TRUE,getKeywords=vars,
			data.frame=TRUE,level=1,intern=TRUE,
			time.aggregate=list(FUN=mean,by="%Y-%m",na.rm=TRUE))



 ## SCALAR__ and VECTOR__ input params

param <- c(N=1.4,Alpha=0.0021,ThetaRes=0.05,SCALAR__LSAI=4.2)

out3 <- geotopExec(param=param,bin=bin,simpath=simpath,
			runpath=runpath,clean=TRUE,getKeywords=vars,
			data.frame=TRUE,level=1,intern=TRUE)


param <- c(N=1.4,Alpha=0.0021,ThetaRes=0.05,VECTOR__1__LSAI=4.2)

out4 <- geotopExec(param=param,bin=bin,simpath=simpath,
			runpath=runpath,clean=TRUE,getKeywords=vars,
			data.frame=TRUE,level=1,intern=TRUE)

ecor/geotopOptim documentation built on May 15, 2019, 8:54 p.m.