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

Non-Conservative Zonal Mean #1004

Merged
merged 87 commits into from
Jan 23, 2025
Merged

Non-Conservative Zonal Mean #1004

merged 87 commits into from
Jan 23, 2025

Conversation

philipc2
Copy link
Member

@philipc2 philipc2 commented Oct 10, 2024

Closes #93

Overview

@philipc2 philipc2 changed the title DRAFT: Implement Zonal Average using Fast Constant Latitude Cross Sections DRAFT: Zonal Mean using Fast Constant Latitude Cross Sections Oct 10, 2024
@philipc2 philipc2 self-assigned this Oct 10, 2024
uxarray/core/zonal.py Outdated Show resolved Hide resolved
@philipc2
Copy link
Member Author

@erogluorhan @hongyuchen1030 @paullric

For zonal averaging, would the primary difference between Conservative and Non-Conservative be whether we apply a weighted average as opposed to performing a standard average?

@hongyuchen1030
Copy link
Contributor

@erogluorhan @hongyuchen1030 @paullric

For zonal averaging, would the primary difference between Conservative and Non-Conservative be whether we apply a weighted average as opposed to performing a standard average?

As I explained before here #785 (comment)

Both use weighted average

But non-conservative one use the arc length, conservative use the area as weights

@philipc2
Copy link
Member Author

@erogluorhan @hongyuchen1030 @paullric
For zonal averaging, would the primary difference between Conservative and Non-Conservative be whether we apply a weighted average as opposed to performing a standard average?

As I explained before here #785 (comment)

Both use weighted average

But non-conservative one use the arc length, conservative use the area as weights

Sorry for the duplicate! Send this one without seeing your comment before. Appreciate the clarification

@philipc2
Copy link
Member Author

@aaronzedwick

For reference, the pre-commit is failing in all the PR's and CI's too.

@philipc2 philipc2 linked an issue Oct 13, 2024 that may be closed by this pull request
@philipc2 philipc2 changed the title DRAFT: Zonal Mean using Fast Constant Latitude Cross Sections DRAFT: Zonal Mean Nov 8, 2024
test/test_zonal.py Outdated Show resolved Hide resolved
test/test_zonal.py Outdated Show resolved Hide resolved
uxarray/grid/utils.py Outdated Show resolved Hide resolved
uxarray/grid/utils.py Outdated Show resolved Hide resolved
@hongyuchen1030 hongyuchen1030 self-requested a review January 16, 2025 19:02
Copy link
Contributor

@hongyuchen1030 hongyuchen1030 left a comment

Choose a reason for hiding this comment

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

Looks good! Pinning @amberchen122 for a closer look of the implementation

Copy link
Collaborator

@amberchen122 amberchen122 left a comment

Choose a reason for hiding this comment

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

Great job! Thank you for transferring the changes over. Well done!

uxarray/core/dataarray.py Outdated Show resolved Hide resolved
@philipc2 philipc2 added the run-benchmark Run ASV benchmark workflow label Jan 17, 2025
@philipc2 philipc2 removed the run-benchmark Run ASV benchmark workflow label Jan 17, 2025
@philipc2 philipc2 added the run-benchmark Run ASV benchmark workflow label Jan 17, 2025
@philipc2 philipc2 removed the run-benchmark Run ASV benchmark workflow label Jan 23, 2025
@philipc2
Copy link
Member Author

Some timing results from my M1 Macbook for a 30km MPAS grid (~655,362 hexagons)

Single Timestep

image

1000 Timesteps

image

@philipc2 philipc2 merged commit e0098bc into main Jan 23, 2025
16 checks passed
@rajeeja
Copy link
Contributor

rajeeja commented Jan 23, 2025

Good work!!

@erogluorhan
Copy link
Member

Great work @hongyuchen1030 @philipc2 @amberchen122 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add zonal means (non-conservative)
5 participants