From fbe5e5ef440a3437b261feff844d227683e15822 Mon Sep 17 00:00:00 2001 From: bjorn-stevens <64255981+bjorn-stevens@users.noreply.github.com> Date: Sat, 20 Aug 2022 10:28:59 +0200 Subject: [PATCH] cleanup no changes --- moist_thermodynamics/functions.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/moist_thermodynamics/functions.py b/moist_thermodynamics/functions.py index 3c71455..8d75abc 100644 --- a/moist_thermodynamics/functions.py +++ b/moist_thermodynamics/functions.py @@ -9,10 +9,9 @@ License: BSD-3C """ # import numpy as np -from scipy import interpolate, optimize +from scipy import interpolate, optimize, ode from . import constants -from .saturation_vapor_pressures import es_default - +from .saturation_vapor_pressures import es_default def make_es_mxd(es_liq, es_ice): """Closure to construct a mixed form of the saturation vapor pressure @@ -89,7 +88,6 @@ def make_static_energy(hv0): return h - def planck(T, nu): """Planck source function (J/m2 per steradian per Hz) @@ -203,12 +201,6 @@ def saturation_partition(P, ps, qt): return np.minimum(qt, qs) -moist_static_energy = make_static_energy( - hv0=constants.lv0 + constants.cl * constants.T0 -) -liquid_water_static_energy = make_static_energy(hv0=constants.cpv * constants.T0) - - def theta(T, P, qv=0.0, ql=0.0, qi=0.0): """Returns the potential temperature for an unsaturated moist fluid @@ -612,9 +604,6 @@ def zlcl(Plcl, T, P, qt, z): return T * (1.0 - (Plcl / P) ** (R / cp)) * cp / g + z -from scipy.integrate import ode - - def moist_adiabat( Tbeg, Pbeg, @@ -690,3 +679,10 @@ def moist_adiabat( Px.append(r.t) return np.asarray(Tx), np.asarray(Px) + +moist_static_energy = make_static_energy( + hv0=constants.lv0 + constants.cl * constants.T0 +) + +liquid_water_static_energy = make_static_energy(hv0=constants.cpv * constants.T0) + -- GitLab