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.

Create a Miller Composite chart based on Miller 1972 in Python with MetPy and Matplotlib.

Get the data

This example will use data from the North American Mesoscale Model Analysis for 18 UTC 27 April 2011.

Repeat the above process to query for the analysis from 12 hours earlier (06 UTC) to calculate pressure falls and height change.

Subset the Data

With the data pulled in, we will now subset to the specific levels desired

Prepare Variables for Plotting

With the data queried and subset, we will make any needed calculations in preparation for plotting.

The following fields should be plotted:

500-hPa cyclonic vorticity advection

Surface-based Lifted Index

The axis of the 300-hPa, 500-hPa, and 850-hPa jets

Surface dewpoint

700-hPa dewpoint depression

12-hr surface pressure falls and 500-hPa height changes

/tmp/ipykernel_4665/1703524492.py:2: UserWarning: Vertical dimension number not found. Defaulting to (..., Z, Y, X) order.
  vort_adv_500 = mpcalc.advection(avor_500, u_500, v_500,) * 1e9

For the jet axes, we will calculate the windspeed at each level, and plot the highest values

700-hPa dewpoint depression will be calculated from Temperature_isobaric and RH

12-hr surface pressure falls and 500-hPa height changes

To plot the jet axes, we will mask the wind fields below the upper 1/3 of windspeed.

Create the Plot

With the data now ready, we will create the plot

Plot the composite

<Figure size 1700x1200 with 1 Axes>