Skip to main content

align_packing_steps

Function align_packing_steps 

Source
pub fn align_packing_steps<'a>(
    current_mm: &'a [f64],
    previous_mm: Option<&'a [f64]>,
) -> (Cow<'a, [f64]>, Option<Cow<'a, [f64]>>)
Available on crate feature encoder only.
Expand description

Round two run-total accumulations onto the coarser of their two packing lattices before they are differenced, so a frame where the GRIB encoder coarsened its step does not difference rounding. Returns the planes to difference, (current, previous), borrowing whichever is unchanged. Mirrors align_packing_steps in xuebuild/derive.py, rounding half to even as NumPy does.