Skip to main content

deaverage_precipitation

Function deaverage_precipitation 

Source
pub fn deaverage_precipitation(
    current_average: &[f64],
    hour: i64,
    previous_average: Option<&[f64]>,
    previous_hour: Option<i64>,
    window_hours: i64,
) -> Result<Vec<f64>>
Available on crate feature encoder only.
Expand description

Mean rate (mm/h) over the step ending at hour, from GFS window-cumulative average rates (kg/m^2 s, sflux PRATE ave).

Each frame is scaled to mm accumulated since its window start and differenced against the previous frame of the same window; the window’s first frame differences against zero. The rate divisor is the interval the difference spans, so a mixed-step axis needs no external step argument.