GithubHelp home page GithubHelp logo

a-urq / ecape Goto Github PK

View Code? Open in Web Editor NEW

This project forked from citylikeamradio/ecape

0.0 0.0 0.0 3.15 MB

Calculate the entraining CAPE (ECAPE) of a parcel

Home Page: https://citylikeamradio.github.io/ecape/

License: MIT License

Python 100.00%

ecape's Introduction

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.

ecape's People

Contributors

citylikeamradio avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.