Importing a GEOtop Keyword and its Value into R
It returns the values of a keyword of "geotop.inpts" file or data frame with the suitable format.
get.geotop.inpts.keyword.value(keyword, inpts.frame = NULL, vector_sep = NULL, col_sep = ",", numeric = FALSE, format = "%d/%m/%Y %H:%M", date = FALSE, tz = "Etc/GMT-1", raster = FALSE, file_extension = ".asc", add_wpath = FALSE, wpath = NULL, use.read.raster.from.url = TRUE, data.frame = FALSE, formatter = "%04d", level = 1, date_field = "Date", isNA = -9999, matlab.syntax = TRUE, projfile = "geotop.proj", start_date = NULL, end_date = NULL, ContinuousRecovery = 0, ContinuousRecoveryFormatter = "_crec%04d", zlayer.formatter = NULL, z_unit = c("centimeters", "millimeters"), geotop_z_unit = "millimeters", add_suffix_dir = NULL, MAXNROW = 4, header.only = FALSE, ...)
keyword |
keyword name |
inpts.frame |
data frame returned by |
vector_sep |
character value for the separator character if Keyword Value must be returned as a vector, otherwise it is |
col_sep |
character value for the separator character of columuns. It is used if Keyword Value is returned as a data frema or zoo object or list of these objects. Default is |
numeric |
logical value. If |
format |
string format representing the date, see |
date |
logical value. If |
tz |
format string representing the time zone, see |
raster |
logical value. Default is |
file_extension |
Extension to be added to the keyword if keyword is a file name. Default is |
add_wpath |
logical value. Default is |
wpath |
working directory containing GEOtop files (included the inpts file). It is mandatory if |
use.read.raster.from.url |
logical value. Default is |
data.frame |
logical value. It is an option for tabular data. If |
formatter |
string value. It is the decimal formatter contained in the file name and used in case the tabular data are referred at several points. Default is |
level |
integer values. Numbers incating all the identandification numbers of the files containing the requested data frames. Default is 1, correspondig to the decimal formatter |
date_field |
string value. Default is "Date", otherwise defined by the value of |
isNA |
numeric value indicating NA in geotop ascii files. Default is -9999.00 |
matlab.syntax |
logical value. Default is |
projfile |
fileneme of the GEOtop projection file. Default is |
start_date, end_date |
null objects or dates in |
ContinuousRecovery |
integer value. Default is 0. It is used for tabular output data and is the number of times GEOtop simulation broke during its running and was re-launched with 'Contiuous Recovery' option. |
ContinuousRecoveryFormatter |
character string. Default is |
zlayer.formatter |
decimal formatter. It is used if |
z_unit |
z coordinate measurement unit. GEOtop values expressed in millimeters which are converted to centimeters by default. Default is |
geotop_z_unit |
z coordinate measurement unit used by GEOtop. Default is |
add_suffix_dir |
character string. Add a suffix at the directory reported in the keyword value |
MAXNROW |
maximum number accepted for |
header.only |
logical value. Default is |
... |
further arguments of |
the keyword value
If inpts.frame
is NULL
, inpts.frame
will be obtained by calling the function declared.geotop.inpts.keywords
with ...
arguments.
library(geotopbricks) #Simulation working path ## Not run: wpath <- 'https://www.rendena100.eu/public/geotopbricks/simulations/panola13_run2xC_test3' prefix <- get.geotop.inpts.keyword.value("SoilLiqWaterPressTensorFile",wpath=wpath) slope <- get.geotop.inpts.keyword.value("SlopeMapFile",raster=TRUE,wpath=wpath) bedrock_depth <- get.geotop.inpts.keyword.value("BedrockDepthMapFile",raster=TRUE,wpath=wpath) layers <- get.geotop.inpts.keyword.value("SoilLayerThicknesses",numeric=TRUE,wpath=wpath) names(layers) <- paste("L",1:length(layers),sep="") ##### set van genuchten parameters to estimate water volume theta_sat <- get.geotop.inpts.keyword.value("ThetaSat",numeric=TRUE,wpath=wpath) theta_res <- get.geotop.inpts.keyword.value("ThetaRes",numeric=TRUE,wpath=wpath) alphaVG <- get.geotop.inpts.keyword.value("AlphaVanGenuchten", numeric=TRUE,wpath=wpath) # expressed in mm^-1 nVG <- get.geotop.inpts.keyword.value("NVanGenuchten",numeric=TRUE,wpath=wpath) ##### end set van genuchten parameters to estimate water volume ##### set meteo data start <- get.geotop.inpts.keyword.value("InitDateDDMMYYYYhhmm",date=TRUE,wpath=wpath,tz="A") end <- get.geotop.inpts.keyword.value("EndDateDDMMYYYYhhmm",date=TRUE,wpath=wpath,tz="A") nmeteo <- get.geotop.inpts.keyword.value("NumberOfMeteoStations",numeric=TRUE,wpath=wpath) level <- 1:nmeteo # Uncomment the following lises to run the R code: ## set meteo data ## End(Not run) ## Not run: meteo <- get.geotop.inpts.keyword.value("MeteoFile",wpath=wpath,data.frame=TRUE, level=level,start_date=start,end_date=end) ## End(Not run) ##### end set meteo data ## IMPORTING AN OUTPUT SOIL MOISTURE PROFILE: wpath <- 'https://www.rendena100.eu/public/geotopbricks/simulations/Muntatschini_pnt_1_225_B2_004' ## Not run: SMC <- get.geotop.inpts.keyword.value("SoilLiqContentProfileFile", wpath=wpath,data.frame=TRUE,date_field="Date12.DDMMYYYYhhmm.", formatter="%04d") SMCz <- get.geotop.inpts.keyword.value("SoilLiqContentProfileFile", wpath=wpath,data.frame=TRUE,date_field="Date12.DDMMYYYYhhmm.", formatter="%04d",zlayer.formatter="z%04d") ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.