MCPcopy Index your code
hub / github.com/Unidata/MetPy

github.com/Unidata/MetPy @v1.7.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.7.1 ↗ · + Follow
2,254 symbols 10,366 edges 170 files 2,030 documented · 90% updated 1d agov1.7.1 · 2025-08-29★ 1,429320 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

MetPy

MetPy Logo NSF Unidata Logo

License Gitter PRs Welcome

Latest Docs PyPI Package Conda Package PyPI Downloads Conda Downloads

PyPI Tests Conda Tests Code Coverage Status Codacy Badge Code Climate

MetPy is a collection of tools in Python for reading, visualizing and performing calculations with weather data.

MetPy follows semantic versioning in its version number. This means that any MetPy 1.x release will be backwards compatible with an earlier 1.y release. By "backward compatible", we mean that correct code that works on a 1.y version will work on a future 1.x version.

For additional MetPy examples not included in this repository, please see the MetPy Cookbook on Project Pythia.

We support Python >= 3.10.

Need Help?

Need help using MetPy? Found an issue? Have a feature request? Checkout our support page.

Important Links

Dependencies

Other required packages:

  • Numpy
  • Scipy
  • Matplotlib
  • Pandas
  • Pint
  • Xarray

There is also an optional dependency on the pyproj library for geographic projections (used with cross sections, grid spacing calculation, and the GiniFile interface).

See the installation guide for more information.

Code of Conduct

We want everyone to feel welcome to contribute to MetPy and participate in discussions. In that spirit please have a look at our Code of Conduct.

Contributing

Imposter syndrome disclaimer: We want your help. No, really.

There may be a little voice inside your head that is telling you that you're not ready to be an open source contributor; that your skills aren't nearly good enough to contribute. What could you possibly offer a project like this one?

We assure you - the little voice in your head is wrong. If you can write code at all, you can contribute code to open source. Contributing to open source projects is a fantastic way to advance one's coding skills. Writing perfect code isn't the measure of a good developer (that would disqualify all of us!); it's trying to create something, making mistakes, and learning from those mistakes. That's how we all improve, and we are happy to help others learn.

Being an open source contributor doesn't just mean writing code, either. You can help out by writing documentation, tests, or even giving feedback about the project (and yes - that includes giving feedback about the contribution process). Some of these contributions may be the most valuable to the project as a whole, because you're coming to the project with fresh eyes, so you can see the errors and assumptions that seasoned contributors have glossed over.

For more information, please read the see the contributing guide.

Philosophy

The space MetPy aims for is GEMPAK (and maybe NCL)-like functionality, in a way that plugs easily into the existing scientific Python ecosystem (numpy, scipy, matplotlib). So, if you take the average GEMPAK script for a weather map, you need to:

  • read data
  • calculate a derived field
  • show on a map/skew-T

One of the benefits hoped to achieve over GEMPAK is to make it easier to use these routines for any meteorological Python application; this means making it easy to pull out the LCL calculation and just use that, or reuse the Skew-T with your own data code. MetPy also prides itself on being well-documented and well-tested, so that on-going maintenance is easily manageable.

The intended audience is that of GEMPAK: researchers, educators, and any one wanting to script up weather analysis. It doesn't even have to be scripting; all python meteorology tools are hoped to be able to benefit from MetPy. Conversely, it's hoped to be the meteorological equivalent of the audience of scipy/scikit-learn/skimage.

Core symbols most depended-on inside this repo

get_test_data
called by 197
src/metpy/cbook.py
scaled_elem
called by 152
src/metpy/io/nexrad.py
plot
called by 119
src/metpy/plots/skewt.py
figure
called by 117
src/metpy/plots/declarative.py
read_int
called by 80
src/metpy/io/_tools.py
open_dataset
called by 76
src/metpy/io/gini.py
draw
called by 69
src/metpy/plots/declarative.py
read_struct
called by 65
src/metpy/io/_tools.py

Shape

Function 1,552
Method 559
Class 131
Route 12

Languages

Python100%
TypeScript1%

Modules by API surface

tests/calc/test_thermo.py216 symbols
tests/test_xarray.py127 symbols
tests/calc/test_calc_tools.py121 symbols
src/metpy/plots/declarative.py109 symbols
src/metpy/io/nexrad.py101 symbols
src/metpy/calc/thermo.py95 symbols
tests/plots/test_declarative.py84 symbols
src/metpy/xarray.py78 symbols
tests/calc/test_kinematics.py74 symbols
src/metpy/plots/patheffects.py69 symbols
tests/calc/test_basic.py67 symbols
src/metpy/io/gempak.py61 symbols

For agents

$ claude mcp add MetPy \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact