Skip to content

Fast and accurate calculations for applications in atmospheric science

Notifications You must be signed in to change notification settings

ivorblockley/atmos

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 

Repository files navigation

atmos: fast and accurate calculations for applications in atmospheric science

atmos is a Python library for computing physical quantities commonly used in atmospheric science. Currently, the code comprises vectorised functions for calculating a wide array of thermodynamic variables (see the "thermo" module) and for translating between different measures of atmospheric moisture (see the "moisture" module). All of the equations in atmos are analytical and derived from a common set of assumptions (the so-called Rankine-Kirchhoff approximations; Romps, 2021); no empirical equations are used. Another novel feature of atmos is the treatment of saturation, which can be represented with respect to liquid, ice, or a combination of the two (via the phase argument). A new treatment of mixed-phase saturation has been developed, which will be documented in a forthcoming paper (currently in preparation).

For pseudoadiabatic parcel calculations, atmos uses high-order polynomial fits (following Moisseeva and Stull, 2017) to achieve solutions that are fast but also highly accurate. This is the basis for the Noniterative Evaluation of Wet-bulb Temperature (NEWT) method, which was recently advertised by my colleague Cass Rogers at the 2023 AGU Annual Meeting (Rogers and Warren, 2023). The NEWT method and its performance relative to other approximate methods for calculating wet-bulb temperature will be presented in another forthcoming paper. At present, the polynomial approach is only available for liquid pseudoadiabats (with the default options phase="liquid" and pseudo_method="polynomial"). I hope to extend it to ice and mixed-phase pseudoadiabats in the future; however, for now these must be performed iteratively (by setting pseudo_method="iterative"). Calculations involving saturated adiabats must also be performed iteratively.

The development of atmos has been something of a side project for me and, as yet, I have not had time to create unit tests in order to rigorously test the code. As such it is possible (likely even) that some bugs are present. If you identify one please raise an issue and I will aim to fix it ASAP. That said, users should find that the code is well commented and easy to read. The choice of variable names and the formatting of equations matches more or less exactly that in the paper I am currently preparing. This should make it easy to understand the origins of each function once the paper is published.

In the near future, I plan to add a handful of demonstration notebooks to the repository, which will illustrate some of the functionality of atmos. I am also developing a module to perform vectorised calculations of parcel-based convective indices such as CAPE and CIN. Additional modules to calculate other convective parameters (such as bulk wind difference, storm-relative helicity, and various composite indices) may be added further down the line. If you have any suggestions for new features you would like to see added, please don't hesitate to get in touch.

Rob Warren (04-01-2024)

About

Fast and accurate calculations for applications in atmospheric science

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%