Skip to content

Commit

Permalink
Cookbook Revisions (#23)
Browse files Browse the repository at this point in the history
* start revisions

* update outline

* update notebook title

* work on grid notebook

* update notebooks

* work on notebooks

* update the start of each notebook

* AMS Revisions - Foundations: Populate its all the notebooks. Also update README for the whole cookbook accordingly (#24)

* Populate all the notebooks of 01-foundations. Also update README for teh whole cookbook accordingly

* Update README.md

* add recipie notebooks, work on 03

* updates to section 02

* add 30km grid, work on notebooks

* update 03

* Populate the Intro-to-UXarray Notebooks (#25)

* Populated the Intro-to-UXarray Notebooks

* small revisions

* revisions (2)

---------

Co-authored-by: Philip Chmielowiec <[email protected]>

* try gifs for interactive notebook

* add gifs to interactive section

* static notebooks (1)

* data-viz, high-res, notebooks

* update 03 notebooks, add xarray notebook

* try rendered high-res notebook (2)

* try rendered high-res notebook (2)

* use rendered notebook

* use rendered notebook

* update high-res notebook

* update notebook markdown

* update notebook markdown

* update time to learn formatting

* clean selection notebook

* update notebooks

* update notebooks, add e3sm data

* remove large ds

* clean up data & grid viz markdown

* wrap up markdown for grid & data viz notebooks

* clean up markdown for geo and high-res

* update markdown in mpas-atmo and mpas-ocean

* update customization and data viz markdown

* re-add high-res notebook to config and pre-commit

* update markdown, update toc

* small markdown correction in mpas-atmo

* Fix typos 'recipies' to 'recipes'

* Simple grammatical corrections

* Rename folder 'recipies' to 'recipes' to help with typo fix

* run pre-commit

* delete old folders

* put atmo before ocean

* add markdown for mpas-ocean

* slightly modify mpas-ocean bullet points

* add very minimal subset of e3sm data for radiative feedback

* add e3sm notebook

* small markdown correction to high-res

* minor readme update

* Update _toc.yml to get compare-xarray to show up

* update e3sm and mpas ocean notebooks

* small typo

---------

Co-authored-by: Orhan Eroglu <[email protected]>
Co-authored-by: erogluorhan <[email protected]>
  • Loading branch information
3 people authored Jan 9, 2025
1 parent ba13351 commit 495f591
Show file tree
Hide file tree
Showing 50 changed files with 18,654 additions and 5,049 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,5 @@ repos:
additional_dependencies: [black]
- id: nbqa-pyupgrade
additional_dependencies: [pyupgrade]
exclude: foundations/quickstart.ipynb
- id: nbqa-isort
additional_dependencies: [isort]
50 changes: 33 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,28 @@
[![Binder](https://binder.projectpythia.org/badge_logo.svg)](https://binder.projectpythia.org/v2/gh/ProjectPythia/unstructured-grid-viz-cookbook.git/main?labpath=notebooks)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10403389.svg)](https://doi.org/10.5281/zenodo.10403389)

This Cookbook is a comprehensive showcase of workflows & techniques for visualizing Unstructured Grids using [UXarray](https://uxarray.readthedocs.io/).
This Cookbook is a comprehensive showcase of workflows & techniques for visualizing Unstructured Grids using [UXarray](https://uxarray.readthedocs.io/),
also providing foundational information on unstructured grids.

## Motivation

The ability to natively visualize unstructured grids is a much-needed ability within the Scientific Python Ecosystem,
The ability to natively visualize unstructured grids is much needed within the Scientific Python Ecosystem,
which poses multiple challenges and needs to:

- Not regrid the source unstructured grid to structure
- Not regrid the source unstructured grid to structured grid
- Take advantage of grid information, such as connectivity variables
- Limit the amount of pre-processing needed to prepare the data for Python visualization tools

UXarray enables such visualization methods that operate directly on unstructured grid data,
providing Xarray-styled functionality to better read in
and use unstructured grid datasets that follow standard conventions.
UXarray supports a variety of unstructured grid formats including UGRID, MPAS, SCRIP, and Exodus,
and is extendable for other formats.
UXarray enables such visualization methods that operate directly on unstructured grid data, providing
Xarray-styled functionality to better read in and use unstructured grid datasets that follow standard
conventions.

This cookbook covers an introduction to unstructured grids and UXarray,
provides an overview of the visualization methods and libraries, and showcases several UXarray visualization functions.
UXarray supports a variety of unstructured grid formats and file types including UGRID, MPAS, ICON, CAM-SE,
SCRIP, Exodus, ESMF, GEOS, and FESOM2, and is extensible for other formats.

This cookbook covers an introduction to unstructured grids and UXarray from a visualization standpoint,
providing foundational information about unstructured grids, visualization methods and libraries, and
introducing UXarray, and showcasing several UXarray visualization functions and workflows.

## Authors

Expand All @@ -47,19 +50,32 @@ provides an overview of the visualization methods and libraries, and showcases s

## Structure

This cookbook is split up into a few chapters that provide a detailed overview of how to use UXarray to work with and visualize unstructured grid datasets:
This cookbook is split up into several chapters to communicate the content efffectively with different
levels of readers:

**1. Foundations**

Here, we cover overview of the foundational topics necessary to understand the content in this cookbook,
e.g. what unstructured grids are and how they are different than structured grids, what plotting libraries
and visualization techniques exist that can be helpful for unstructured grid visualization, and we briefly
mention how UXarray is related to these.

**1. Introduction to UXarray & Unstructured Grids**
**2. Introduction to UXarray**

Here we cover what unstructured grids are and how they are different than structured grids as well as whay UXarray could play a significant role in unstructured grid visualization.
In this chapter, we provide an overview of UXarray: An Xarray-extension for unstructured grid-formatted
climate and global weather data analysis and visualization.

**2. Methods & Libraries for Unstructured Grid Visualization**
**3. Plotting with UXarray**

In this chapter, we briefly introduce plotting libraries and their specific technologies as well as rendering techniques that could be used for unstructured grid plotting and are used as part of UXarray.
We provide an overview of the UXarray plotting API along with several visualization functionality, and cases
and examples that can be realized using such UXarray functionality; Grid visualization, Data visualization,
Geographic projections and features, to name a few. Also in this section, customization and interactivaity
with UXarray plotting and considerations with high-resolution plotting are also provided.

**3. UXarray Visualization**
**4. Visualization Recipies**

Several visualization cases and examples that can be realized using UXarray are provided in this chapter; grid topology plots, polygons, points, to name a few. Also in this section, the usage of UXarray plotting API and a discussion of visualization at scale are also provided.
In this last chapter, we offer to the interested readers a set of focused workflows that can be realized
with UXarray, including visualizations of MPAS and E3SM model output.

## Running the Notebooks

Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Unstructured Grids Visualization Cookbook
description: Comprehensive showcase of workflows and techniques for visualizing Unstructured Grids using UXarray
author: the <a href="https://projectpythia.org/">Project Pythia</a> Community
logo: notebooks/images/logos/pythia_logo-white-rtext.svg
copyright: "2024"
copyright: "2025"

execute:
# To execute notebooks via a Binder instead, replace 'cache' with 'binder'
Expand Down
4 changes: 2 additions & 2 deletions _static/custom.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.bd-main .bd-content .bd-article-container {
max-width: 100%; /* default is 60em */
max-width: 100%; /* default is 60em */
}
.bd-page-width {
max-width: 100%; /* default is 88rem */
max-width: 100%; /* default is 88rem */
}
Binary file added _static/images/grids.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/images/uxarray-design.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 25 additions & 25 deletions _templates/footer-extra.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<div class="container-fluid footer-extra">
<div class="container">
<center>
Theme by <a href="https://projectpythia.org">Project Pythia</a>. All code
in Pythia Cookbooks is licensed under
<a href="https://opensource.org/license/apache-2-0">Apache 2.0</a>. All
other non-code content is licensed under
<a href="https://creativecommons.org/licenses/by/4.0/">
Creative Commons BY 4.0 (CC BY 4.0)</a
>.
</center>
<br /><br />
<div class="row">
<p class="m-0">
<img
src="{{ pathto('_static/footer-logo-nsf.png', 1) }}"
style="float: left; width: 60px; height: 60px; margin-right: 1rem"
/>
This material is based upon work supported by the National Science
Foundation under Grant Nos. 2026863 and 2026899. Any opinions, findings,
and conclusions or recommendations expressed in this material are those
of the author(s) and do not necessarily reflect the views of the
National Science Foundation.
</p>
</div>
<div class="container">
<center>
Theme by <a href="https://projectpythia.org">Project Pythia</a>. All code
in Pythia Cookbooks is licensed under
<a href="https://opensource.org/license/apache-2-0">Apache 2.0</a>. All
other non-code content is licensed under
<a href="https://creativecommons.org/licenses/by/4.0/">
Creative Commons BY 4.0 (CC BY 4.0)</a
>.
</center>
<br /><br />
<div class="row">
<p class="m-0">
<img
src="{{ pathto('_static/footer-logo-nsf.png', 1) }}"
style="float: left; width: 60px; height: 60px; margin-right: 1rem"
/>
This material is based upon work supported by the National Science
Foundation under Grant Nos. 2026863 and 2026899. Any opinions, findings,
and conclusions or recommendations expressed in this material are those
of the author(s) and do not necessarily reflect the views of the
National Science Foundation.
</p>
</div>
</div>
</div>
</div>
44 changes: 29 additions & 15 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,37 @@ parts:
- caption: Preamble
chapters:
- file: notebooks/how-to-cite
- caption: Introduction to UXarray & Unstructured Grids

- caption: Foundations
chapters:
- file: notebooks/01-foundations/unstructured-grids
- file: notebooks/01-foundations/plotting-libs
- file: notebooks/01-foundations/rendering-techniques

- caption: Introduction to UXarray
chapters:
- file: notebooks/01-intro/01-unstructured-grid-overview
- file: notebooks/01-intro/02-data-structures
- file: notebooks/01-intro/03-data-mapping
- file: notebooks/02-intro-to-uxarray/overview
- file: notebooks/02-intro-to-uxarray/grid
- file: notebooks/02-intro-to-uxarray/uxds-uxda
- file: notebooks/02-intro-to-uxarray/selection

- caption: Methods & Libraries for Unstructured Grid Visualization
- caption: Plotting with UXarray
chapters:
- file: notebooks/02-methods/01-plotting-libraries
- file: notebooks/02-methods/02-rendering-techniques
- file: notebooks/03-plotting-with-uxarray/grid-viz
- file: notebooks/03-plotting-with-uxarray/data-viz
- file: notebooks/03-plotting-with-uxarray/geo
- file: notebooks/03-plotting-with-uxarray/customization
- file: notebooks/03-plotting-with-uxarray/high-res
- file: notebooks/03-plotting-with-uxarray/compare-xarray

- caption: UXarray Visualization
- caption: Visualization Recipes
chapters:
- file: notebooks/03-uxarray-vis/01-plot-api
- file: notebooks/03-uxarray-vis/002-xarray-to-uxarray
- file: notebooks/03-uxarray-vis/02-grid-topology
- file: notebooks/03-uxarray-vis/03-polygons
- file: notebooks/03-uxarray-vis/04-points
- file: notebooks/03-uxarray-vis/07-animations
- file: notebooks/03-uxarray-vis/06-performance
- file: notebooks/04-recipes/mpas-atmo
- file: notebooks/04-recipes/mpas-ocean
# - file: notebooks/04-recipes/mpas-regional
- file: notebooks/04-recipes/e3sm
# - caption: Compatibility with Visualization Packages
# chapters:
# - file: notebooks/05-viz-packages/matplotlib
# - file: notebooks/05-viz-packages/datashader
# - file: notebooks/05-viz-packages/lonboard
Binary file added meshfiles/hex.data.nc
Binary file not shown.
Binary file added meshfiles/hex.grid.nc
Binary file not shown.
Binary file added meshfiles/hex.node.data.nc
Binary file not shown.
Binary file added meshfiles/ne30pg2.data.nc
Binary file not shown.
Binary file added meshfiles/ne30pg2.grid.nc
Binary file not shown.
Binary file added meshfiles/x1.655362.data.nc
Binary file not shown.
Binary file added meshfiles/x1.655362.grid.nc
Binary file not shown.
Loading

0 comments on commit 495f591

Please sign in to comment.