diff --git a/lib/xmet/sounding.py b/lib/xmet/sounding.py index 4603779..217e58d 100644 --- a/lib/xmet/sounding.py +++ b/lib/xmet/sounding.py @@ -56,10 +56,13 @@ class SoundingSample(DatabaseTable): return 621.97 * (e / (self.pressure - e)) - def saturated_mixing_ratio(self) -> float: + def saturated_mixing_ratio(self, pressure=None) -> float: + if pressure is None: + pressure = self.pressure + es = self.saturated_vapor_pressure() - return 621.97 * (es / (self.pressure - es)) + return 621.97 * (es / (pressure - es)) def lcl(self) -> float: # meters return (self.temp - self.dewpoint) / 0.008