#[non_exhaustive]pub struct WyomingSounding {
pub latitude_deg: f64,
pub longitude_deg: f64,
pub release_unix_s: i64,
pub levels: Vec<WyomingLevel>,
pub dropped: Vec<DroppedLevel>,
}Expand description
A sounding read from the archive’s answer: the ground and the levels above it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.latitude_deg: f64Where the balloon was released, degrees north, from the first row: the station, or the sonde’s own position at release in a BUFR file.
longitude_deg: f64Where the balloon was released, degrees east, from the first row.
release_unix_s: i64When the balloon was released, seconds since the Unix epoch (UTC), from the first row.
levels: Vec<WyomingLevel>The levels kept, the ground first.
dropped: Vec<DroppedLevel>The rows left out, in order.
Implementations§
Source§impl WyomingSounding
impl WyomingSounding
Sourcepub fn parse(body: &[u8]) -> Result<Self, WyomingError>
pub fn parse(body: &[u8]) -> Result<Self, WyomingError>
Reads the archive’s comma-separated answer.
§Errors
WyomingError::Missingwhen a column is absent (an answer that is not the archive’s text has no header to find), andWyomingError::Unitswhen one is in another unit.WyomingError::Rowwhen the header has more than 64 columns or a column twice, there are more thanMAX_ROWSrows, a row has the wrong number of fields, or a field is not a number (or, in the first row, the time is not a date).WyomingError::NoGroundwhen there is no row, or the first is missing a value or has one out of range.WyomingError::GroundMisfitwhen a chain of rows that fit, without the ground, beats every chain with it.WyomingError::Misfitwhen more thanMAX_MISFITSrows follow the end of the chain of rows that fit.
Sourcepub fn sounding(
&self,
wind_interpolation: WindInterpolation,
) -> Result<SoundingProfile, AtmosError>
pub fn sounding( &self, wind_interpolation: WindInterpolation, ) -> Result<SoundingProfile, AtmosError>
The sounding as an atmosphere with its wind: every level kept, each with its pressure, temperature, relative humidity (above 100% taken as 100%) and wind.
§Errors
What SoundingProfile::new refuses. WyomingSounding::parse keeps only levels within
physical bounds, and fetch checks the profile too, so an answer that fails here is
never cached.
Trait Implementations§
Source§impl Clone for WyomingSounding
impl Clone for WyomingSounding
Source§fn clone(&self) -> WyomingSounding
fn clone(&self) -> WyomingSounding
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WyomingSounding
impl Debug for WyomingSounding
Source§impl<'de> Deserialize<'de> for WyomingSounding
impl<'de> Deserialize<'de> for WyomingSounding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for WyomingSounding
impl PartialEq for WyomingSounding
Source§fn eq(&self, other: &WyomingSounding) -> bool
fn eq(&self, other: &WyomingSounding) -> bool
self and other values to be equal, and is used by ==.