#[non_exhaustive]pub struct NomadsProfile {
pub latitude_deg: f64,
pub longitude_deg: f64,
pub cycle_unix_s: i64,
pub valid_unix_s: i64,
pub grid: Grid,
pub grid_points: [GridPoint; 4],
pub wind_turn_rad: f64,
pub surface: NomadsSurface,
pub levels: Vec<NomadsLevel>,
pub dropped: Vec<DroppedLevel>,
}Expand description
A NOMADS cut read at a site: the ground and the pressure 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: f64The site’s latitude, degrees north.
longitude_deg: f64The site’s longitude, degrees east.
cycle_unix_s: i64The run’s start, s since the Unix epoch (UTC).
valid_unix_s: i64The time the forecast is for, s since the Unix epoch (UTC).
grid: GridThe cut’s grid.
grid_points: [GridPoint; 4]The four grid points around the site, with their weights.
wind_turn_rad: f64The angle the winds were turned by, from the grid’s axes to east and north, rad; 0 when the cut gives them east and north.
surface: NomadsSurfaceThe ground.
levels: Vec<NomadsLevel>The pressure levels above the ground, lowest first.
dropped: Vec<DroppedLevel>The pressure levels left out, highest pressure first.
Implementations§
Source§impl NomadsProfile
impl NomadsProfile
Sourcepub fn parse(
body: &[u8],
latitude_deg: f64,
longitude_deg: f64,
) -> Result<Self, NomadsError>
pub fn parse( body: &[u8], latitude_deg: f64, longitude_deg: f64, ) -> Result<Self, NomadsError>
Reads a NOMADS cut at a site, interpolating bilinearly between the four grid points around it.
§Errors
NomadsError::Gribwhen the body is not GRIB2 the decoder reads.NomadsError::Mixedwhen its fields differ in grid, cycle or forecast time, andNomadsError::Duplicatewhen a variable is given twice at one level.NomadsError::Outsidewhen the site is not inside the cut’s grid.NomadsError::NoSurfacewhen a ground value is not in the cut or has no value around the site, andNomadsError::Heightwhen a height is beyond what the geopotential conversion takes.
Sourcepub fn sounding(
&self,
wind_interpolation: WindInterpolation,
) -> Result<SoundingProfile, AtmosError>
pub fn sounding( &self, wind_interpolation: WindInterpolation, ) -> Result<SoundingProfile, AtmosError>
The profile as an atmosphere with its wind: the ground, then each level above it, with
relative humidity clamped to [0, 1].
§Errors
What SoundingProfile::new refuses: heights not increasing, pressures not decreasing
upward, or a value out of range.
Trait Implementations§
Source§impl Clone for NomadsProfile
impl Clone for NomadsProfile
Source§fn clone(&self) -> NomadsProfile
fn clone(&self) -> NomadsProfile
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 NomadsProfile
impl Debug for NomadsProfile
Source§impl<'de> Deserialize<'de> for NomadsProfile
impl<'de> Deserialize<'de> for NomadsProfile
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 NomadsProfile
impl PartialEq for NomadsProfile
Source§fn eq(&self, other: &NomadsProfile) -> bool
fn eq(&self, other: &NomadsProfile) -> bool
self and other values to be equal, and is used by ==.