Struct sounding_base::sounding::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]
fn new() -> Self
[src]
Create a new sounding with default values. This is a proxy for default with a clearer name.
fn set_station_info(self, new_value: StationInfo) -> Self
[src]
Set the station info.
fn get_station_info(&self) -> StationInfo
[src]
Get the station info
fn set_profile(self, var: Profile, values: Vec<Option<f64>>) -> Self
[src]
Set a profile variable
fn get_profile(&self, var: Profile) -> &[Option<f64>]
[src]
Get a profile variable as a slice
fn set_surface_value<T>(self, var: Surface, value: T) -> Self where
Option<f64>: From<T>,
[src]
Option<f64>: From<T>,
Set a surface variable
fn get_surface_value(&self, var: Surface) -> Option<f64>
[src]
Get a surface variable
fn set_index<T>(self, var: Index, value: T) -> Self where
Option<f64>: From<T>,
[src]
Option<f64>: From<T>,
Set an index value
fn get_index(&self, var: Index) -> Option<f64>
[src]
Get an index value
fn get_location(&self) -> (Option<f64>, Option<f64>, Option<f64>)
[src]
fn set_location<T, U, V>(self, latitude: T, longitude: U, elevation: V) -> Self where
Option<f64>: From<T> + From<U> + From<V>,
[src]
Option<f64>: From<T> + From<U> + From<V>,
Set location information
fn set_station_num<T>(self, station_num: T) -> Self where
Option<i32>: From<T>,
[src]
Option<i32>: From<T>,
Station number, USAF number, eg 727730
fn get_station_num(&self) -> Option<i32>
[src]
Station number, USAF number, eg 727730
fn set_lead_time<T>(self, lt: T) -> Self where
Option<i32>: From<T>,
[src]
Option<i32>: From<T>,
Difference in model initialization time and valid_time
in hours.
fn get_lead_time(&self) -> Option<i32>
[src]
Difference in model initialization time and valid_time
in hours.
fn get_valid_time(&self) -> Option<NaiveDateTime>
[src]
Valid time of the sounding
fn set_valid_time<T>(self, valid_time: T) -> Self where
Option<NaiveDateTime>: From<T>,
[src]
Option<NaiveDateTime>: From<T>,
Builder method to set the valid time of the sounding
fn bottom_up(&self) -> ProfileIterator
[src]
Get a bottom up iterator over the data rows. The first value returned from the iterator is surface values.
fn top_down(&self) -> ProfileIterator
[src]
Get a top down iterator over the data rows. The last value returned is the surface values.
fn get_data_row(&self, idx: usize) -> Option<DataRow>
[src]
Get a row of data values from this sounding.
fn surface_as_data_row(&self) -> DataRow
[src]
Get the surface values in a DataRow
format.
fn fetch_nearest_pnt(&self, target_p: f64) -> DataRow
[src]
Given a target pressure, return the row of data values closest to this one.