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]
pub fn new() -> Self[src]
Create a new sounding with default values. This is a proxy for default with a clearer name.
pub fn set_station_info(self, new_value: StationInfo) -> Self[src]
Set the station info.
pub fn get_station_info(&self) -> StationInfo[src]
Get the station info
pub fn set_profile(self, var: Profile, values: Vec<Option<f64>>) -> Self[src]
Set a profile variable
pub fn get_profile(&self, var: Profile) -> &[Option<f64>][src]
Get a profile variable as a slice
pub 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
pub fn get_surface_value(&self, var: Surface) -> Option<f64>[src]
Get a surface variable
pub fn get_location(&self) -> (Option<f64>, Option<f64>, Option<f64>)[src]
pub fn set_location<T, U, V>(
self,
latitude: T,
longitude: U,
elevation: V
) -> Self where
Option<f64>: From<T> + From<U> + From<V>, [src]
self,
latitude: T,
longitude: U,
elevation: V
) -> Self where
Option<f64>: From<T> + From<U> + From<V>,
Set location information
pub 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
pub fn get_station_num(&self) -> Option<i32>[src]
Station number, USAF number, eg 727730
pub 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.
pub fn get_lead_time(&self) -> Option<i32>[src]
Difference in model initialization time and valid_time in hours.
pub fn get_valid_time(&self) -> Option<NaiveDateTime>[src]
Valid time of the sounding
pub 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
pub 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.
pub fn top_down(&self) -> ProfileIterator[src]
Get a top down iterator over the data rows. The last value returned is the surface values.
pub fn get_data_row(&self, idx: usize) -> Option<DataRow>[src]
Get a row of data values from this sounding.
pub fn surface_as_data_row(&self) -> DataRow[src]
Get the surface values in a DataRow format.
pub fn fetch_nearest_pnt(&self, target_p: f64) -> DataRow[src]
Given a target pressure, return the row of data values closest to this one.
Trait Implementations
impl Debug for Sounding[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more