Crate olympian

Source
Expand description

Quality control routines for meteorological data.

In addition to the routines themselves, this crate also provides a Flag type, as well as [SeriesCache] and [SpatialCache] as standard formats for data to be fed into timeseries and spatial QC tests respectively.

use olympian::{checks::spatial::{buddy_check, BuddyCheckArgs}, Flag, SpatialTree, SingleOrVec};

assert_eq!(
    buddy_check(
        &[Some(0.), Some(0.), Some(1.)],
        &SpatialTree::from_latlons(
            [60., 60., 60.].to_vec(),
            [60., 60.00011111, 60.00022222].to_vec(),
            [0., 0., 0.].to_vec(),
        ),
        &BuddyCheckArgs {
            radii: SingleOrVec::Single(10000.),
            min_buddies: SingleOrVec::Single(1),
            threshold: 1.,
            max_elev_diff: 200.,
            elev_gradient: -0.0065,
            min_std: 0.01,
            num_iterations: 2,
        },
        None,
    )
    .unwrap(),
    [Flag::Pass, Flag::Pass, Flag::Fail]
)

Modules§

  • Algorithms that can be used to QC meteorological data.

Structs§

  • Container for metereological data
  • An R-tree to spatially index data to spatially index data
  • A series of values representing a slice of a timeseries, tagged with an identifier of the timeseries they are from.
  • Unix timestamp, inner i64 is seconds since unix epoch

Enums§

  • Error type for Olympian
  • Flag indicating result of a QC test for a given data point
  • A type that can represent either a vector, or a single value