{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"cell_marker": "\"\"\""
},
"source": [
"Skew-T Analysis\n",
"===============\n",
"\n",
"Create a Skew-T plot using remote data from University of Wyoming.\n",
"\n",
"This example uses example data from the University of Wyoming sounding\n",
"archive for 12 UTC 31 October 2016 for Minneapolis, MN (MPX)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Imports"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd\n",
"\n",
"import metpy.calc as mpcalc\n",
"from metpy.cbook import get_test_data\n",
"from metpy.plots import add_metpy_logo, SkewT\n",
"from metpy.units import units\n",
"\n",
"from datetime import datetime\n",
"from siphon.simplewebservice.wyoming import WyomingUpperAir"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Obtain Data and Format\n",
"\n",
"This requires an internet connection to access the sounding data from a\n",
"remote server at the University of Wyoming.
\n",
"\n",
"First we will create variables for date, time and station.
\n",
"Format: `datetime(YYYY, MM, DD, HH)`
\n",
"\n",
"The `station` entry will need the be the three letter identifier of the station you want to look at. The National Center for Atmospheric Research (NCAR) [Research Applications Labratory](https://ral.ucar.edu) (RAL) continously updates a [detailed list of all stations](https://weather.rap.ucar.edu/surface/stations.txt). "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# Create variables for preferred date, time and station\n",
"preferred_date = datetime(2016, 10, 26, 12)\n",
"station = 'MPX'"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"# Read remote sounding data based on preferred_date and station\n",
"sounding_data = WyomingUpperAir.request_data(preferred_date, station)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"
\n", " | pressure | \n", "height | \n", "temperature | \n", "dewpoint | \n", "direction | \n", "speed | \n", "u_wind | \n", "v_wind | \n", "station | \n", "station_number | \n", "time | \n", "latitude | \n", "longitude | \n", "elevation | \n", "pw | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "984.0 | \n", "287 | \n", "6.6 | \n", "6.2 | \n", "105.0 | \n", "3.0 | \n", "-2.897777 | \n", "0.776457 | \n", "MPX | \n", "72649 | \n", "2016-10-26 12:00:00 | \n", "44.85 | \n", "-93.56 | \n", "287.0 | \n", "24.32 | \n", "
1 | \n", "979.0 | \n", "329 | \n", "6.4 | \n", "5.4 | \n", "105.0 | \n", "6.0 | \n", "-5.795555 | \n", "1.552914 | \n", "MPX | \n", "72649 | \n", "2016-10-26 12:00:00 | \n", "44.85 | \n", "-93.56 | \n", "287.0 | \n", "24.32 | \n", "
2 | \n", "946.3 | \n", "610 | \n", "4.6 | \n", "4.0 | \n", "105.0 | \n", "23.0 | \n", "-22.216294 | \n", "5.952838 | \n", "MPX | \n", "72649 | \n", "2016-10-26 12:00:00 | \n", "44.85 | \n", "-93.56 | \n", "287.0 | \n", "24.32 | \n", "
3 | \n", "925.0 | \n", "798 | \n", "3.4 | \n", "3.0 | \n", "115.0 | \n", "25.0 | \n", "-22.657695 | \n", "10.565457 | \n", "MPX | \n", "72649 | \n", "2016-10-26 12:00:00 | \n", "44.85 | \n", "-93.56 | \n", "287.0 | \n", "24.32 | \n", "
4 | \n", "911.8 | \n", "914 | \n", "2.8 | \n", "2.4 | \n", "120.0 | \n", "27.0 | \n", "-23.382686 | \n", "13.500000 | \n", "MPX | \n", "72649 | \n", "2016-10-26 12:00:00 | \n", "44.85 | \n", "-93.56 | \n", "287.0 | \n", "24.32 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
123 | \n", "20.0 | \n", "26230 | \n", "-55.9 | \n", "-69.9 | \n", "260.0 | \n", "20.0 | \n", "19.696155 | \n", "3.472964 | \n", "MPX | \n", "72649 | \n", "2016-10-26 12:00:00 | \n", "44.85 | \n", "-93.56 | \n", "287.0 | \n", "24.32 | \n", "
124 | \n", "19.5 | \n", "26391 | \n", "-55.1 | \n", "-70.1 | \n", "262.0 | \n", "20.0 | \n", "19.805361 | \n", "2.783462 | \n", "MPX | \n", "72649 | \n", "2016-10-26 12:00:00 | \n", "44.85 | \n", "-93.56 | \n", "287.0 | \n", "24.32 | \n", "
125 | \n", "16.6 | \n", "27432 | \n", "-57.1 | \n", "-69.7 | \n", "275.0 | \n", "23.0 | \n", "22.912478 | \n", "-2.004582 | \n", "MPX | \n", "72649 | \n", "2016-10-26 12:00:00 | \n", "44.85 | \n", "-93.56 | \n", "287.0 | \n", "24.32 | \n", "
126 | \n", "15.0 | \n", "28042 | \n", "-58.3 | \n", "-69.5 | \n", "290.0 | \n", "22.0 | \n", "20.673238 | \n", "-7.524443 | \n", "MPX | \n", "72649 | \n", "2016-10-26 12:00:00 | \n", "44.85 | \n", "-93.56 | \n", "287.0 | \n", "24.32 | \n", "
127 | \n", "14.8 | \n", "28138 | \n", "-58.5 | \n", "-69.5 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "MPX | \n", "72649 | \n", "2016-10-26 12:00:00 | \n", "44.85 | \n", "-93.56 | \n", "287.0 | \n", "24.32 | \n", "
128 rows × 15 columns
\n", "