Skip to contents

Replace ptps column with ptps derived using rain snow line code (lapse rate + MAT)

Usage

rsnwelev(forcing, pars, ae_tbl)

Arguments

forcing

data frame with columns for forcing inputs

pars

rsnwelev and snow17 parameters

ae_tbl

data.table with col1 containing quantile info and subsequent col with elev for each zone

Value

Matrix (1 column per zone) of the forcing input argument with ptps replaced with that derived from rsnwelev model

Examples

# area_elev_curve is bundled for SFLN2 (2 zones); pair it with SFLN2 data.
data(sfln2_forcing)
data(sfln2_pars)
data(area_elev_curve)
# rsnwelev only needs the zones that match the area-elevation table,
# so drop the SFLN2-CU consumptive-use zone before calling.
forcing_zones <- sfln2_forcing[c("SFLN2-1", "SFLN2-2")]
forcing_adj <- rsnwelev(forcing_zones, sfln2_pars, area_elev_curve)