{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Xarray and ERA5" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Overview:\n", "\n", "1. Programmatically request a specific date from the [RDA ERA-5 THREDDS repository](https://rda.ucar.edu/thredds/catalog/files/g/ds633.0/catalog.html)\n", "1. Create a time loop and create products of interest for each time in the loop" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Prerequisites\n", "\n", "| Concepts | Importance | Notes |\n", "| --- | --- | --- |\n", "| Xarray | Necessary | |\n", "\n", "* **Time to learn**: 30 minutes\n", "***" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Imports" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import xarray as xr\n", "import numpy as np\n", "import pandas as pd\n", "from pandas.tseries.offsets import MonthEnd,MonthBegin\n", "import cartopy.feature as cfeature\n", "import cartopy.crs as ccrs\n", "import requests\n", "from datetime import datetime, timedelta\n", "import warnings\n", "import metpy.calc as mpcalc\n", "from metpy.units import units\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Programmatically request a specific date from the [RDA ERA-5 THREDDS repository](https://rda.ucar.edu/thredds/catalog/files/g/ds633.0/catalog.html)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The next several cells set the date/time, creates the URL strings, and retrieves selected grids from RDA." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### For this notebook, we choose the [\"Cleveland Superbomb\"](https://en.wikipedia.org/wiki/Great_Blizzard_of_1978) case of January 26, 1978." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Select your date and time here\n", "year = 1978\n", "month = 1\n", "day = 26\n", "hour = 0" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
open_mfdataset
method, this method does not reliably work when reading from a THREDDS server such as RDA's. Therefore, please restrict your temporal range to no more than one calendar day in this notebook.\n",
"