Version 1.0 of MetPy is now available. MetPy is a collection of tools in Python for reading, visualizing, and performing calculations with weather data. The project aims to mesh well with the rest of the scientific Python ecosystem, including the Numpy, Scipy, and Matplotlib projects, adding functionality specific to meteorology.
While MetPy has been around as an Open Source project since 2008, development resources have been limited, and version 1.0 is the first stable release. The word “stable” here does not imply that previous 0.x releases were not robust — MetPy has been in wide use for quite some time now — but rather that the development team has reached a stage where they are confident in promising to keep the software API stable until the next major release. This promise of API stability should give MetPy users confidence that the code they write using MetPy will continue to work unaltered for a significant period of time.
For those who have been following MetPy development over the past year through a series of version 1.0 release candidates, the API changes in version 1.0 bring no surprises. The main thrust of the official 1.0 release was to eliminate all deprecated functionality and ensure that XArray and units functionality was working as desired.
The MetPy Upgrade Guide provides information about changes that may be necessary in order for code written using previous MetPy versions to work with version 1.0.
A complete listing of changes in this version is available in the MetPy Github repository. Highlights include:
- New documentation layout and theme
- Version 1.0 upgrade guide
- Update constant values from more robust sources
- Better support for taking in xarray DataArrays
- Add capability to limit shading of CIN on SkewT
- Function to add longitude/latitude to Pandas DataFrame
- Support for % as a unit abbreviation in a string
- Support for changing barb size on station plots in simplified plotting interface
- Fixed up declarative interface docs
- Support for returning xarray DataArrays instances from calculations when the inputs are also DataArray instances
- Support for inputs where Pint Quantity instances are stored within DataArray instances
- Fixes errors when passing masked arrays to various CAPE calculations
- Support for Albers Equal Area projection
- Many fixes updates for NEXRAD format support, including direct reading of file objects from the NEXRAD S3 archive (from e.g. boto3) and using pathlib.Path instances, as well as some updates for NEXRAD ORPG Build 19.0 changes.
- Improve default date handling in parse_metar_file
- PyProj >= 2.3 is now a required dependency for calculations, and CartoPy is only needed for related plotting capabilities.
- PlotObs.level now defaults to None, or no subsetting.
- Using standard library modules importlib.resources and importlib.metadata (and their backports) rather than pkg_resources from setuptools. This fixes errors getting MetPy's version from unconventional installs.
This release can be installed with:
pip install metpy==1.0or
conda install -c conda-forge metpy=1.0
Let us know if you run into any problems, either at MetPy issue tracker or by e-mail at firstname.lastname@example.org. You can also ask questions using the "MetPy" tag on Stack Overflow or on the MetPy GitHub Discussions page.
Stay tuned for a more in-depth description of MetPy 1.0 and a look at what's next for the project after the 2021 AMS meeting. In the meantime, here's a tip of the hat to the many dedicated community members outside the Unidata Program Center who helped make this release a reality.