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.

Plot an 850 hPa map with calculating advection using MetPy.

Beyond just plotting 850-hPa level data, this uses calculations from metpy.calc to find the temperature advection. Currently, this needs an extra helper function to calculate the distance between lat/lon grid points.

Imports

Create NCSS object to access the NetcdfSubset

Data from NCEI GFS 0.5 deg Analysis Archive

Begin data calculations

/tmp/ipykernel_4285/72829660.py:2: UserWarning: Vertical dimension number not found. Defaulting to (..., Z, Y, X) order.
  adv = mpcalc.advection(temp_850, u_wind_850, v_wind_850)

Begin map creation

/home/runner/micromamba/envs/metpy-cookbook/lib/python3.14/site-packages/cartopy/io/__init__.py:263: DownloadWarning: Downloading: https://naturalearth.s3.amazonaws.com/50m_cultural/ne_50m_admin_0_boundary_lines_land.zip
  warnings.warn(f'Downloading: {url}', DownloadWarning)
<Figure size 1400x1200 with 2 Axes>