Skip to main content

ecape

ecape is a simple module that contains an entraining CAPE, or ECAPE, calculation described by Peters et. al. 2023. Peters-provided MatLab scripts serve as a reference and test verification data. The module leans heavily on MetPy for meteorological calculations.

PyPI - Version PyPI - Python Version

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)

Documentation & Source

https://github.com/citylikeamradio/ecape

https://citylikeamradio.github.io/ecape

Contact

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

  • add support for other water content variables
  • if useful, incorporate into MetPy
  • provide cli .nc, .csv, & aws support

A note on undiluted CAPE & calculation accuracy

If users prefer their own CAPE calculations, use the undiluted_cape parameter:

When comparing calc_ecape.py & COMPUTE_ECAPE.m run on Peters 2023 sample data, there is a ~10% difference in the resultant ECAPE. This is almost entirely due to a difference in calculated MUCAPE. The tests describe other sources of variation (~1%).

Given:

  • the methods here are within ~1% of Peters' calculations when undiluted CAPE is equivalent
  • Peters et. al. specifically mention MetPy for determining undiluted CAPE
  • MetPy is a reliable, open-source, and frequently used meteorological calculation package

MetPy's undiluted 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.

Peters, J. M., D. R. Chavas, C. Su, H. Morrison, and B. E. Coffer, 2023: An analytic formula for entraining CAPE in mid-latitude storm environments. J. Atmos. Sci., https://doi.org/10.1175/JAS-D-23-0003.1, in press.

Licence

ecape is distributed under the terms of the MIT license.

Metadata

Release files for ecape 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ecape 0.1.1
File Size Uploaded Provenance Actions
ecape-0.1.1.tar.gz 8.5 kB Without provenance Details for ecape-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ecape 0.1.1
File Interpreter ABI Platform Actions
ecape-0.1.1-py3-none-any.whl Python 3 none any Details for ecape-0.1.1-py3-none-any.whl

Total release size: 3.0 MB

Release files / ecape-0.1.1.tar.gz

Download URL ecape-0.1.1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
df31ec798fe4b00bfcf1c3863f7f839775fafd6525147d21b641f55758aeb1b3
BLAKE2b-256 checksum
How to use checksums
f7b5dd1f806a1a0692fba7e693d916f0b298c79409c170b8025320d087ee497d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.24.0

Release files / ecape-0.1.1-py3-none-any.whl

Download URL ecape-0.1.1-py3-none-any.whl
Size 3.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4187dcbb31ab7dab2e0ff1ed56767fd1645b27cd7493f4187fe5205a05e73e2b
BLAKE2b-256 checksum
How to use checksums
158223c03914c1051d85afba23845d44cdb1b8cc959b61c238e5540bf89cd967
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.24.0

Security for ecape 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page