{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 01_GriddedDiagnostics_TempAdvection_ERA5" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## In this notebook, we'll cover the following:\n", "1. Select a date and access the ERA5 dataset\n", "2. Subset the desired variables along their dimensions\n", "3. Calculate and visualize diagnostic quantities.\n", "4. Smooth the diagnostic field." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 0) Imports " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import xarray as xr\n", "import pandas as pd\n", "import numpy as np\n", "from datetime import datetime as dt\n", "from metpy.units import units\n", "import metpy.calc as mpcalc\n", "import cartopy.crs as ccrs\n", "import cartopy.feature as cfeature\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# 1) Specify a starting and ending date/time, regional extent, vertical levels, and access the ERA5" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
rename_dims
and rename_vars
functions to perform the renamings.\n",
"xr.open_mfdataset
function or if the data is stored in the Zarr file format, the dataset and its constituent data arrays are in the form of Dask dataset / data arrays. While a detailed exploration of Dask is beyond the scope of this notebook and course, here we will use Xarray's compute
function to read the dataset/array into memory, so that we can later do unit conversions and diagnostics with MetPy.\n",
"