Calculate the entraining CAPE (ECAPE) of a parcel.
Project description
ecape
ecape is a simple module that contains an entraining CAPE, or ECAPE, calculation described by Peters et. al. 2023. Additionally, Peters-provided MatLab scripts serve as a reference and test verification data. The module leans heavily on MetPy for meteorological calculations.
Installation & Use
In console:
pip install ecape
See the example in linked documentation.
from ecape.calc import calc_ecape
...
ecape = calc_ecape(height, pressure, temperature, specific_humidity, u_wind, v_wind, cape_type)
Documentation & Source
https://github.com/citylikeamradio/ecape
https://citylikeamradio.github.io/ecape
Contact
- Robert Capella
- bob.capella@gmail.com
- https://twitter.com/minusthebob
Questions, comments, and feedback are certainly welcome. This project is a personal exercise in learning how to publish packages to Github & PyPI, so excuse the excessive documentation for one function.
Future Work
- if useful, incorporate into MetPy
- provide cli .nc, .csv, & aws support
Disclaimer
There is a ~10% difference in ECAPE between calc_ecape and Peters' published matlab scripts. This is primarily due to a difference in calculated CAPE. The tests describe other sources of error (~1%).
Since:
- the methods here are within ~1% of Peters' calculations when CAPE is equivalent in the sample data
- Peters et. al. specifically mention MetPy for determining CAPE
- MetPy is a reliable, open-source, and frequently used meteorological calculation package
MetPy's CAPE calculations were chosen for ease of readability and implementation.
References
Ryan M. May, Sean C. Arms, Patrick Marsh, Eric Bruning, John R. Leeman, Kevin Goebbert, Jonathan E. Thielen, Zachary S Bruick, and M. Drew. Camron. Metpy: a Python package for meteorological data. 2023. URL: Unidata/MetPy, doi:10.5065/D6WW7G29.
John Peters. ECAPE scripts. 2 2023. URL: https://figshare.com/articles/software/ECAPE_scripts/21859818, doi:10.6084/m9.figshare.21859818.v4.
John M. Peters, Daniel R. Chavas, Hugh Morrison, Chun-Yian Su, and Brice E. Coffer. An analytic formula for entraining cape in mid-latitude storm environments. 2023. arXiv:2301.04712.
Licence
ecape
is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ecape-0.0.5.tar.gz
.
File metadata
- Download URL: ecape-0.0.5.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.24.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4d0794e059d44632bb2dd78fb32fe20c30569a799817a68c3908fe72d1d35c0 |
|
MD5 | 5bb70cd493bbbfb7b69c9d375b97f212 |
|
BLAKE2b-256 | e81f1bf5bbf267bc1d2b7a9d257eced7b8dafe5f90dc38a1a98ede9b9f63798f |
File details
Details for the file ecape-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: ecape-0.0.5-py3-none-any.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.24.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 750d049f813c4e5b3a5930e431966e665a6729dc89e2a374daadcd000a12af8e |
|
MD5 | e0956a01473366e71738ce4b265063dd |
|
BLAKE2b-256 | 81c707a37c81076e838d5252f2a9a68cf295ce49ecc0a80fdaf9de15660bba79 |