SimToPar: HYPE Calibration Outputs to par.txt

SimToParR Documentation

HYPE Calibration Outputs to par.txt

Description

Update par.txt with values from an allsim.txt or bestsims.txt file

Usage

AllSimToPar(simfile, row, par)

BestSimsToPar(simfile, row, par)

Arguments

simfile

Imported allsim.txt or bestsims.txt file imported as data frame.

row

Integer, row number indicating row containing the parameter values that should be replaced/added to par.

par

Imported par.txt file that should be updated using parameter values from simfile. Typically imported using ReadPar.

Details

AllSimToPar and BestSimsToPar can be used to update an existing par.txt file with the parameter values from a HYPE allsim.txt or bestsims.txt file. If a parameter in the allsim or bestsims file already exists in par, then the parameter values will be overwritten in par. If the parameter does not exist, then the parameter will be added to the bottom of the output.

Value

AllSimToPar and BestSimsToPar return a list of named vectors in the format used by ReadPar.

See Also

ReadPar for HYPE par.txt import; WritePar to export HYPE par.txt files

Examples

simfile <- read.table(file = system.file("demo_model", "results",
  "bestsims.txt",
  package = "HYPEtools"
), header = TRUE, sep = ",")
par <- ReadPar(filename = system.file("demo_model", "par.txt", package = "HYPEtools"))
BestSimsToPar(simfile, 1, par)


HYPEtools documentation built on Sept. 11, 2024, 8:34 p.m.