ACPAtmospheric Chemistry and PhysicsACPAtmos. Chem. Phys.1680-7324Copernicus PublicationsGöttingen, Germany10.5194/acp-17-15037-2017Technical note: A noniterative approach to modelling moist thermodynamicsMoisseevaNadyanmoisseeva@eoas.ubc.caStullRolandDept. of Earth, Ocean and Atmospheric Sciences, University of British
Columbia, 2020-2207 Main Mall Vancouver, BC, V6T 1Z4, CanadaNadya Moisseeva (nmoisseeva@eoas.ubc.ca)19December2017172415037150434July201718July20179November201710November2017This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this licence, visit https://creativecommons.org/licenses/by/4.0/This article is available from https://acp.copernicus.org/articles/17/15037/2017/acp-17-15037-2017.htmlThe full text article is available as a PDF file from https://acp.copernicus.org/articles/17/15037/2017/acp-17-15037-2017.pdf
Formulation of noniterative mathematical expressions for moist thermodynamics
presents a challenge for both numerical and theoretical modellers. This
technical note offers a simple and efficient tool for approximating two
common thermodynamic relationships: temperature, T, at a given pressure, P,
along a saturated adiabat, T(P,θw), as well as its
corresponding inverse form θw(P,T), where
θw is wet-bulb potential temperature. Our method allows
direct calculation of T(P,θw) and θw(P,T)
on a thermodynamic domain bounded by -70≤θw<40∘C, P>1 kPa and -100≤T<40∘C, P>1 kPa, respectively. The
proposed parameterizations offer high accuracy (mean absolute errors of 0.016
and 0.002 ∘C for T(P,θw) and
θw(P,T), respectively) on a notably larger thermodynamic
region than previously studied. The paper includes a method summary and a ready-to-use tool to aid atmospheric physicists in their practical
applications.
Introduction
Saturated thermodynamics commonly present a challenge for theoretical studies
because moist convective condensation, such as deep cumulus precipitation,
often involves pseudoadiabtic (irreversible) processes. The latent heat
released during water vapour condensation is important for estimating
thunderstorm intensity and thickness, precipitation amount and phase, global
climate and atmospheric general circulation . These
processes are governed by nonlinear equations that require iteration to
solve. Numerical weather prediction (NWP) models, hence, suffer from the
added computational cost to their cloud, precipitation, convection and
turbulence schemes and parameterizations because of the iterations required
during each timestep of the NWP integration.
Emagram plot showing select “true” (solid black) and modelled
(dashed red) moist adiabats θw (difference not
apparent at this scale). Temperature and pressure domains are restricted for
clarity. An emagram (energy mass diagram) is a thermodynamic diagram with the
log of pressure on the vertical axis, plotted with maximum and minimum values
reversed so that higher in the diagram corresponds to higher in the
atmosphere, where pressures are lower. The noniterative results presented in
this paper can be plotted on any thermodynamic diagram, including tephigrams
and skew-T diagrams.
A common iterative approach, such as described by , uses
step-wise numerical integration along a saturated adiabat for any constant
wet-bulb potential temperature, θw. The moist adiabatic lapse
rate is derived from conservation of moist entropy as a function of
temperature, T, and saturated mixing ratio, rs, which itself is a
nonlinear function of T and pressure P. To improve efficiency
proposed a different iterative method, based on
inverting Bolton's formula for equivalent potential
temperature valid for the pressure range 10≤P≤105 kPa and
wet-bulb potential temperatures -20<θw<40∘C.
As a noniterative alternative, offer an approximate
solution devised using gene-expression programming. They provide two
separate sets of equations for determining T(P,θw) and
θw(P,T) for the domain bounded by -30<θw<40∘C, P>20 kPa and -60<T<40∘C. The complex
nature of the problem required their splitting of the modelled region into
sub-domains, resulting in error discontinuity. The method also produced
fairly large errors (on the order of 1–2 ∘C) in the upper
atmosphere. Despite the limitations, to our knowledge
the only existing noniterative solution to approximate saturated
pseudoadiabats is that by .
Our current study presents a different approach for directly calculating
T(P,θw) and θw(P,T) offering improved
accuracy for a larger thermodynamic domain. The method, described in
Sect. , normalizes the raw data before fitting it with
polynomials. The resultant approximation is evaluated against the “truth”
(the iterated solution) and summarized in Sects. and
, respectively. As a Supplement we offer the readers a
ready-to-use spreadsheet implementing our methodology.
The goal of this paper is to provide a simple tool that can aid analytical
modellers in their theoretical work as well as numerical modellers in
reducing the computational cost of their simulations.
Table of constants.
ConstantDescription (unit)Rd=287.058gas constant for dry air (J K-1 kg-1) Rv=461.5gas constant for water vapour (J K-1 kg-1)Cpd=1005.7specific heat of dry air at constant pressure (J K-1 kg-1)T0=273.15reference temperature (K)P0=100reference pressure (kPa)e0=0.611657Clausius–Clapeyron constant (kPa) ε=RdRv=0.6220ratio of gas constants (kg kg-1)Method descriptionData
In order to obtain a set of truth curves for T(P,θw) we
have used an iterative approach to numerically integrate the equation for
dTdP (Tables and )
for values in the range of -100≤θw<100∘C
between 105≥P>1 kPa. The constants used to devise this solution are
consistent with , unless otherwise indicated in
Table . Note that throughout this technical note we will rely
on a common meteorological convention, by which wet-bulb potential
temperature at standard pressure of 100 kPa is used to label moist adiabats.
Such references, hence, represent curves, rather than constants, and are
written in bold for clarity. We found that numerical integration along a
saturated adiabat θw from the bottom to the top
of the domain required an increasingly refined pressure step, as all adiabats
tend to absolute zero near the top of the atmosphere, and each consecutive
pressure step corresponds to a larger temperature jump. For our numerical
integration we used 10-4 kPa step for 105≥P>10 kPa,
10-5 kPa step for 10≥P>2 kPa and 10-6 kPa step for 2≥P>1 kPa. The resulting curves (shown on the thermodynamic diagram in
Fig. ) are taken as truth, to which we fit our
polynomial-based optimization. The noniterative approximations for
T(P,θw) and θw(P,T) described below are
valid for thermodynamic ranges bounded by -70≤θw<40∘C and -100≤T<40∘C, respectively.
Variable definitions.
VariableDescription (unit)Tambient temperature (K)Ppressure (kPa)θwsaturated adiabat where the value of T defined at P=P0 is defined as wet-bulb potential temperature (K)es=e0exp[24.921(1-T0T)](T0T)5.06saturation vapour pressure (kPa)Lv=3.139×106-2336⋅Tlatent heat of vaporization (K) rs=εes(P-es)saturation mixing ratio (kg kg-1)dTdP=RdCpdT+LvCpdrsP(1+Lv2RvCpdrsT2)change of temperature with pressure along a saturated adiabat, which can be iterated to find T vs. P (K kPa-1)Approximating T(P,θw)
While the moist adiabiatic curves θw in
Fig. look smooth and fairly similar, it is challenging for most
common optimization routines to capture all of them with one analytical
expression with high accuracy. Due to the inherently nonlinear nature of the
process, there is no simple way to collapse the curves into a single shape.
However, to aid fitting, we can normalize our curves by modelling
θw as a function of a reference moist adiabat
θref. That allows us to model only the deviations
from a reference curve. For our example we used
θref=-70 ∘C. This particular
choice of θref implies no theoretical
importance. It is possible to choose any of the directly calculated
normalized adiabats to represent θref.
Depending on the choice, the resulting transformed adiabats shift around the
θref unity line. The single consideration for
choosing a particular θref is the ease and
accuracy with which it can be fit by a particular optimization tool.
We use polynomial fitting to describe T(P) for
θref. This is convenient, since polynomials are
generally well-behaved and are computationally easy to use. In particular,
they are both continuous and smooth, while being able to capture a wide
variety of curve shapes. Moreover, they have well understood properties and a
simple form, allowing the model to be easily implemented in a basic
spreadsheet. The choice of the degree of polynomial depends on the desired
precision level. Since we are examining a fixed range of temperatures
relevant to atmospheric applications, the potentially extreme oscillatory
behaviour of high-degree polynomials outside of the modelled domain is not a
primary concern. The fitted polynomials have no predictive value outside of
the modelled range and serve purely as an interpolation function. While the
large number of possible inflection points associated with high-degree
polynomials may be of a concern near the edges of the fitting interval, a
problem known as Runge's phenomenon , the current
algorithm relies on a least-squares method to minimize the effect and achieve
a high-quality fit. For this example, the aim was to ensure that the mean
absolute error (MAE) is on the order of 10-2∘C, requiring a 20th
degree polynomial to achieve such fit. The coefficients for this polynomial
are provided in Table S2 in the Supplement.
The next step is to choose a single functional form to represent the entire
family of the transformed curves (i.e., the moist adiabat deviations from
θref). Each given shape of a particular curve is
then controlled by variable parameters of the same function. A number of
simple functions exists that are able to model the above relationship. For
this work we tested biexponential, arctan, rational and polynomial
functions. Generally, a reasonable (on the order of 1–2 ∘C) fit can
be achieved with both biexponential and arctan functions using as few as
three variable parameters. While efficient, results of such a fit are
unlikely to be sufficiently accurate to be useful for real-life modelling
applications and, more importantly, only constitute a part of the solution.
The bigger concern with these choices is that, unlike polynomials, they
produce variable parameters that do not appear well-behaved. Discontinuity
and asymptomatic behaviour arising from error minimization for all transformed
adiabats renders the parameter curves very difficult to model. A variety of
functions would be necessary to capture the parameter behaviour, which in turn
is likely to produce a complex and discontinuous error field, such as
appeared in .
Polynomial fitting does not appear to suffer from such issues. Moreover, the
accuracy can be controlled by changing the degree of the polynomial and,
hence, allowing a higher number of variable parameters. In this example, the
curves were modelled using 10th degree polynomials, resulting in 11 variable
parameters. Conveniently, and unlike other functional forms mentioned above,
these parameters are also well-behaved. They can, again, be modelled using
high-degree polynomials to the desired level of accuracy. Results of
parameter fitting for this given example were again produced using 20th
degree polynomials, with fit coefficients provided in Table S1 (Supplement).
The resulting modelled (noniterative) moist adiabats can be seen in
Fig. , compared to the truth (iterated) values.
Approximation error between iterated (“truth”) and modelled T
along moist adiabats θw.
Approximating θw(P,T)
A similar approach can be used to produce a noniterative approximation for
θw(P,T). To obtain a new set of curves representing lines of
constant temperature T in θw domain, we have used our
existing dataset for -100≤θw<100∘C to
extract isotherms on a 0.5 ∘C and 0.1 kPa grid for -100≤T<40∘C and 105≥P>1 kPa.
Similarly to our earlier approach, we select a single reference curve
Tref=-100∘C and use a high-order polynomial to
model it as a function of pressure (Table S4 in the Supplement). We then
produce a set of transformed curves by plotting the isotherms as a function
of Tref. We fit the transformed curves with 10th degree
polynomials, obtaining a dataset for 11 variable parameters. Finally, we use
polynomials to model the variable parameters (Table S3 in the Supplement).
The following section discusses the results and accuracy of our optimization
procedure.
Evaluation
To test the accuracy of the proposed method, we compared our modelled curves
for T(P,θw) and θw(P,T) with those obtained
through direct calculation (the truth iterative solution). The results of
the evaluation for T(P,θw) are shown in Fig. ,
indicating errors on the order of a few hundredths of a degree throughout most
of the domain. Warmer values near the top of the domain tend to be modelled
least accurately. MAE for the entire modelled
thermodynamic region is 0.016 ∘C. Error contours for
θw(P,T) are shown in Fig. , with errors on the
order of a few thousandths of a degree throughout most of the domain and
overall MAE = 0.002 ∘C. Once again, values near the low-pressure
limit tend to be least accurate. Notably, applying the above optimization on
a slightly shallower pressure domain of P>2 kPa allows improvement of the overall MAE for both approximations by an
additional order of magnitude.
As mentioned earlier, improved accuracy may also be achieved with the use of
even higher degrees of polynomials for parameter fits. However, such
precision is unlikely to be necessary, as some of the thermodynamic
relationships used in the truth iterative computations contain
substantially larger errors than those introduced by the above optimization
procedure . Moreover, conventional
pseudoadiabatic diagrams, such as those used by US Air Force,
Environment Canada and Air Transport Association of America,
differ from each other by nearly 1 ∘C at the 20 kPa pressure level
. The specific choice of thermodynamic constants and
relationships undoubtedly affects the definition of truth used in this
work; however, this has little effect on the overall validity of the
approach. Should more precise constant values and/or thermodynamic
relationships become established in the future, the proposed method can be
reapplied to generate updated fitting coefficients without loss of accuracy
(within the limits of the specific polynomial optimization routine used).
Approximation error between iterated (“truth”) and modelled
θw along isotherms T.
Though the upper 10 kPa of the atmosphere contains the largest errors with
our proposed approach, this vertical subrange also presents the most
significant challenge for direct (iterative) numerical modelling. Accurate
numerical computation requires an increasingly refined vertical step for the
top part of the atmosphere. Hence, despite the errors, the proposed
approximation offers a more accurate solution than one would obtain with a
direct iterative approach using a somewhat coarse yet computationally
demanding 0.001 kPa pressure step.
While common weather phenomena generally remain in the troposphere, the
validity of the current method on a notably larger vertical domain is
particularly useful in the lower latitudes. The deep vertical extent of
tropical thunderstorms, hurricanes and typhoons in combination with the high
tropopause altitude (18 km or 8 kPa; ) in the tropics
contribute to large computational costs of modelling these potentially
destructive events.
Summary of approach
Individual steps to directly compute T(P,θw) and
θw(P,T) are summarized below. This sample procedure, along
with the required coefficient tables, is provided in a ready-to-use form in
the attached spreadsheet (Supplement).
Computing T(P,θw)
Let n=0,…,10 correspond to the index of individual polynomial
coefficients and m=20 be the degree of polynomial fits for
θref(P) and kn(θw), respectively.
Compute coefficients kn(θw) using polynomial
coefficients a20,…,a0 in Table S1 in the Supplement:kn(θw)=∑i=0ma(n,m-i)θwm-ifor θw in ∘C.
Compute θref(P) using polynomial coefficients
b20,…,b0 in Table S2 in the Supplement:θref(P)=∑j=0mb(m-j)Pm-jfor P in kPa. Note for users preferring older pressure units,
1 kPa = 10 mb = 10 hPa.
Compute T(θref):T(P,θw)=T(θref)=∑h=0nkhθrefn-h,where T and θref are in Kelvins, and values of k0,…,n correspond to polynomial coefficients calculated in Step 1.
Computing θw(P,T)
Let n=0,…,10 correspond to the index of individual polynomial
coefficients and m=20 be the degree of polynomial fits for
Tref(P) and κn(T), respectively.
Compute coefficients κn(T) using polynomial coefficients
α20,…,α0 in Table S3 in the Supplement:κn(T)=∑i=0mα(n,m-i)Tm-ifor T in ∘C.
Compute Tref(P) using polynomial coefficients
β20,…,β0 in Table S4 in the Supplement:Tref(P)=∑j=0mβ(m-j)Pm-jfor P in kPa.
Compute θw(Tref):θw(P,T)=θw(Tref)=∑h=0nκhTrefn-h,where θw and Tref are in ∘C, and values
of κ0,…,n correspond to polynomial coefficients calculated
in Step 1.
Usage example
Meteorologists typically use both θw(P,T) and
T(P,θw) for moist convection such as thunderstorms, frontal
clouds, mountain-wave clouds and many other phenomena, where a saturated air
parcel moves vertically. The cloud base of convective clouds marks the bottom of
saturated ascent, and the cloud top marks the top.
For example, suppose that the forecast at some tropical weather station is P=100 kPa and T=32∘C with dew point Td=21∘C
(corresponding to a water vapour mixing ratio of approximately r=16 g kg-1). Further suppose that a force (e.g., buoyancy, frontal
uplift, orographic uplift) causes an air parcel with these initial
conditions to rise. Initially this air parcel is unsaturated (not cloudy), so
we do not need to use the polynomial or iterative equations. Instead, simpler
noniterative equations apply for the thermodynamic state as the parcel rises
dry adiabatically. Namely, its temperature cools at the dry adiabatic lapse
rate (9.8 ∘C km-1), and the mixing ratio and potential
temperature are constant. This air parcel will become saturated (i.e., cloud
base) at the lifting condensation level (LCL). With this information, other
thermodynamic equations can be used to find conditions at
the LCL: zLCL=1.375 km, PLCL=85.4 kPa and
TLCL=18.5∘C.
Given this initial P and T at the LCL, we can use the polynomial
equations provided in this paper to compute which moist adiabat the cloudy
air parcel will follow: θw(P,T)=24.0∘C. If this
cloudy air parcel (still following the θw(P,T)=24.0∘C adiabat) rises to an altitude where the pressure is P=24.0 kPa, then we can use the second set of polynomial equations in this
paper to find the final temperature of the air parcel at this new height:
T(P,θw)=-39.8∘C.
Discussion and conclusions
The polynomial method proposed here is accurate, smooth and computationally
efficient. For example, given the cloud base and cloud top pressures of the
previous example, the tally of computer operations to find both the initial
and the final temperature is 230 additions and subtractions and 2365
multiplications (where rational numbers to integer powers are counted as
sequential multiplies). This can be compared to the computation tally for the
truth iterative solution, which requires a total of 2 750 000 variable
pressure steps, where each step has 8 additions and subtractions, 17
multiplies (where rational numbers to integer powers are counted as
sequential multiplies), 9 divides and 2 math functions (e.g., log, exp,
non-integer exponents), totalling to 988 200 000 operations from the bottom
to the top of the domain.
Also, for comparison, some NWP models use a look-up
table to get the average saturated adiabatic lapse rate
Δθw/ΔP as a function of P and T. While this
method is fairly fast, it is also less accurate and approximates the
saturated lapse rate as a series of short straight-line segments instead of a
smooth curve. It also has discontinuous jumps of saturated lapse rate as T
varies along an isobar.
While interpolating values from look-up tables generally results in random
errors, iterative solutions with a coarse step could potentially suffer from
a directional drift due to numerical integration errors, which may introduce
a consistent bias into latent heating profiles. Moreover, near the top of the
atmosphere, where each pressure step corresponds to a large temperature jump
along the moist adiabats the numerical solutions tend to become unstable.
Though both of these concerns are addressed with the proposed low-cost
polynomial method, the broader challenge of our limited overall understanding
of moist convection remains. Existing thermodynamic relationships are based
on the assumption of either a reversible moist adiabatic or an irreversible
pseudoadiabatic process. Real-world atmospheric processes are likely to be a
combination of both . The uncertainty introduced by our
limited knowledge of the true state of saturated air is likely to remain the
central obstacle in capturing moist convection.
The polynomial method proposed here provides a computation of high accuracy
and smooth variation across the whole thermodynamic diagram range, at
intermediate computation speed compared to the other methods. Moreover, it
helps to model moist thermodynamics on a wider temperature range with roughly
2 orders of magnitude MAE improvement over the existing solution. In
addition to the reduced computational costs of obtaining solutions for
T(P,θw) and θw(P,T) in numerical
simulations and improving accuracy, we hope that our tool will aid analytical
modellers in their theoretical work.
Spreadsheet tool for calculating T(P,
θw) and θw(P,T) is included as Supplement
to this article.
The Supplement related to this article is available online at https://doi.org/10.5194/acp-17-15037-2017-supplement.
The authors declare that they have no
conflict of interest.
Acknowledgements
This work was supported by funding from Natural Sciences and Engineering
Research Council (NSERC) PGS-D to Nadya Moisseeva, Discovery grants to
Roland Stull, with additional support from BC Hydro and
Mitacs. Edited by: Geraint
Vaughan Reviewed by: two anonymous referees
ReferencesBakhshaii, A. and Stull, R.: Saturated pseudoadiabats-A noniterative
approximation, J. Appl. Meteorol. Clim., 52, 5–15,
10.1175/JAMC-D-12-062.1, 2013.Bolton, D.: The Computation of Equivalent Potential Temperature, Mon.
Weather Rev., 108, 1046–1053,
10.1175/1520-0493(1980)108<1046:TCOEPT>2.0.CO;2,
1980.Burns, L.: Range Reference Atmosphere 2013 Production Methodology, Tech.
rep.,
NASA, available at: https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20150016184.pdf
(last access: 14 December 2017), 2015.Caballero, R.: Thermodynamics of moist air, in: Physics of the Atmosphere,
10.1088/bk978-0-7503-1052-9ch3,
IOP Science, Bristol, UK, 2014.Davies-Jones, R.: An Efficient and Accurate Method for Computing the Wet-Bulb
Temperature along Pseudoadiabats, Mon. Weather Rev., 136, 2764–2785,
10.1175/2007MWR2224.1, 2008.Davies-Jones, R.: On Formulas for Equivalent Potential Temperature, Mon.
Weather Rev., 137, 3137–3148, 10.1175/2009MWR2774.1,
2009.Epperson, J. F.: On the Runge Example, Am. Math. Mon., 94, 329–341,
10.2307/2323093,
1987.Iribarne, J. and Godson, W. (Eds.): Atmospheric Thermodynamics, Chap. IX,
176–244, 2nd Edn., 10.1007/978-94-009-8509-4, Springer, the Netherlands,
1981.Koutsoyiannis, D.: Clausius–Clapeyron equation and saturation vapour
pressure: simple theory reconciled with practice, Eur. J.
Phys., 33, 295–305, 10.1088/0143-0807/33/2/295,
2012.Stull, R.: Practical Meteorology: An Algebra-based Survey of Atmospheric
Science, available at:
https://www.eoas.ubc.ca/books/Practical_Meteorology/, last access:
18 October 2017.
WMO (World Meteorological Organization): International Cloud Atlas: Manual on
the Observation of Clouds and Other
Meteors (WMO-No. 407),
available at: https://cloudatlas.wmo.int/clouds-definitions.html, last
access: 6 November 2017.