View source: R/prep_calibration.R
write_calibration_cal | R Documentation |
Write calibration file
write_calibration_cal(swatTxtInOut_path, calibration_df)
swatTxtInOut_path |
Path to SWAT scenario directory |
calibration_df |
data.frame with calibration data (see details) |
This function writes the calibration file calibration.cal in the directory
swatTxtInOut_path
.
The input parameter calibration_df
should contain columns created by
add_cal_parm
, i.e.:
NAME
CHG_TYPE - one of "absval", "abschg", "pctchg"
VAL
CONDS
LYR1
LYR2
YEAR1
YEAR2
DAY1
DAY2
OBJ_TOT
calibration_df <- add_cal_parm(param = "cn2", change_type = "pctchg", val = 10) %>% add_cal_parm(param = "cn3", change_type = "pctchg", val = 20) write_calibration_cal(tempdir(), calibration_df) readLines(file.path(tempdir(), "calibration.cal"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.