Skip to content

Commit

Permalink
deploy: 8674d6f
Browse files Browse the repository at this point in the history
  • Loading branch information
dopplershift committed Jun 14, 2024
1 parent d7d4fde commit eda08e3
Show file tree
Hide file tree
Showing 64 changed files with 14,834 additions and 123 deletions.
20 changes: 17 additions & 3 deletions _preview/13/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
gtag('config', 'G-T52X8HNYE8');
</script>
<script>const THEBE_JS_URL = "https://unpkg.com/[email protected]/lib/index.js"; const thebe_selector = ".thebe,.cell"; const thebe_selector_input = "pre"; const thebe_selector_output = ".output, .cell_output"</script>
<script>window.MathJax = {"options": {"processHtmlClass": "tex2jax_process|mathjax_process|math|output_area"}}</script>
<script defer="defer" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script>DOCUMENTATION_OPTIONS.pagename = 'README';</script>
<link rel="icon" href="_static/favicon.ico"/>
<link rel="index" title="Index" href="genindex.html" />
Expand Down Expand Up @@ -376,10 +378,20 @@
<li class="toctree-l2"><a class="reference internal" href="notebooks/synoptic/xarray_500hPa_map.html">Using Xarray for Data read and selection</a></li>
</ul>
</details></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="notebooks/skewt/index.html">Skew-T Analysis</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul class="simple">
<li class="toctree-l1 has-children"><a class="reference internal" href="notebooks/skewt/index.html">Skew-T Analysis</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l2"><a class="reference internal" href="notebooks/skewt/Advanced_Sounding.html">Advanced Sounding</a></li>
<li class="toctree-l2"><a class="reference internal" href="notebooks/skewt/Foundational_Sounding.html">MetPy Skew-T Cookbook</a></li>

<li class="toctree-l2"><a class="reference internal" href="notebooks/skewt/Skew-T_Analysis.html">Skew-T Analysis</a></li>
<li class="toctree-l2"><a class="reference internal" href="notebooks/skewt/Skew-T_Hodograph_Inset.html">Hodograph Inset</a></li>
<li class="toctree-l2"><a class="reference internal" href="notebooks/skewt/Skew-T_Layout_Hodograph.html">Skew-T with Complex Layout</a></li>
<li class="toctree-l2"><a class="reference internal" href="notebooks/skewt/Sounding_Calculations.html">Sounding Calculation Examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="notebooks/skewt/Sounding_LCL_Dataset.html">Sounding as Dataset Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="notebooks/skewt/Sounding_Plotter.html">Sounding Plotter</a></li>
</ul>
</details></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="notebooks/convective/index.html">Convective Calculations</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l2"><a class="reference internal" href="notebooks/convective/MUCAPE.html">Most-Unstable Convective Available Potential Energy (MUCAPE)</a></li>
<li class="toctree-l2"><a class="reference internal" href="notebooks/convective/miller_composite.html">Miller Composite Chart</a></li>
</ul>
</details></li>
Expand All @@ -389,7 +401,9 @@
<li class="toctree-l2"><a class="reference internal" href="notebooks/specialty/Smoothing_Contours.html">Smoothing Contours</a></li>
</ul>
</details></li>
<li class="toctree-l1 has-children"><a class="reference internal" href="notebooks/declarative/index.html">Simplified Plotting</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul class="simple">
<li class="toctree-l1 has-children"><a class="reference internal" href="notebooks/declarative/index.html">Simplified Plotting</a><details><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l2"><a class="reference internal" href="notebooks/declarative/Declarative_300hPa.html">MetPy Declarative - 300 hPa</a></li>
<li class="toctree-l2"><a class="reference internal" href="notebooks/declarative/declarative_500_hPa.html">Declarative 500-hPa Absolute Vorticity</a></li>
</ul>
</details></li>
</ul>
Expand Down Expand Up @@ -426,7 +440,7 @@
<img src="_static/NSF-Unidata_lockup_horizontal_2023_light.png" alt="NSF-Unidata Logo" width="35%"/>
</div>
<div class="column">
<img src="_static/metpy_150x150.png" alt="MetPy Logo" width="100%"/>
<img src="_static/metpy_150x150.png" alt="MetPy Logo" width="35%"/>
</div>
</div>
<section class="tex2jax_ignore mathjax_ignore" id="metpy-cookbook">
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion _preview/13/_sources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img src="_static/NSF-Unidata_lockup_horizontal_2023_light.png" alt="NSF-Unidata Logo" width="35%"/>
</div>
<div class="column">
<img src="_static/metpy_150x150.png" alt="MetPy Logo" width="100%"/>
<img src="_static/metpy_150x150.png" alt="MetPy Logo" width="35%"/>
</div>
</div>

Expand Down
12 changes: 12 additions & 0 deletions _preview/13/_sources/notebooks/convective/MUCAPE.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"cell_marker": "\"\"\"",
"lines_to_next_cell": 0
},
"source": [
"Most-Unstable Convective Available Potential Energy (MUCAPE)\n",
"======================\n",
"Calculate MUCAPE on a grid of netCDF data using MetPy."
]
},
{
"cell_type": "code",
"execution_count": 10,
Expand Down
12 changes: 12 additions & 0 deletions _preview/13/_sources/notebooks/convective/TCPW.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"cell_marker": "\"\"\"",
"lines_to_next_cell": 0
},
"source": [
"Total Column Precipitable Water (TCPW)",
"======================\n",
"Calculate TCPW on a grid of netCDF data using MetPy."
]
},
{
"cell_type": "code",
"execution_count": 10,
Expand Down
193 changes: 193 additions & 0 deletions _preview/13/_sources/notebooks/declarative/Declarative_300hPa.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"cell_marker": "\"\"\""
},
"source": [
"MetPy Declarative - 300 hPa\n",
"===========================\n",
"\n",
"By: Kevin Goebbert\n",
"\n",
"This example uses the declarative syntax available through the MetPy\n",
"package to allow a more convenient method for creating simple maps of\n",
"atmospheric data. The key thing the declarative language does is to\n",
"reduce the number of packages that users will need to know in detail and\n",
"instead allow them to set key parameters to get the map they desire. One\n",
"key element is the use of xarray as the data object, which allows\n",
"coordinate information to be associated with atmospheric variables."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from datetime import datetime\n",
"\n",
"import metpy.calc as mpcalc\n",
"from metpy.plots.declarative import *\n",
"from metpy.units import units\n",
"import xarray as xr"
]
},
{
"cell_type": "markdown",
"metadata": {
"cell_marker": "######################################################################"
},
"source": [
"Open dataset using xarray module and subset global GFS to be over the\n",
"CONUS.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"ds = xr.open_dataset('https://thredds.ucar.edu/thredds/dodsC/casestudies'\n",
" '/python-gallery/GFS_20101026_1200.nc').sel(\n",
" lon=slice(360-150, 360-50, 2), lat=slice(65, 20, 2))"
]
},
{
"cell_type": "markdown",
"metadata": {
"cell_marker": "######################################################################"
},
"source": [
"Calculate Variable and Add to Dataset\n",
"-------------------------------------\n",
"\n",
"Here it is demonstrated how you can calculate a new variable and add it\n",
"to the xarray dataset (ds) so that it can be plotted with the\n",
"declarative syntax. The key to adding a variable to an xarray dataset\n",
"for use in the declarative syntax is the need to add a ``grid_mapping``\n",
"and ``units`` attribute.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Calculate New Variables and place into Xarray Dataset\n",
"uwnd = ds['u-component_of_wind_isobaric']\n",
"vwnd = ds['v-component_of_wind_isobaric']\n",
"\n",
"# Compute wind speed using MetPy\n",
"wspd = mpcalc.wind_speed(uwnd, vwnd)\n",
"\n",
"# Place wind speed (wspd) into xarray dataset and attach needed attributes\n",
"ds['wind_speed'] = wspd"
]
},
{
"cell_type": "markdown",
"metadata": {
"cell_marker": "######################################################################"
},
"source": [
"Declarative Plot\n",
"----------------\n",
"\n",
"The following settings create a single panel map plot of 300 hPa\n",
"geopotential heights, wind speed, and wind barbs.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Countour Plot of Geopotential Heights\n",
"contour = ContourPlot()\n",
"contour.data = ds\n",
"contour.time = datetime(2010, 10, 31, 12)\n",
"contour.field = 'Geopotential_height_isobaric'\n",
"contour.level = 300 * units.hPa\n",
"contour.linecolor = 'black'\n",
"contour.linestyle = '-'\n",
"contour.linewidth = 2\n",
"contour.clabels = True\n",
"contour.contours = list(range(0, 20000, 120))\n",
"\n",
"# Colorfilled Plot of Wind Speed\n",
"cfill = FilledContourPlot()\n",
"cfill.data = ds\n",
"cfill.field = 'wind_speed'\n",
"cfill.level = 300 * units.hPa\n",
"cfill.colormap = 'BuPu'\n",
"cfill.contours = list(range(50, 171, 20))\n",
"cfill.colorbar = 'vertical'\n",
"cfill.plot_units = 'kt'\n",
"\n",
"# Plot wind barbs\n",
"barb = BarbPlot()\n",
"barb.data = ds\n",
"barb.level = 300 * units.hPa\n",
"barb.field = ['u-component_of_wind_isobaric', 'v-component_of_wind_isobaric']\n",
"barb.skip = (3, 3)\n",
"barb.color = 'black'\n",
"barb.barblength = 6.5\n",
"barb.earth_relative = False\n",
"barb.plot_units = 'kt'\n",
"\n",
"# Panel for plot with Map features\n",
"panel = MapPanel()\n",
"panel.layout = (1, 1, 1)\n",
"panel.area = (-124, -72, 20, 53)\n",
"panel.projection = 'lcc'\n",
"panel.layers = ['coastline', 'borders', 'states', 'land']\n",
"panel.plots = [cfill, contour, barb]\n",
"\n",
"# Bringing it all together\n",
"pc = PanelContainer()\n",
"pc.size = (15, 9)\n",
"pc.panels = [panel]\n",
"\n",
"pc.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"jupytext": {
"cell_metadata_filter": "-all",
"main_language": "python",
"notebook_metadata_filter": "-all"
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Loading

0 comments on commit eda08e3

Please sign in to comment.