Skip to contents

Calculates the duration between two percentage points of snowmelt progression.

Usage

compute_tSnowmelt(
  Q,
  p1,
  p2,
  d = 5,
  w = 0.9,
  a = 0.925,
  passes = 3,
  method = "Wal"
)

Arguments

p1, p2

Numerics (0-1) specifying start and end percentages

Value

Integer duration (in time steps) between p1 and p2 snowmelt percentages.

Details

Typical usage:

  • p1=0.05 (start of melt period)

  • p2=0.95 (end of melt period)

  • Returns number of days between these events

See also

compute_tVolSnowmelt for single timing calculation

Examples

Q <- c(rep(5,30), seq(5,25,length.out=30), rep(25,30), seq(25,5,length.out=30))
# Calculate duration between 10% and 90% snowmelt:
compute_tSnowmelt(Q, p1=0.1, p2=0.9)
#> [1] 70