MetPy Mondays #332 - Getting GFS Case Study Data from NCEI
In this MetPy Monday tutorial, John demonstrates how to access GFS analysis data from the NCAR/UCAR THREDDS Data Server for use in Python case study workflows. This episode focuses on finding the right dataset in the THREDDS catalog, using Siphon to connect to the catalog, building a NetCDF Subset Service query, and using Xarray to clean up the returned data for later plotting and analysis.
Using the same May 20, 2013 case study featured in the Stüve and emagram videos, John shows how to navigate the NCAR data archive, select a historical GFS analysis file, and request only the data needed for a regional weather map. Instead of downloading an entire global model file, the tutorial uses the NetCDF Subset Service to subset by latitude/longitude bounds, request NetCDF output, include latitude and longitude coordinates, and pull only mean sea level pressure.
The video also walks through inspecting the returned NetCDF dataset, extracting latitude, longitude, and pressure variables, removing an unnecessary singleton dimension with NumPy’s squeeze, attaching units from the dataset metadata, converting pressure from pascals to hectopascals, and rebuilding the result as an Xarray DataArray. This prepares a clean mean sea level pressure field that can be used in later MetPy Monday tutorials for map plotting and automatic high/low detection.
Add new comment