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

Topological Aggregations: (Node to Edge) and (Node to Face) #711

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

Conversation

philipc2
Copy link
Member

@philipc2 philipc2 commented Mar 7, 2024

Closes #719 #718 #713 #712

Overview

  • Link to User Guide section on Topological Aggregations
  • Implements localized reductions on top of the standard global reductions provided by Xarray. These reductions utilize connectivity information for perform localized reductions (i.e. the average of all the nodes that surround each face)
    • mean
    • max
    • min
    • prod
    • sum
    • std
    • var
    • median
    • all
    • any

@philipc2 philipc2 changed the title Grid Informed Reductions DRAFT: Grid Informed Reductions Mar 7, 2024
@philipc2 philipc2 changed the title DRAFT: Grid Informed Reductions DRAFT: Grid-Informed Localized Reductions Mar 11, 2024
@philipc2
Copy link
Member Author

philipc2 commented May 7, 2024

@erogluorhan

I'm going to pick this PR back up and address the changes that we've discussed in #724

Below are the following changes I'm going to make

  • Use the term "aggregation" instead of "reductions" when referring to functions such as mean, max, any, etc.
  • Instead of overloading Xarray's methods, create new ones using names such as topological_mean()

This would look like the following in our API

# assume some uxds with a `vorticity_200hPa` variable (node-centered)
uxds = ...

# standard xarray mean
uxds['vorticity_200hPa'].mean()

# topological (i.e. grid informed) mean, average of nodes stored on each face
uxds['vorticity_200hPa'].topological_mean(destination='face')

# topological (i.e. grid informed) mean, average of the nodes composed each edge.
uxds['vorticity_200hPa'].topological_mean(destination='edge')

What do you think? I'd like to really move forward with this functionality and get the performance improvements in.

@erogluorhan
Copy link
Member

Yes, all sounds good!

@philipc2 philipc2 changed the title DRAFT: Grid-Informed Localized Reductions DRAFT: Topological Aggregations May 7, 2024
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@philipc2 philipc2 added this to the Grid-Informed Reductions milestone May 15, 2024
@philipc2 philipc2 marked this pull request as ready for review May 15, 2024 19:51
@philipc2 philipc2 changed the title DRAFT: Topological Aggregations Topological Aggregations May 15, 2024
@philipc2
Copy link
Member Author

I'd really appreciate some help proof reading and checking for any typos in the new functions that I added, especially in the docstrings.

While reviewing, I also suggest looking over the user guide section I made for topological reductions. I'm really happy with how it turned out, and hope we can start making these sections for all of our functionality.

https://uxarray--711.org.readthedocs.build/en/711/user-guide/topological-aggregations.html

@philipc2 philipc2 changed the title Topological Aggregations Topological Aggregations: (Node to Edge) and (Node to Face) May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants