use std::fmt;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Profile {
Pressure,
Temperature,
WetBulb,
DewPoint,
ThetaE,
WindDirection,
WindSpeed,
PressureVerticalVelocity,
GeopotentialHeight,
CloudFraction,
}
impl fmt::Display for Profile {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
use Profile::*;
let string_rep = match *self {
Pressure => "pressure",
Temperature => "temperature",
WetBulb => "wet bulb temperature",
DewPoint => "dew point temperature",
ThetaE => "equivalent potential temperature",
WindDirection => "wind direction",
WindSpeed => "wind speed",
PressureVerticalVelocity => "vertical velocity",
GeopotentialHeight => "height",
CloudFraction => "cloud fraction",
};
write!(f, "{}", string_rep)
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Surface {
MSLP,
StationPressure,
LowCloud,
MidCloud,
HighCloud,
WindDirection,
WindSpeed,
Temperature,
DewPoint,
Precipitation,
}
impl fmt::Display for Surface {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
use Surface::*;
let string_rep = match *self {
MSLP => "sea level pressure",
StationPressure => "station pressure",
LowCloud => "low cloud fraction",
MidCloud => "mid cloud fraction",
HighCloud => "high cloud fraction",
WindDirection => "wind direction",
WindSpeed => "wind speed",
Temperature => "2-meter temperature",
DewPoint => "2-meter dew point",
Precipitation => "precipitation (liquid equivalent)",
};
write!(f, "{}", string_rep)
}
}