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

E3SM UXarray and Dask Examples #836

Open
wants to merge 53 commits into
base: main
Choose a base branch
from
Open

Conversation

rytam2
Copy link
Collaborator

@rytam2 rytam2 commented Jul 3, 2024

Closes #822

Overview

Added user guide notebook on parallel loading with Dask; and workflow examples with E3SM output with visualization and calculations.

PR Checklist

General

  • An issue is linked created and linked
  • Add appropriate labels
  • Filled out Overview and Expected Usage (if applicable) sections

Examples

  • Any new notebook examples added to docs/examples/ folder
  • Clear the output of all cells before committing
  • New notebook files added to docs/examples.rst toctree
  • New notebook files added to new entry in docs/gallery.yml with appropriate thumbnail photo in docs/_static/thumbnails/

@rytam2 rytam2 added documentation Improvements or additions to documentation scalability Related to scalability & performance efforts labels Jul 3, 2024
@rytam2 rytam2 self-assigned this Jul 3, 2024
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

review-notebook-app bot commented Jul 26, 2024

View / edit / reply to this conversation on ReviewNB

philipc2 commented on 2024-07-26T17:50:07Z
----------------------------------------------------------------

Line #2.    # Parallel load

Try to avoid standard comments in these notebooks and include these either as markdown or headings.


Copy link

review-notebook-app bot commented Jul 26, 2024

View / edit / reply to this conversation on ReviewNB

philipc2 commented on 2024-07-26T17:50:08Z
----------------------------------------------------------------

Make sure to emphasize that the data is lazy-loaded. If you index a data variable (i.e. soa_c1DDF), show that you don't actually see the data.

I would add another block, such as the following

Python

uxds_e3sm_parallel_load['soa_c1DDF'].compute()


to show how to get the data in me memory (can also show the .values) too


Copy link

review-notebook-app bot commented Jul 26, 2024

View / edit / reply to this conversation on ReviewNB

philipc2 commented on 2024-07-26T17:50:08Z
----------------------------------------------------------------

Add a small markdown comment above to make sure to close your dask client, stating that it cleanly closes all dask workers and the scheduler


@philipc2 philipc2 requested review from aaronzedwick and rajeeja and removed request for aaronzedwick and rajeeja August 12, 2024 18:27
@rajeeja
Copy link
Contributor

rajeeja commented Aug 12, 2024

We might want to think about changing the name of Gallery - that houses two of the notebooks in this PR.

The formatting of equations for the below: don't look good://
Screenshot 2024-08-12 at 13 51 03
//

@philipc2
Copy link
Member

We might want to think about changing the name of Gallery - that houses two of the notebooks in this PR.

The formatting of equations for the below: don't look good:// Screenshot 2024-08-12 at 13 51 03 //

The Gallery can house both Workflow & Visualization examples. Do you think this sepperation is appropriate?

image

The equations look like this for me in the rendered docs in light mode.

image

Looks like they are broken with the Dark Mode.

image

Have you ever encountered this @anissa111 ?

Copy link

review-notebook-app bot commented Aug 12, 2024

View / edit / reply to this conversation on ReviewNB

rajeeja commented on 2024-08-12T19:13:53Z
----------------------------------------------------------------

A little mention of what all can go as chunks?, here you do chunks={"lev": 4}

Explain what is ".Q" and why this results in Dask graph "18 chunks in 2 graph layers", the more details on how to choose chunk size and info around what happens when you choose the better.


Copy link

review-notebook-app bot commented Aug 12, 2024

View / edit / reply to this conversation on ReviewNB

rajeeja commented on 2024-08-12T19:13:53Z
----------------------------------------------------------------

the only change to ux.open..call is parallel=True

A lot happens under the hood that needs explaining.

In this case you create a client object that using LocalCluster from Dask, . It would be good to reference how it interacts with our open_dataset call. Something along the lines here:

https://docs.xarray.dev/en/stable/user-guide/dask.html (specifically see the mention of dask.delayed)


@anissa111
Copy link
Member

I haven't actually.

I poked around for a bit and suggest starting at this stackoverflow post and here in mathjax documentation.

Let me know what you find!

@rljacob
Copy link
Member

rljacob commented Aug 12, 2024

I think of "gallery" as just being images/viz.

@philipc2
Copy link
Member

I think of "gallery" as just being images/viz.

I've tried to closely follow what Xarray does with their gallery. , which is a combination of visualization and workflow examples.

Copy link
Contributor

@rajeeja rajeeja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments in e3sm-load notebook.

Copy link
Member

@philipc2 philipc2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the long gap in reviews! I've left a few suggestions here. Once we've resolved all the ReviewNB comments, we should be good to go!

docs/userguide.rst Outdated Show resolved Hide resolved
docs/gallery.yml Outdated Show resolved Hide resolved
workflow-examples:
- title: Working with MPAS Grids
path: examples/working-with-mpas-grids.ipynb
thumbnail: _static/thumbnails/004-thumbnail.png

- title: Calculations on E3SMv2 Output with UXarray
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An idea for a more descriptive title, any thoughts?

Suggested change
- title: Calculations on E3SMv2 Output with UXarray
- title: Radiative Feedback Analysis on E3SMv2 Model Output

Copy link
Collaborator Author

rytam2 commented Aug 30, 2024

Now updated with link.


View entire conversation on ReviewNB

Copy link
Collaborator Author

rytam2 commented Aug 30, 2024

Updated


View entire conversation on ReviewNB

Copy link
Collaborator Author

rytam2 commented Aug 30, 2024

Related to bug in .plot.rasterize that requires a name to plot; will keep this line as a temporary solution.


View entire conversation on ReviewNB

philipc2 and others added 6 commits September 3, 2024 11:46
Co-authored-by: Philip Chmielowiec <67855069+philipc2@users.noreply.github.com>
Co-authored-by: Philip Chmielowiec <67855069+philipc2@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation scalability Related to scalability & performance efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

E3SM Visualization Example
6 participants