Tyler Wixtrom
Department of Geosciences, Atmospheric Sciences Group, Texas Tech University, Lubbock, TX
R. M. May and J. R. Leeman
University Corporation for Atmospheric Research / Unidata, Boulder, CO
K. H. Goebbert
Department of Geography and Meteorology, Valparaiso University, Valparaiso, IN
Vertical interpolation, specifically the interpolation from isobaric to isentropic coordinates and conversion from terrain-following (sigma) coordinates to isobaric coordinates, is commonly desired functionality of visualization tools. Model output is often in coordinates with a terrain-following vertical coordinate, while interpretation of the data is more easily accomplished following a conversion in post processing to more commonly used coordinates such as isobaric coordinates. Similarly, model forecasts and analyses available from the National Centers for Environmental Prediction and similar centers are often distributed in isobaric coordinates, while many research, operational, and educational applications may desire data in isentropic coordinates to allow for interrogation of the atmosphere from a different perspective.
With the recent rise in popularity of the Python language in scientific computing, due in part to its ease of use, relative flexibility, and active development, many scientists desire the ability to easily perform these vertical interpolations within the Python language. While interpolation from terrain-following to isobaric coordinates is available in some packages, the flexibility to be used on a variety of datasets (e.g. models with different variations of terrain-following coordinate such as sigma-p, sigma-theta, hybrid-sigma, etc.) with data of multiple dimensionalities (e.g. 3-D analysis vs. 4-D forecasts vs. 5-D ensemble forecasts) remains lacking. Additionally, conversion to isentropic coordinates from isobaric coordinates finds similarly limited support among existing packages.
The MetPy package, developed and maintained by Unidata, part of the University Corporation for Atmospheric Research (UCAR), is a collection of plotting and calculation routines for the Python language designed for users within the atmospheric sciences community. The aforementioned interpolation functionality has been requested by users within the community for inclusion within MetPy in support of operational and research visualization needs. This work aims to add flexible, user-friendly coordinate system interpolation to the MetPy package, enabling users to easily visualize model output in multiple vertical coordinate systems, with minimal code additions required by users.
The conversion to isentropic coordinates was accomplished by assuming a linear dependence of potential temperature with the natural log of pressure as in Ziv and Alpert (1994), and employing Newton-Raphson iteration to calculate the pressure at each isentropic level. Additional variables are interpolated log-linearly to the new coordinate system. To convert sigma coordinates to isobaric coordinates, all variables are assumed to vary linearly with the natural log of pressure, and are interpolated along the vertical axis to mandatory levels.
These two methods, along with relevant examples, allow for interpolation to multiple coordinate systems with minimal additions to user’s existing visualization scripts. The new functionality, implemented in the 0.6 release of MetPy in September 2017, greatly simplifies vertical interpolation and coordinate interpolation by performing the necessary calculations within vectorized library code, allowing for simple and relatively fast usage within data visualization scripts. This presentation will cover the major steps required and challenges to overcome in the development of these tools, as well as interactive examples utilizing this work.