is_snow_day#
- hydrometlib.meteorology.is_snow_day(albedo_expr, albedo_min_threshold, albedo_max_threshold)[source]#
Calculate if a given day is a snow day. True is snow, False if not.
\[\begin{split}\text{snow}_t = \begin{cases} \alpha_t \ge \tau_{max} & \text{if } \alpha_{t-1} \text{ is null} \\ \alpha_t \ge \tau_{min} & \text{if } \alpha_{t-1} \ge \tau_{max} \\ \alpha_t \ge \tau_{max} & \text{otherwise} \end{cases}\end{split}\]where \(\alpha_t\) is today’s albedo, \(\alpha_{t-1}\) yesterday’s, \(\tau_{min}\) the lower threshold and \(\tau_{max}\) the upper. Below the corresponding threshold the result is
False; if it falls between the two it is null.- Simple rules:
If today’s albedo is None, then is_snow_day is None
albedo >= albedo_max_threshold is a proxy for is_snow_day = True
albedo < albedo_min_threshold is a proxy for is_snow_day = False
Normally: albedo_min_threshold = 0.5, albedo_max_threshold = 0.35, see: https://doi.org/10.1002/hyp.14048
- Complex rules:
It is more likely that today is (not) a snow day if yesterday was (not).
- If there was snow the previous day, i.e. the previous day’s albedo >= 0.5, then
the current day is a snow day if the albedo > 0.35.
- If there was no snow the previous day, i.e. the previous day’s albedo < 0.5, then
the current day is a snow day if the albedo >= 0.5.
- Parameters:
albedo_expr (
Expr) – Albedo - measure of reflection with values between 0 and 1 [unitless fraction]albedo_min_threshold (
Expr) – Site attribute - albedo threshold below which there is no snow [unitless fraction, 0-1]albedo_max_threshold (
Expr) – Site attribute - albedo threshold above which there is snow [unitless fraction, 0-1]
- Return type:
Expr- Returns:
Expression or Series with boolean values.
Note
Order-dependent: rows must be sorted by time (one row per day), as the calculation compares each day with the previous one.