Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update mpass to match format #15

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions notebooks/animation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Overview\n",
"\n",
"Summary text here\n",
"\n",
"1. \n",
"NCL_animate_1\n",
"\n",
"Please note:\n",
Expand All @@ -35,8 +40,20 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Import packages:\n",
"\n"
"## Prerequisites\n",
"\n",
"| Concepts | Importance | Notes |\n",
"| --- | --- | --- |\n",
"| []() | Necessary | |\n",
"\n",
"- **Time to learn**: X minutes"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---"
]
},
{
Expand Down Expand Up @@ -212,6 +229,24 @@
"# Uncomment this line to save the created animation\n",
"anim.save('images/animate_1.gif', writer='pillow', fps=5);"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Summary\n",
"\n",
"### What's next?\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Resources and references\n",
"\n",
"- []()"
]
}
],
"metadata": {
Expand Down
98 changes: 68 additions & 30 deletions notebooks/mpas-datashader.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,43 @@
"tags": []
},
"source": [
"# MPAS with Datashader and Geoviews\n",
"\n",
"\n",
"## Interactively plotting unstructured grid MPAS data with Datashader and Geoviews\n",
"\n",
"This example demonstrates several key points:\n",
"\n",
"1. Making use of the MPAS file's connectivity information to render data on the native grid, and also\n",
"avoid costly Delaunay triangulation that is required if the MPAS connectivity information is not used.\n",
"2. Rendering data that is sampled on both the 'primal' and 'dual' MPAS mesh.\n",
"3. Using geoviews/holoviews for interactive plotting in a Jupyter Notebook. The plotting is interactive\n",
"in the sense that you can pan and zoom the data. Doing so will reveal greater and greater data fidelity.\n",
"2. Using Datashader to perform background rendering in place of Matplotlib. Unlike Matplotlib, Datashader\n",
"was designed for performance with large data sets.\n",
"# MPAS with Datashader and Geoviews"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Overview\n",
"\n",
"This example of interactively plotting unstructured grid MPAS data with Datashader and Geoviews demonstrates making use of the MPAS file's connectivity information to render data on the native grid, and also\n",
"avoid costly Delaunay triangulation that is required if the MPAS connectivity information is not used, rendering data that is sampled on both the 'primal' and 'dual' MPAS mesh, using geoviews/holoviews for interactive plotting in a Jupyter Notebook. The plotting is interactive in the sense that you can pan and zoom the data. Doing so will reveal greater and greater data fidelity, and sing Datashader to perform background rendering in place of Matplotlib. Unlike Matplotlib, Datashaderwas designed for performance with large data sets.\n",
"\n",
"## The data\n",
"The global data sets used in this example are from the same experiment, but run at several resolutions from\n",
"30km to 3.75km. Due to their size, the higher resolution data sets are only distributed with two variables\n",
"in them:\n",
"+ relhum_200hPa: Relative humidity vertically interpolated to 200 hPa\n",
"+ vorticity_200hPa: Relative vorticity vertically interpolated to 200 hPa\n",
"1. Utility Functions\n",
"2. Loading Data\n",
"3. Using MPAS's cell connectivity array to plot primal mesh data\n",
"4. Synthesizing triangles from points using Delaunay triangulation\n",
"5. Using MPAS's cell connectivity array to plot dual mesh data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Prerequisites\n",
"\n",
"The relhum_200hPa is computed on the MPAS 'primal' mesh, while the vorticity_200hPa is computed on the MPAS\n",
"'dual' mesh. Note that data may also be sampled on the edges of the primal mesh. This example does not\n",
"include/cover edge-centered data.\n",
"| Concepts | Importance | Notes |\n",
"| --- | --- | --- |\n",
"| []() | Necessary | |\n",
"\n",
"These data are courtesy of NCAR's Falko Judt, and were produced as part of the DYAMOND initiative: \n",
" http://dx.doi.org/10.1186/s40645-019-0304-z.\n",
" "
"- **Time to learn**: X minutes"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---"
]
},
{
Expand Down Expand Up @@ -206,10 +213,23 @@
"source": [
"## Load data and coordinates\n",
"\n",
"The global data sets used in this example are from the same experiment, but run at several resolutions from\n",
"30km to 3.75km. Due to their size, the higher resolution data sets are only distributed with two variables\n",
"in them:\n",
"+ relhum_200hPa: Relative humidity vertically interpolated to 200 hPa\n",
"+ vorticity_200hPa: Relative vorticity vertically interpolated to 200 hPa\n",
"\n",
"The dyamond_1 data set is available in several resolutions, ranging from 30 km to 3.75 km.\n",
"\n",
"Currently, the 30-km resolution dataset used in this example is available at geocat-datafiles.\n",
"However, the other resolutions of these data are stored on Glade because of their size.\n"
"However, the other resolutions of these data are stored on Glade because of their size.\n",
"\n",
"The relhum_200hPa is computed on the MPAS 'primal' mesh, while the vorticity_200hPa is computed on the MPAS\n",
"'dual' mesh. Note that data may also be sampled on the edges of the primal mesh. This example does not\n",
"include/cover edge-centered data.\n",
"\n",
"These data are courtesy of NCAR's Falko Judt, and were produced as part of the DYAMOND initiative: \n",
" http://dx.doi.org/10.1186/s40645-019-0304-z.\n"
]
},
{
Expand Down Expand Up @@ -247,7 +267,7 @@
"tags": []
},
"source": [
"## Example 1 - Using MPAS's cell connectivity array to plot primal mesh data\n",
"## Using MPAS's cell connectivity array to plot primal mesh data\n",
"\n",
"In this example we use the MPAS `cellsOnVertex` auxilliary variable, which defines mesh connectivity for the MPAS grid.\n",
"Specifically, this variable tells us the cell IDs for each cell that contains each vertex.\n",
Expand Down Expand Up @@ -304,7 +324,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2 - Synthesizing triangles from points using Delaunay triangulation\n",
"## Synthesizing triangles from points using Delaunay triangulation\n",
"\n",
"In this second example we do not use the triangle connectivity information stored in the MPAS file. Instead we\n",
"use Delaunay triangulation to artifically create a triangle mesh. The benefit of this approach is that we do not\n",
Expand Down Expand Up @@ -342,7 +362,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3 - Using MPAS's cell connectivity array to plot dual mesh data\n",
"## Using MPAS's cell connectivity array to plot dual mesh data\n",
"\n",
"In this example we use the MPAS `verticesOnCell` and `nEdgesOnCell` auxilliary variables, which defines mesh connectivity for the\n",
"MPAS dual grid.\n",
Expand Down Expand Up @@ -381,6 +401,24 @@
"rasterized = hds_rasterize(trimesh, aggregator='mean', precompute=True)\n",
"rasterized.opts(tools=['hover'], colorbar=True, cmap='coolwarm') * gf.coastline(projection=projection)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Summary\n",
"\n",
"### What's next?\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Resources and references\n",
"\n",
"- []()"
]
}
],
"metadata": {
Expand Down
49 changes: 49 additions & 0 deletions notebooks/skewt.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,61 @@
"# Skew T Diagrams"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Overview\n",
"\n",
"Summary text here\n",
"\n",
"1. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Prerequisites\n",
"\n",
"| Concepts | Importance | Notes |\n",
"| --- | --- | --- |\n",
"| []() | Necessary | |\n",
"\n",
"- **Time to learn**: X minutes\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Summary\n",
"\n",
"### What's next?\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Resources and references\n",
"\n",
"- []()"
]
}
],
"metadata": {
Expand Down