Metpy

Latest version: v1.6.3

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 9

0.9.0

0.8

API Changes
* `lat_lon_grid_spacing` has been deprecated in favor of `lat_lon_grid_deltas`. The latter gives properly signed values depending on the ordering of points in the lat/lon grid.
* The deprecated upper air data reading support has been removed. Use the upper air support in [siphon](https://unidata.github.io/siphon) instead.
* The function `delete_masked_points` has been renamed to `_delete_masked_points`, as it was not intended to be part of the supported API.
* `GINIFile.to_dataset()`, which gives a netCDF4-python-like interface to the information in the file, has been deprecated. Instead, now an instance of `GINIFile` can be passed directly to `xarray.open_dataset()` to provide a similar interface. `to_dataset()` (as well as the non-public `cdm` module) will be removed in 0.11.

Highlights
* MetPy now requires XArray. Using XArray, MetPy provides some custom accessors under the `.metpy` attribute on `Dataset` and `DataArray`. This allows simplified access to the underlying grid projection as a CartoPy projection, as well as simplified access to data as an array with units attached. (See the `XArray_Projections.py` example) MetPy calculation functions will also now automatically convert an XArray `DataArray` with units metadata into a proper array with units. Future releases of MetPy will improve the integration with XArray.
* `GINIFile` now works directly as an XArray storage backend. See the updated `GINI_Water_Vapor.py` example for details. Support for Unidata NEXRAD composites in GINI format was also added.
* MetPy's colortables are now available from `metpy.plots.colortables` rather than needing to do `metpy.plots.ctables.registry`.
* Fixed a few corner cases with isentropic interpolation, including problems with columns of entirely missing data (frequently encountered with NARR data)
* `lfc` and `el` now work with arbitrary parcel profiles
* Gradient and related functions now properly propagate masked values
* Text and time formatting for `add_timestamp()` are now configurable
* New calculations
- Absolute vorticity
- Ageostrophic wind
- Apparent temperature (combines wind chill and heat index)
- Brunt-Väisälä frequency and period
- Critical angle (severe weather parameter)
- Dewpoint (from specific humidity)
- Exner function
- Inertial advective wind
- Parse angle (converts strings like "ESE" to degree values)
- Potential temperature to temperature
- Potential vorticity
- Q Vector
- Saturation equivalent potential temperature
- Static stability
- Wet bulb temperature
* Other assorted bug fixes
* Reminder: MetPy plans to drop support for Python 2.7 in Fall 2019

Contributors
ahuang11, akrherz, asselapathirana, eliteuser26, jthielen, kishan3, Meteodan, mwilson14, shofer16450, tjwixtrom, WEP11, jrleeman, and dopplershift all contributed commits to this release.

Issues Closed

* Issue 841 - Update GEMPAK table
* Issue 836 - Examples fail on netcdf4 1.4
* Issue 833 - apparent_temperature with scalars
* Issue 827 - Themo.py parcel_profile edge case all p less than lcl
* Issue 820 - Suggested improvement for api/generated/metpy.calc.bulk_shear
* Issue 819 - Unify and fix dev/contributor docs
* Issue 812 - Add missing items to `plots` and `gridding` namespaces
* Issue 810 - Segmented Hodograph Misses Surface
* Issue 806 - Add quiver functionality to hodograph
* Issue 805 - Make hodograph creation unit aware
* Issue 803 - Document Python 2.7 plans
* Issue 802 - Add information about semantic versioning
* Issue 798 - isentropic_interpolation() should enforce a search direction, ideally user specifiable
* Issue 797 - Add unit helper for pandas data frames
* Issue 795 - Update GINI support
* Issue 789 - get_layer_heights modifying heights in place
* Issue 782 - Advertise Stack Overflow for support
* Issue 774 - GEOD kwargs override in `lat_lon_grid_spacing`
* Issue 773 - Coriolis Units
* Issue 769 - isentropic_interpolation error on NARR isobaric data
* Issue 757 - Exner Function
* Issue 756 - Change all example calculation imports to mpcalc
* Issue 755 - Montgomery Stream Function Docs
* Issue 750 - Make LFC/EL calculations respect chosen parcel profile?
* Issue 737 - Add optional unit conversion to barbs
* Issue 730 - Increase versatility of `add_timestamp`
* Issue 724 - Create feels_like function as frontend to windchill and heat_index
* Issue 722 - Fix build again
* Issue 716 - metpy.calc.gradient docs are unclear
* Issue 712 - Add tests for gradient
* Issue 708 - Add calls to `add_timestamp` to examples
* Issue 703 - mixing_ratio_from_relative_humidity returns values in percent
* Issue 702 - potential temperature to temperature
* Issue 700 - Export gradient
* Issue 699 - Make `lat_lon_grid_spacing` aware of sign
* Issue 693 - Freetype Pinning
* Issue 689 - Removals/Deprecations in 0.8
* Issue 687 - Fix doctests with numpy 1.14
* Issue 683 - Clean up isentropic interpolation example
* Issue 650 - Potential Vorticity
* Issue 642 - Masked arrays and gradient
* Issue 640 - Inertial Advective Wind
* Issue 616 - Clean up sigma interpolation example
* Issue 409 - Add calculation for wet bulb temperature
* Issue 306 - Improve Contributor Documentation

In this release 45 issues were closed.

Pull Requests Merged

* PR 851 - MNT: Fix some non-standard naming
* PR 850 - Optimize parse_angle
* PR 849 - Fix mask propagation in gradient
* PR 848 - Clean up examples
* PR 847 - Xarray Conversion Decorator
* PR 846 - Isentropic updates
* PR 844 - Add new functionality to GEMPAK table
* PR 843 - Added a function to calculate critical angle.
* PR 840 - Remove requirements text
* PR 839 - Exposing functionality
* PR 838 - Apparent temperature working with scalars
* PR 835 - Delete masked points
* PR 834 - Add example usage of parse_angle()
* PR 831 - Hodograph units
* PR 830 - Add tests for gradient
* PR 829 - Update GINI Support
* PR 828 - parcel_profile fails with truncated pressure profile
* PR 826 - LFC above LCL
* PR 825 - Pass parcel profile through cape_cin calculation
* PR 824 - Dewpoint From Specific Humidity
* PR 822 - Doc maint
* PR 821 - Adding calculation of LFC and EL for arbitrary parcel profile
* PR 818 - MNT: Fix travis doc build
* PR 817 - Feels like temperature
* PR 816 - Hodograph arrows
* PR 815 - Refactor colored line segment hodograph
* PR 814 - Documentation updates
* PR 811 - Removes grid size warning from generate_grid
* PR 807 - Pandas unit helper
* PR 796 - BUG: Fix get_layer_heights modifying heights in-place (Fixes 789)
* PR 793 - Improve logging in NEXRAD Level 3
* PR 786 - Xarray + CF + CartoPy Projection Handling
* PR 783 - Add new metpy/calc/tools parse_angle
* PR 781 - Remove upperair support
* PR 780 - Remove `keys()`
* PR 779 - Add Exner Function
* PR 778 - Add Q-vector and Static Stability Calculations
* PR 777 - Add inertial advective wind calculation
* PR 776 - Geod kwarg override
* PR 775 - Coriolis units to 1/s
* PR 771 - Updating tests
* PR 768 - Four panel example edit
* PR 766 - Potential vorticity
* PR 765 - CartoPy Updates
* PR 759 - MNT: use `mpcalc` as import alias for `metpy.calc`
* PR 758 - Fix rendering issues in Montgomery Streamfunction
* PR 754 - Absolute vorticity
* PR 753 - Rename testdata
* PR 749 - MNT: Fix Travis testing with CartoPy
* PR 748 - Add saturation equivalent potential temperature
* PR 747 - Add county outline files
* PR 746 - Add potential temperature to temperature conversion
* PR 744 - Fix dependecies. 734
* PR 741 - Adds custom grid boundary to interpolate
* PR 740 - Fix return types in docstrings of logo functions
* PR 739 - Ageostrophic wind
* PR 738 - Barb unit conversion at plot time
* PR 736 - Fix Level3File
* PR 735 - Fix Example/Tutorial Flake
* PR 733 - Add Dry Air Density Constant
* PR 732 - Add timestamp options
* PR 731 - Wet Bulb Temperature
* PR 727 - Add `lat_lon_grid_deltas` function to replace `lat_lon_grid_spacing`
* PR 720 - Add precipitation color table
* PR 718 - Add calls to 'add_timestamp' to examples
* PR 711 - Export gradient
* PR 710 - Clean up sigma interpolation example
* PR 709 - Fix build
* PR 707 - Force `mixing_ratio_from_relative_humidity` to return dimensionless
* PR 695 - Add Batch of Functions for Brunt-Väisälä Frequency and Period

In this release 70 pull requests were closed.

0.8.0

0.7

API Changes
* The default dimension ordering for functions in `kinematics` (i.e. when `dim_order` is not passed) has changed from "xy" to "yx". This lets more data work out of the box with these functions, and has been warned since 0.5.1
* Renamed `h_convergence` and `v_vorticity` to `divergence` and `vorticity`, respectively. These latter names are simpler and more accurate. The old names are still available for old code, but are deprecated and will be removed in 0.9.
* `convergence_vorticity` and `shearing_stretching_deformation` are deprecated, and will be removed in 0.9. These functions existed as performance optimizations, but new calculation internals renders them unnecessary.
* The parameter `sblcl` for `significant_tornado` has been renamed to `surface_based_lcl_height` to improve clarity. This only affects users who were passing by keyword argument.
* Changed `relative_humidity_wet_psychrometric`, `relative_humidity_from_mixing_ratio`, and `relative_humidity_from_specific_humidity` to return values as unitless ratios rather than percentages, for better symmetry with the rest of the library.

Highlights
* Added our own functions for `first_derivative`, `second_derivative`, `gradient`, and `laplacian`. These are 3 point finite difference calculations that handle irregularly spaced grid points.
* Added function to calculate x,y grid spacing for latitude/longitude grids
* Added table of equivalencies between GEMPAK functions and Python. This is an on-going effort to provide a resource for migrating from GEMPAK.
* Added ability to `add_timestamp` to add outlined text
* New calculations
* Thickness (using hypsometric formula)
* Geopotential to/from height
* Mixing ratio from relative humidity
* Moist static energy
* Dry static energy

Contributors
akrherz, dennissergeev, eliteuser26, jthielen, leouieda, lsterzinger, shofer16450, tjwixtrom, WEP11, jrleeman, and dopplershift all contributed commits to this release.

Issues Closed

* [Issue 675](https://github.com/Unidata/MetPy/issues/675) - Doc version chooser missing versions ([PR 688](https://github.com/Unidata/MetPy/pull/688))
* [Issue 673](https://github.com/Unidata/MetPy/issues/673) - Links in the docs to edit the Github sources and report typos ([PR 676](https://github.com/Unidata/MetPy/pull/676))
* [Issue 670](https://github.com/Unidata/MetPy/issues/670) - Interpolate hres documentation
* [Issue 663](https://github.com/Unidata/MetPy/issues/663) - Add geopotential to/from height calculation
* [Issue 648](https://github.com/Unidata/MetPy/issues/648) - Calculate Relative Humidity
* [Issue 644](https://github.com/Unidata/MetPy/issues/644) - Improve Doc Build Documentation
* [Issue 627](https://github.com/Unidata/MetPy/issues/627) - Equivalent potential temperature equation rendering
* [Issue 623](https://github.com/Unidata/MetPy/issues/623) - Masked arrays and constants
* [Issue 619](https://github.com/Unidata/MetPy/issues/619) - LCL unpacked representation ([PR 694](https://github.com/Unidata/MetPy/pull/694))
* [Issue 617](https://github.com/Unidata/MetPy/issues/617) - Rename convergence functions ([PR 620](https://github.com/Unidata/MetPy/pull/620))
* [Issue 615](https://github.com/Unidata/MetPy/issues/615) - Hodograph segmented coloring ([PR 624](https://github.com/Unidata/MetPy/pull/624))
* [Issue 610](https://github.com/Unidata/MetPy/issues/610) - Add path effects capability to `add_timestamp` ([PR 697](https://github.com/Unidata/MetPy/pull/697))
* [Issue 609](https://github.com/Unidata/MetPy/issues/609) - Improve plot annotation returns ([PR 611](https://github.com/Unidata/MetPy/pull/611))
* [Issue 608](https://github.com/Unidata/MetPy/issues/608) - significant_tornado only works with arrays as input ([PR 622](https://github.com/Unidata/MetPy/pull/622))
* [Issue 574](https://github.com/Unidata/MetPy/issues/574) - Add table of GEMPAK to MetPy conversions
* [Issue 312](https://github.com/Unidata/MetPy/issues/312) - Fix examples on Windows ([PR 618](https://github.com/Unidata/MetPy/pull/618))
* [Issue 295](https://github.com/Unidata/MetPy/issues/295) - Height from pressure, temp, relh
* [Issue 174](https://github.com/Unidata/MetPy/issues/174) - Add custom gradient function ([PR 692](https://github.com/Unidata/MetPy/pull/692))

In this release 18 issues were closed.

Pull Requests Merged

* [PR 698](https://github.com/Unidata/MetPy/pull/698) - MNT: Change default dimension ordering for kinematics functions
* [PR 697](https://github.com/Unidata/MetPy/pull/697) - Add high contrast functionality to timestamp ([610](https://github.com/Unidata/MetPy/issues/610))
* [PR 694](https://github.com/Unidata/MetPy/pull/694) - Change unit attachment to LCL pressure ([619](https://github.com/Unidata/MetPy/issues/619))
* [PR 692](https://github.com/Unidata/MetPy/pull/692) - Add gradient and derivatives for irregular grids ([174](https://github.com/Unidata/MetPy/issues/174))
* [PR 688](https://github.com/Unidata/MetPy/pull/688) - Fix versioned doc handling ([675](https://github.com/Unidata/MetPy/issues/675))
* [PR 686](https://github.com/Unidata/MetPy/pull/686) - DOC: Correct "the the" typos
* [PR 684](https://github.com/Unidata/MetPy/pull/684) - Respelling of `v_vorticity` and `h_divergence`
* [PR 682](https://github.com/Unidata/MetPy/pull/682) - Add RTD Theme
* [PR 681](https://github.com/Unidata/MetPy/pull/681) - Add relative humidity calculation from dewpoint function
* [PR 679](https://github.com/Unidata/MetPy/pull/679) - Make mixing_ratio return 'dimensionless'
* [PR 678](https://github.com/Unidata/MetPy/pull/678) - New functions for calculation of geopotential from height and vice versa
* [PR 677](https://github.com/Unidata/MetPy/pull/677) - Update to Treat RH as a Unitless Ratio in Existing Functions
* [PR 676](https://github.com/Unidata/MetPy/pull/676) - Replace "View source" with "Improve this page" ([673](https://github.com/Unidata/MetPy/issues/673))
* [PR 674](https://github.com/Unidata/MetPy/pull/674) - GEMPAK Conversion Table ([574](https://github.com/Unidata/MetPy/issues/574))
* [PR 672](https://github.com/Unidata/MetPy/pull/672) - Add Code of Conduct
* [PR 671](https://github.com/Unidata/MetPy/pull/671) - Update gridding_functions.py
* [PR 669](https://github.com/Unidata/MetPy/pull/669) - Add a Mixing Ratio from RH Calculation
* [PR 668](https://github.com/Unidata/MetPy/pull/668) - DOC: check presence of patched rtd_theme prior to setting versions
* [PR 625](https://github.com/Unidata/MetPy/pull/625) - Ensure that appropriate constants and function results are dimensionless ([623](https://github.com/Unidata/MetPy/issues/623))
* [PR 624](https://github.com/Unidata/MetPy/pull/624) - Hodograph coloring bound units ([615](https://github.com/Unidata/MetPy/issues/615))
* [PR 622](https://github.com/Unidata/MetPy/pull/622) - Indices scalar input ([608](https://github.com/Unidata/MetPy/issues/608))
* [PR 621](https://github.com/Unidata/MetPy/pull/621) - Add a Thickness Calculation
* [PR 620](https://github.com/Unidata/MetPy/pull/620) - Rename Convergence Functions to Divergence ([617](https://github.com/Unidata/MetPy/issues/617))
* [PR 618](https://github.com/Unidata/MetPy/pull/618) - Docs cleanup ([312](https://github.com/Unidata/MetPy/issues/312))
* [PR 612](https://github.com/Unidata/MetPy/pull/612) - [MNT] Fix flake8 import order issues
* [PR 611](https://github.com/Unidata/MetPy/pull/611) - Update returns of figure annotations ([609](https://github.com/Unidata/MetPy/issues/609))
* [PR 607](https://github.com/Unidata/MetPy/pull/607) - Static energy calculations
* [PR 605](https://github.com/Unidata/MetPy/pull/605) - Specific humidity from mixing ratio
* [PR 533](https://github.com/Unidata/MetPy/pull/533) - Calc dx dy

In this release 29 pull requests were closed.

0.7.0

0.6.1

API Change
* Small API change to change `storm_relative_helicity` to take heights, as well as an argument for depth. This fixes a bug in the original design of the function where the default bottom was 0, which is below the first level of most soundings.

Highlights
* Fix bugs in corner cases of `get_layer`, `precipitable_water`, `el`, and `bulk_shear`
* Fix use of units with `plot_colormapped` on `Hodograph`
* Fix lack of projection of wind barbs in `StationPlot` when using CartoPy
* Enable interpolation by default when calling `shade_cape` and friends for `SkewT`
* Fixed up definitions of CAPE and CIN to be net integrals above and below the LFC, respectively
* Add MetPy logo to examples

Issues Closed

* [Issue 601](https://github.com/Unidata/MetPy/issues/601) - Improve logo positioning in examples
* [Issue 598](https://github.com/Unidata/MetPy/issues/598) - StationPlot wind barb projection issue
* [Issue 596](https://github.com/Unidata/MetPy/issues/596) - Precipitable Water Bounds Failure ([PR 602](https://github.com/Unidata/MetPy/pull/602))
* [Issue 593](https://github.com/Unidata/MetPy/issues/593) - Get Layer producing incorrect results ([PR 597](https://github.com/Unidata/MetPy/pull/597))
* [Issue 580](https://github.com/Unidata/MetPy/issues/580) - Link to python-gallery
* [Issue 576](https://github.com/Unidata/MetPy/issues/576) - SREH Specified bound is outside height range Error ([PR 577](https://github.com/Unidata/MetPy/pull/577))
* [Issue 575](https://github.com/Unidata/MetPy/issues/575) - Precipitable Water Bounds
* [Issue 569](https://github.com/Unidata/MetPy/issues/569) - `plot_colormapped` with bounds works improperly with units
* [Issue 568](https://github.com/Unidata/MetPy/issues/568) - Bulk shear calculation fails when no depth is provided ([PR 570](https://github.com/Unidata/MetPy/pull/570))
* [Issue 566](https://github.com/Unidata/MetPy/issues/566) - Set interpolation=True in shade_cape, etc. ([PR 571](https://github.com/Unidata/MetPy/pull/571))
* [Issue 370](https://github.com/Unidata/MetPy/issues/370) - Pick LFC at the base of the largest area of CAPE ([PR 603](https://github.com/Unidata/MetPy/pull/603))
* [Issue 69](https://github.com/Unidata/MetPy/issues/69) - skew.ax.fill_betweenx shading not shading entire region

In this release 12 issues were closed.

Pull Requests Merged

* [PR 604](https://github.com/Unidata/MetPy/pull/604) - Improve logo positioning ([563](https://github.com/Unidata/MetPy/issues/563))
* [PR 603](https://github.com/Unidata/MetPy/pull/603) - Integrate all areas for CAPE/CIN ([370](https://github.com/Unidata/MetPy/issues/370))
* [PR 602](https://github.com/Unidata/MetPy/pull/602) - get_layer bounds improvements ([596](https://github.com/Unidata/MetPy/issues/596))
* [PR 600](https://github.com/Unidata/MetPy/pull/600) - Fix projection of barbs in StationPlot
* [PR 597](https://github.com/Unidata/MetPy/pull/597) - get_layer with data in increasing pressure order ([593](https://github.com/Unidata/MetPy/issues/593))
* [PR 595](https://github.com/Unidata/MetPy/pull/595) - Cleanup precipitable water
* [PR 577](https://github.com/Unidata/MetPy/pull/577) - Storm Relative Helicity Improvements ([576](https://github.com/Unidata/MetPy/issues/576))
* [PR 572](https://github.com/Unidata/MetPy/pull/572) - Hodograph coloring units ([569](https://github.com/an issue where units were being dropped and causing improper plots. Closes /issues/569))
* [PR 571](https://github.com/Unidata/MetPy/pull/571) - Turn on interpolation in CAPE/CIN shading by default ([566](https://github.com/Unidata/MetPy/issues/566))
* [PR 570](https://github.com/Unidata/MetPy/pull/570) - Assign depth kwarg default value if it is None in `get_layer` ([568](https://github.com/Unidata/MetPy/issues/568))
* [PR 565](https://github.com/Unidata/MetPy/pull/565) - Update Sounding Tutorial/Examples
* [PR 564](https://github.com/Unidata/MetPy/pull/564) - Update GINI Example with new color table values ([560](https://github.com/Unidata/MetPy/issues/560))
* [PR 562](https://github.com/Unidata/MetPy/pull/562) - Simplify EL calculation
* [PR 561](https://github.com/Unidata/MetPy/pull/561) - Return figure object when adding logo

In this release 14 pull requests were closed.

Page 6 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.