From 0084f35c3dde71c2b0308cfaa6576afaa0c3cd0c Mon Sep 17 00:00:00 2001 From: Clara Levante Date: Tue, 9 Jan 2024 16:21:40 +0100 Subject: [PATCH] use themp not theta --- examples/rainshaft1d/rainshaft1d.py | 4 ++-- pySD/thermobinary_src/thermogen.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/rainshaft1d/rainshaft1d.py b/examples/rainshaft1d/rainshaft1d.py index b27afa7be..b60624b9d 100644 --- a/examples/rainshaft1d/rainshaft1d.py +++ b/examples/rainshaft1d/rainshaft1d.py @@ -73,7 +73,7 @@ ### --- settings for 1-D Thermodynamics --- ### PRESS0 = 101315 # [Pa] -THETA0 = 297.9 # [K] +TEMP0 = 297.9 # [K] qvap0 = 0.013816 # [Kg/Kg] Zbase = 750 # [m] thetalapses = [0, 0.01] # [K m^-1] @@ -126,7 +126,7 @@ rgrid.print_domain_info(constsfile, gridfile) ### ----- write thermodynamics binaries ----- ### -thermodyngen = thermogen.ConstHydrostaticLapseRates(PRESS0, THETA0, qvap0, +thermodyngen = thermogen.ConstHydrostaticLapseRates(PRESS0, TEMP0, qvap0, Zbase, thetalapses, qvlapses, qcond, WVEL, None, None) diff --git a/pySD/thermobinary_src/thermogen.py b/pySD/thermobinary_src/thermogen.py index b6fb38425..0917c1459 100644 --- a/pySD/thermobinary_src/thermogen.py +++ b/pySD/thermobinary_src/thermogen.py @@ -17,8 +17,8 @@ File Description: ''' - import numpy as np +from scipy import integrate from .. import cxx2py from .create_thermodynamics import thermoinputsdict from ..gbxboundariesbinary_src import read_gbxboundaries as rgrid @@ -428,10 +428,10 @@ class ConstHydrostaticLapseRates: and in hydrostatic equillibrium and following adiabats with constant lapse rates above/below zbase. ''' - def __init__(self, PRESS0, THETA0, qvap0, Zbase, + def __init__(self, PRESS0, TEMP0, qvap0, Zbase, thetalapses, qvlapses, qcond, WVEL, UVEL, VVEL): self.PRESS0 = PRESS0 # surface pressure [Pa] - self.THETA0 = THETA0 # surface temperature [T] + self.TEMP0 = TEMP0 # surface temperature [T] self.qvap0 = qvap0 # surface water vapour content [Kg/Kg] self.Zbase = Zbase # cloud base height [m] self.thetalapses = thetalapses # theta lapse rates [below, above] Zbase