In this MetPy Monday tutorial, John Leeman from NSF Unidata starts a two-part series on calculating and plotting temperature gradients in Python. In Part 1, the focus is on downloading HRRR model data with Herbie, extracting 850-hPa temperature, understanding grid spacing, and calculating the magnitude of the temperature gradient with MetPy.

This episode uses the April 20, 2023 southern Plains weather case and retrieves HRRR analysis data as an Xarray dataset. John shows how to pull out temperature, latitude, and longitude, attach units with MetPy’s quantify, and calculate the physical grid spacing using mpcalc.lat_lon_grid_deltas. The tutorial explains why latitude and longitude alone are not enough for gradient calculations, since they are angular coordinates rather than distances in meters.

After calculating dx and dy, the video uses MetPy’s gradient function to compute the x and y components of the temperature gradient. The result is then converted from Kelvin per meter into a more useful plotting scale: Kelvin per 100 kilometers. By the end of the episode, the temperature gradient field is ready to be mapped in Part 2.