Skip to contents

Execute SAC-SMA, SNOW17, return total channel inflow per zone, and model states

Usage

sac_snow_states(dt_hours, forcing, pars)

Arguments

dt_hours

timestep in hours

forcing

data frame with with columns for forcing inputs

pars

sac parameters

Value

data.frame (1 column per zone) of unrouted channel inflow (tci), sac states uztwc, uzfwc, lztwc, lzfsc, lzfpc, adimc, and snow water equivalent (swe), and adjusted forcing data.

Examples

# Simple: full model chain via the bundled example, tci and states returned together
run <- load_example("NRKW1")
head(run$sacsnow_tci)
#>           [,1]      [,2]
#> [1,] 0.2462325 0.9751408
#> [2,] 0.2488699 0.9983493
#> [3,] 0.2476989 0.9731867
#> [4,] 0.2465621 0.9493444
#> [5,] 0.2454517 0.9267464
#> [6,] 0.2443759 0.9053271

# Low-level: populate etd_mm / pet_mm via fa_nwrfc first, then
# get per-zone tci and states directly.
data(nrkw1_forcing)
data(nrkw1_pars)
dt_hours <- 6
forcing_adj <- fa_nwrfc(dt_hours, nrkw1_forcing, nrkw1_pars)
states <- sac_snow_states(dt_hours, forcing_adj, nrkw1_pars)