pq_snowstorage: Compute P-Q snow storage estimate

Description Usage Arguments Value

View source: R/pq_approach.R

Description

Given the cumulative curve of precipitation (Pcum) and streamflow (Qcum), it computes the differences (Pcum - Qcum) and computes a snow storage estimate corresponding to the maximum of the Pcum - Qcum curve.

Usage

1
pq_snowstorage(Pcum, Qcum, period = NULL, return_data = FALSE)

Arguments

Pcum

Numeric vector. Cumulative precipitation over one hydrological year (or inter-annual average hydrological year).

Qcum

Numeric vector. Cumulative streamflow over one hydrological year (or inter-annual average hydrological year).

period

NULL or a numeric vector of length 2 that defines the end and start (number of days) of the period where the maximum of the P-Q curve is to be found.

return_data

logical. Should the intermediate results (P-Q curve and number of the day corresponding to the maximum of the P-Q curve) be also returned? Default is FALSE. and a single value corresponding to the snow storage estimate is returned. If TRUE, a list with the snow storage estimate ('S'), and the P-Q curve ('PQ') and the date of the maximum of the P-Q curve ('tQcumMax') is returned.

Value

If return_data is FALSE, a single value corresponding to the snow storage estimate is returned. Otherwise, a list with the snow storage estimate ('S'), and the P-Q curve ('PQ') and the date of the maximum of the P-Q curve ('tQcumMax') is returned.


IvanHeriver/hsa-R-package documentation built on Dec. 17, 2021, 11:32 p.m.