Struct sounding_base::Sounding[][src]

pub struct Sounding { /* fields omitted */ }

All the variables stored in the sounding.

The upper air profile variables are stored in parallel vectors. If a profile lacks a certain variable, e.g. cloud fraction, that whole vector has length 0 instead of being full of missing values.

Methods

impl Sounding
[src]

Create a new sounding with default values. This is a proxy for default with a clearer name.

Examples

use sounding_base::Sounding;

let snd = Sounding::new();
println!("{:?}", snd);

Set the station info.

Examples

use sounding_base::{Sounding, StationInfo};

let stn = StationInfo::new();
// set station values

let snd = Sounding::new()
    .set_station_info(stn);

Get the station info

Examples

use sounding_base::{Sounding, StationInfo};

let snd = make_test_sounding();
let stn: StationInfo = snd.get_station_info();

println!("{:?}", stn);

Set a profile variable

Examples

extern crate optional;
use optional::some;


let p = vec![some(1000.0), some(925.0), some(850.0), some(700.0)];

let snd = Sounding::new()
    .set_profile(Profile::Pressure, p);

println!("{:?}", snd);

Get a profile variable as a slice

Examples

use sounding_base::{Sounding, Profile};

let snd = make_test_sounding();
let data = snd.get_profile(Profile::Pressure);

for p in data {
    if p.is_some() {
        println!("{:?}", p);
    } else {
        println!("missing value!");
    }
}

Set a surface variable

Get a surface variable

Difference in model initialization time and valid_time in hours.

Difference in model initialization time and valid_time in hours.

Valid time of the sounding

Builder method to set the valid time of the sounding

Get a bottom up iterator over the data rows. The first value returned from the iterator is surface values.

Get a top down iterator over the data rows. The last value returned is the surface values.

Get a row of data values from this sounding.

Get the surface values in a DataRow format.

Given a target pressure, return the row of data values closest to this one.

Trait Implementations

impl Clone for Sounding
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Sounding
[src]

Formats the value using the given formatter. Read more

impl Default for Sounding
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Sounding

impl Sync for Sounding