sw_inputDataFromFiles: Read simulation input data from files on disk

View source: R/Rsw.R

sw_inputDataFromFilesR Documentation

Read simulation input data from files on disk

Description

Read simulation input data from files on disk

Usage

sw_inputDataFromFiles(dir = "", files.in = "files.in", quiet = FALSE)

Arguments

dir

a character vector that represents the path to the input data. Use with files.in

files.in

A character string. The file name (and path relative to dir) of the files input file that contains information about the remaining input files.

quiet

logical. Quiet mode hides any SOILWAT2 messages, see sw_verbosity.

Value

An object of class swInputData.

See Also

  • sw_exec for running a simulation

  • sw_inputData and sw_inputDataFromFiles for data input

  • dbW_getWeatherData and getWeatherData_folders for weather data input.

Examples


path_demo <- system.file("extdata", "example1", package = "rSOILWAT2")


## ------ Simulation with data prepared beforehand ------------
## Read inputs from files on disk (including daily weather forcing)
sw_in2 <- sw_inputDataFromFiles(dir = path_demo, files.in = "files.in")

## Slots of the input object of \code{\linkS4class{swInputData}}
utils::str(sw_in2, max.level = 2)

## Execute the simulation run
sw_out2 <- sw_exec(inputData = sw_in2)



Burke-Lauenroth-Lab/Rsoilwat documentation built on Dec. 9, 2023, 12:41 a.m.