288 Cross-Section Analysis in MetPy

Monday, 7 January 2019
Hall 4 (Phoenix Convention Center - West and North Buildings)
Jonathan E. Thielen, Iowa State Univ., Ames, IA; and R. M. May and J. R. Leeman

Researchers and educators in the atmospheric sciences commonly use cross sections to depict atmospheric features with important vertical variations. This includes phenomena such as convective systems, isentropic ascent, tropopause folds, and conditional symmetric instability. The long-standing General Meteorology Package (GEMPAK) has the ability to obtain and plot such vertical cross sections through three-dimensional data. However, this functionality has been lacking until recently in MetPy.

MetPy is an open-source and community-driven Python package maintained by Unidata that seeks to replace GEMPAK with a collection of tools that integrates well with the scientific Python ecosystem. Through work undertaken during the 2018 Unidata Summer Internship, cross section interpolation and related calculations have now been implemented in MetPy as of version 0.9, using xarray Datasets and DataArrays (labeled n-dimensional arrays that follow the Common Data Model) as the underlying data structure.

An overview will be provided of the work that was done in enhancing MetPy’s integration with the xarray package to prepare for cross sections. Building on past work in handling coordinate reference systems and unit array conversions, the xarray integration has been furthered through the addition of systematic coordinate identification, DataArray-compatible derivative calculations, and other calculation helpers.

This presentation will also describe the implementation of cross section interpolation and related calculations and demonstrate the new functionality with a variety of plots and interactive examples. The cross section implementation has been built in a flexible way to allow for linear or nearest neighbor interpolation to either a custom path through data or a default geodesic path between two points. While the implementation as of v0.9 depends on gridded data and is limited to these two methods of interpolation, future work will expand this to unstructured data and other methods of interpolation that are included in MetPy. The calculations related to cross sections, such as tangential and normal vector components and absolute momentum, utilize the metadata associated with the interpolation routine’s returned DataArrays to create a straightforward API. To demonstrate this new functionality in MetPy, several examples will be shown, from basic demonstrations included in MetPy’s documentation to more advanced examples showcasing high-resolution WRF simulations of a mesoscale convective system and analysis of conditional symmetric instability using moist potential vorticity.

- Indicates paper has been withdrawn from meeting
- Indicates an Award Winner