MetPy Mondays #342 - Making a Cross-Section with MetPy Part 2
In this MetPy Monday tutorial, John Leeman from NSF Unidata continues the two-part series on creating meteorological cross-sections in Python using MetPy. In Part 2, the focus shifts from preparing HRRR model data and mapping the cross-section path to actually creating the vertical cross-section plot.
This episode shows how to use MetPy’s cross_section function to interpolate gridded HRRR model data along a user-defined path from Texas toward Nebraska. After creating the cross-section dataset, John calculates potential temperature, rotates the wind components into tangent and normal components relative to the cross-section, and builds a finished plot showing relative humidity, potential temperature contours, and wind barbs.
The tutorial also covers important plotting refinements, including using filled contours for relative humidity, contouring and labeling potential temperature, decimating wind barbs so the plot remains readable, switching the pressure axis to logarithmic scaling, reversing the pressure axis, cleaning up tick labels, removing unnecessary x-axis index labels, and adding a labeled color bar. The result is a presentation-ready HRRR cross-section built from model data that was downloaded and processed entirely in Python.
Add new comment