In meteorology we have some pretty strange and specialized color tables. In this week's MetPy Monday, find out how to use the built in color tables that we provide for common tasks like RADAR and satellite plotting.
MetPy Mondays #25 - Color Tables
MetPy Mondays #26 - MetPy 0.7
In this week’s MetPy Monday, we talk about the most recent release of MetPy, 0.7. This release saw a lot of work put into calculations, including some changes and new capabilities for kinematics functions that involve taking derivatives of fields. We also want to thank all of the community members (9 in total!) who contributed Pull Requests to this release.
In this release, many functions in kinematics have been updated or changed. First, the dim_order
keyword argument, which controls the assumed order of x and y dimensions for arrays, has been changed to assume a default ordering of ‘yx’ rather than ‘xy’. This change allows many data sources to work correctly by default now. Also to simplify MetPy’s API, the functions h_convergence
and v_vorticity
have been renamed to divergence
and vorticity
, respectively; these new names are easier to find and better reflect the underlying calculations. The old names are still available, but are deprecated and slated for removal in 0.9.
New to this release are generic derivative (and related) functions for MetPy: first_derivative
, second_derivative
, gradient
, and laplacian
. These functions use three points to estimate the derivatives, and are compatible with grids that have variable spacing; for grids with fixed spacing, they are 2nd-order accurate. MetPy has also added code to calculate Cartesian spacing between points on a latitude/longitude grid. These additions mean that it is now possible to use MetPy to calculate quantities like vorticity advection natively on latitude/longitude grids, like those used by the GFS.
In addition to the derivative calculations, MetPy has gained functions to calculate: thickness (using hypsometric formula), geopotential to/from height, mixing ratio from relative humidity, moist static energy, and dry static energy. Besides calculations, MetPy has also had some updates to the documentation and plots. In the documentation, MetPy now has a table to aid in conversion from GEMPAK:
This table is a work in progress, trying to provide equivalencies between functionality in GEMPAK and Python. For functions in GEMPAK that currently have no comparable functionality in Python, there is a link to an open issue in MetPy. We are grateful to several community members who have submitted Pull Requests to add some of these functions, and we are very happy to take more community submissions!
Lastly, in 0.7 the add_timestamp
function gained the ability to add outlined text to a plot. So calling add_timestamp(ax, high_contrast=True)
will add a timestamp to an axes in white text with a black outline. This helps to ensure the timestamp is legible regardless of what is displayed beneath.
You can find a complete set of release notes over at the MetPy release page on GitHub. You can also see what is planned for the next release of MetPy by visiting the 0.8 milestone page. Questions or comments? Visit the Contact Us section of the MetPy documentation.
MetPy Mondays #27 - Deprecation
Do you ever see deprecation warnings after updating your Python packages? This week we talk about what they are, why they exist, and what you can do about them!
MetPy Mondays #28 - Radar Server
On this week’s MetPy Monday learn how to get radar data using the THREDDS radar server service!
MetPy Mondays #29 - Basic Radar Plotting
On this week’s MetPy Monday learn how to make basic plots of radar data!
MetPy Mondays #30 - Basic Radar Plotting Part 2
On this week’s MetPy Monday learn how to dress up basic plots of radar data!
THREDDS License Change

As we approach the first public beta of version 5.0 of the THREDDS Data Server (TDS), we have decided to revisit our software license. Currently, both NetCDF-Java and the TDS are released under the same license that the netCDF C library uses, which is a license that was "home grown" at UCAR. It's usually called an "MIT-style license," though it is perhaps more similar to the BSD-3 Clause license. Rather than continue to use the "home grown" license, we will be moving to a standard, off-the-shelf BSD-3 license, bringing the TDS and NetCDF-Java packages more in line with standard practice within the Open Source community.
What This Means For You
If you are a user of the TDS, this change in licensing does not affect you.
If you are a developer who includes technology from the TDS or netCDF-Java in your own work, you will find that the new license is slightly less restrictive than the current license, in that it does not explicitly request that you credit UCAR/Unidata in publications that result from your use of the technology. Of course, we still appreciate any acknowledgement you do provide; such credits are very useful to Unidata in making the case to our funders that the work we do is valuable to our community. If you find Unidata’s contributions to community cyberinfrastructure useful, please consider citing the technology you’re using, or perhaps including a badge in your online materials.
What is Changing
Here is the text of the current license:
Copyright 1998-2015 University Corporation for Atmospheric Research/Unidata Portions of this software were developed by the Unidata Program at the University Corporation for Atmospheric Research. Access and use of this software shall impose the following obligations and understandings on the user. The user is granted the right, without any fee or cost, to use, copy, modify, alter, enhance and distribute this software, and any derivative works thereof, and its supporting documentation for any purpose whatsoever, provided that this entire notice appears in all copies of the software, derivative works and supporting documentation. Further, UCAR requests that the user credit UCAR/Unidata in any publications that result from the use of this software or in any product that includes this software. The names UCAR and/or Unidata, however, may not be used in any advertising or publicity to endorse or promote any products or commercial entity unless specific written permission is obtained from UCAR/Unidata. The user also understands that UCAR/Unidata is not obligated to provide the user with any support, consulting, training or assistance of any kind with regard to the use, operation and performance of this software nor to provide the user with any updates, revisions, new versions or "bug fixes." THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE.
Here is the new license:
Copyright 1998-2018 University Corporation for Atmospheric Research/Unidata Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MetPy Mondays #31 - Radar Animations
This week, find out how to make animations in a Jupyter notebook!
MetPy Mondays #32 - Multiplanel Animations
On this week’s MetPy Monday, learn how to animate multiple panels in matplotlib!
MetPy Mondays #33 - Cartopy 0.16
On this week’s MetPy Monday, learn how to use some of the new features of Cartopy 0.16!
MetPy Mondays #34 - List Comprehensions
On this week’s MetPy Monday, learn how to write fewer for loops with list comprehensions!
MetPy Mondays #30 - Basic Radar Plotting Part 2
On this week’s MetPy Monday learn how to dress up basic plots of radar data!
MetPy Mondays #35 - matplotlib transforms
On this week’s MetPy Monday, learn how to accurately position text on your matplotlib plots!
MetPy Mondays #36 - matplotlib subplots
On this week’s MetPy Monday, learn how to make multiple subplots in a single figure with matplotlib!
Siphon 0.7.0 released
Siphon 0.7.0 has been released with a variety of new features and some bug fixes:
- Changed license from MIT to BSD 3-clause (to match MetPy and other Unidata projects)
- Added client for downloading data from the Applied Climate Information System (ACIS) (thanks to Warren Pettee)
- Added client for downloading upper air data from Integrated Global Radiosonde Archive (IGRA) Version 2 (thanks to Daniel Watkins)
- Added client for accessing upper air data from the Iowa Environment Mesonet (IEM)
- Improved metadata available in upper air data
- Fixed a variety of minor bugs in catalog parsing
Contributors
@DanielWatkins, @pjpokran, @WEP11, @lesserwhirls, @jrleeman, and @dopplershift contributed code to this release.
For full release notes see the GitHub Release Page.
Siphon packages are available for Conda on the conda-forge channel and for pip from the Python Package Index.
Let us know if you run into any problems, either at siphon issue tracker, using support-python@unidata.ucar.edu, or on the python-users list. You can also ask questions using the "python-siphon" tag on Stack Overflow.
MetPy Mondays #37 - Twin X-Axes
On this week’s MetPy Monday, learn how to make twin axes with matplotlib!
Timeline for dropping support for Python 2.7
Work in the overall scientific Python ecosystem to sunset Python version 2.7 is underway in earnest, so the time has come for Unidata's Python team to start planning the timeline for our own software (MetPy and Siphon) to do the same. Here is a small sampling of the plans for Python 2.7 for software we depend upon:
- Core Python developers will stop support for Python 2.7 January 1, 2020
- NumPy feature releases will support only Python 3 starting January 1, 2019, and support for the last release supporting Python 2 will end January 1, 2020.
- XArray will drop 2.7 January 1, 2019 as well
- Matplotlib's 3.0 release, tentatively Summer 2018, will be Python 3 only; the current 2.2 release will be the last long term release that supports 2.7 and support for this version ceases January 1, 2020.
Given these plans, and based on preliminary input from Unidata's Users committee, we propose to drop support for Python 2.7 in the Fall of 2019. That implies that releases of MetPy and Siphon in the Fall of 2019 will be the first that support only Python 3. Releases before that (Spring or Summer 2019) will be the last that support Python 2.7. Given the relatively nascent status of the MetPy and Siphon packages, and the fact that most dependencies will be completely stopping support for 2.7 on 1 January 2020, we do not intend that the versions of MetPy and Siphon that work with Python 2.7 have any extended support.
We welcome feedback about this at the related issues for MetPy and Siphon. Note that we don't have the capacity to maintain all of the upstream dependencies, so some of this transition is beyond our control.
MetPy Mondays #38 - Making a Hodograph
On this week's MetPy Monday learn how to make a hodograph!
MetPy Mondays #39 - Colormapped Hodograph
This week find out how to color a hodograph based on a variable value. It's another MetPy Monday!
MetPy Mondays #40 - LaTeX in Matplotlib
This week find out how to show equations on your plots. It's another MetPy Monday!