replace.keyword: It replaces some keyword values of 'geotop.inpts' file with...

View source: R/replace.keyword.v0.R

replace.keywordR Documentation

It replaces some keyword values of geotop.inpts file with the ones of anoter *.inpts value

Description

It replaces some keyword values of geotop.inpts file with the ones of anoter *.inpts value

Usage

replace.keyword(
  x,
  y = "geotop.inpts",
  file.output = NULL,
  write.file.output = TRUE,
  wpath = NULL,
  ...
)

Arguments

x

filename of the *.inpts with the "new" keyword value

y

filename of the *.inpts with the "old" keyword value. Default is "geotop.inpts".

file.output

filename where to write the comprehensive new geotop.inpts file. If it is NULL (default), the fileneme is assigned by y.

write.file.output

logical value. If it is TRUE, the output of the function is written in he file file.output.

wpath

working path to the GEOtop simulation folder containing the x and y files.

...

further arguments

Details

This function repleces some keword values of y with the ones indicated in y. It is useful to replace the meteo station metedata, for instance, when the meteorological station of a study cases are modified. The function returns the new geotop.inpts file as a vector of character strings. If write.file.output==TRUE, the output is written in an extarnal file, e.g. "geotop.inpts" newly (this option is suggested).

Author(s)

Emanuele Cordano

Examples


library(geotopbricks)
wpath <- system.file('template/meteo_ex',package="geotopbricks")
x <- "meteo.inpts"
zl <- replace.keyword(x,wpath=wpath,write.file.output=FALSE)




geotopbricks documentation built on May 29, 2024, 8:10 a.m.