Calculates the maximum length of consecutive dry days.
spell_length_max(daily_prec, date_factor, threshold, op, spells_can_span_years)
Numeric vector. Maximum spell lengths.
Numeric vector. Daily precipitation data.
Factor. Date grouping factor.
Numeric. Precipitation threshold.
Character. Comparison operator.
Logical. Whether spells can span across years.