add_cal_parm: Add calibration parameter

View source: R/prep_calibration.R

add_cal_parmR Documentation

Add calibration parameter

Description

Add calibration parameter

Usage

add_cal_parm(
  calibration_df = NULL,
  param,
  change_type,
  val,
  conds = NULL,
  layers = NULL,
  dates = NULL
)

Arguments

calibration_df

NULL or tibble from previous add_cal_parm

param

Parameter name

change_type

One of absval, abschng, pctchng,

val

Value of change

conds

Not implemented

layers

Numeric vector length two, first to last soil layer

dates

Date vector of length two, first to last date for param to apply

Details

This function is used to build a dataframe for calibration, specifically to write the calibration file calibration.cal using write_calibration_cal(). The function is pipe-friendly for adding multiple parameters.

Examples

calibration_df <- add_cal_parm(param = "cn2", change_type = "pctchg", val = 10)
calibration_df2 <- calibration_df %>%
  add_cal_parm(param = "cn3", change_type = "pctchg", val = 20)

gopalpenny/goSWATplus documentation built on Nov. 8, 2022, 9:27 p.m.