Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

The MetPy function metpy.calc.isentropic_interpolation allows for isentropic analysis from model analysis data in isobaric coordinates.

Getting the data

In this example, the latest GFS forecasts data from the National Centers for Environmental Information (https://www.ncei.noaa.gov) will be used, courtesy of the Univeristy Corporation for Atmospheric Research Thredds Data Server.

To properly interpolate to isentropic coordinates, the function must know the desired output isentropic levels. An array with these levels will be created below.

Conversion to Isentropic Coordinates

Once model data in isobaric coordinates has been pulled and the desired isentropic levels created, the conversion to isentropic coordinates can begin. Data will be passed to the function as below. The function requires that isentropic levels, isobaric levels, and temperature be input. Any additional inputs (in this case relative humidity, u, and v wind components) will be linearly interpolated to isentropic space.

/tmp/ipykernel_4390/414936893.py:1: UserWarning: Interpolation point out of data bounds encountered
  isent_anal = mpcalc.isentropic_interpolation(isentlevs,

The output is a list, so now we will separate the variables to different names before plotting.

A quick look at the shape of these variables will show that the data is now in isentropic coordinates, with the number of vertical levels as specified above.

(4, 2, 101, 201)
(4, 2, 101, 201)
(4, 2, 101, 201)
(4, 2, 101, 201)

Plotting the Isentropic Analysis

Set up our projection

<Figure size 1400x1200 with 2 Axes>