pub struct SoundingProfile { /* private fields */ }Expand description
An atmosphere built from a sounding or a forecast profile.
It serializes as its levels as given, its latitude and its wind interpolation, and rebuilds (and re-checks) everything else when deserialized.
Implementations§
Source§impl SoundingProfile
impl SoundingProfile
Sourcepub fn new(
levels: Vec<SoundingLevel>,
latitude_rad: f64,
wind_interpolation: WindInterpolation,
) -> Result<Self, AtmosError>
pub fn new( levels: Vec<SoundingLevel>, latitude_rad: f64, wind_interpolation: WindInterpolation, ) -> Result<Self, AtmosError>
A profile from levels, lowest first, measured at geodetic latitude latitude_rad, whose
wind (if the levels give one) interpolates as wind_interpolation.
§Errors
AtmosError::NoLevelswith no levels.AtmosError::HeightsNotIncreasingunless heights strictly increase.AtmosError::MissingBasePressureif the lowest level has no pressure.AtmosError::PressureNotDecreasingif a given pressure is not below the pressure of the level beneath it.AtmosError::IncompleteColumnif humidity or wind is given on some levels but not all, or a wind speed comes without its direction.AtmosError::Domainfor a non-positive temperature or pressure, a relative humidity outside[0, 1], a negative wind speed, a latitude beyond ±90°, a non-finite value, or end levels whose offset standard atmosphere is out of range.
Sourcepub fn levels(&self) -> &[SoundingLevel]
pub fn levels(&self) -> &[SoundingLevel]
The levels as given.
Sourcepub fn latitude_rad(&self) -> f64
pub fn latitude_rad(&self) -> f64
The geodetic latitude the profile was measured at, rad.
Sourcepub fn pressures_pa(&self) -> &[f64]
pub fn pressures_pa(&self) -> &[f64]
The pressure at each level, Pa, with omitted ones filled in.
Sourcepub fn wind(&self) -> Option<&LayeredWind>
pub fn wind(&self) -> Option<&LayeredWind>
The profile’s wind, if its levels give one.
Sourcepub fn sample(&self, height_msl_m: f64) -> Result<AirSample, AtmosError>
pub fn sample(&self, height_msl_m: f64) -> Result<AirSample, AtmosError>
The air at geometric height height_msl_m (see Atmosphere::air).
§Errors
AtmosError::Domain if the height is not finite, is at or below −R(φ), or is so far
above the Earth that the standard atmosphere has no height for its geopotential.
Trait Implementations§
Source§impl Atmosphere for SoundingProfile
impl Atmosphere for SoundingProfile
Source§impl Clone for SoundingProfile
impl Clone for SoundingProfile
Source§fn clone(&self) -> SoundingProfile
fn clone(&self) -> SoundingProfile
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 SoundingProfile
impl Debug for SoundingProfile
Source§impl<'de> Deserialize<'de> for SoundingProfile
impl<'de> Deserialize<'de> for SoundingProfile
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 SoundingProfile
impl PartialEq for SoundingProfile
Source§fn eq(&self, other: &SoundingProfile) -> bool
fn eq(&self, other: &SoundingProfile) -> bool
self and other values to be equal, and is used by ==.