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

DRAFT: area correction for when an edge is the line of constant lattitude #1120

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

Conversation

rajeeja
Copy link
Contributor

@rajeeja rajeeja commented Dec 23, 2024

No description provided.

@rajeeja rajeeja requested a review from hongyuchen1030 January 3, 2025 17:35
@rajeeja
Copy link
Contributor Author

rajeeja commented Jan 3, 2025

@hongyuchen1030 area correction calc function is ready (computes the correction correctly - more on exposure via interface is needed), how would this be used and what interface do you require for zonal averaging?

@philipc2
Copy link
Member

philipc2 commented Jan 3, 2025

@rajeeja

Have you had a chance to test the performance of this implementation?

@rajeeja
Copy link
Contributor Author

rajeeja commented Jan 3, 2025

No, I was focussed on getting correct result at this point.

@philipc2
Copy link
Member

philipc2 commented Jan 3, 2025

No, I was focussed on getting correct result at this point.

Would you like me take a look at the performance and report back?

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.

May you add some tests & consider adding a blurb in the "Face Area Calculations" user guide.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@rajeeja rajeeja requested a review from philipc2 January 7, 2025 23:59
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.

Nice work.

There are a few formatting issues in the rendered notebook.

https://uxarray--1120.org.readthedocs.build/en/1120/user-guide/area_calc.html

@@ -1753,6 +1758,7 @@ def compute_face_areas(
quadrature_rule: Optional[str] = "triangular",
order: Optional[int] = 4,
latlon: Optional[bool] = True,
correct_area: Optional[bool] = False,
Copy link
Member

Choose a reason for hiding this comment

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

Should we default to True?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so as this is very compute intensive and will increase our testing time by a lot.

uxarray/grid/area.py Outdated Show resolved Hide resolved
uxarray/grid/area.py Outdated Show resolved Hide resolved
uxarray/grid/area.py Outdated Show resolved Hide resolved
uxarray/grid/area.py Outdated Show resolved Hide resolved
if correction != 0.0:
print("AREA Before Correction", area)

# TODO: Fix sign of the calculated correction?
Copy link
Member

Choose a reason for hiding this comment

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

Has this been addressed?

@@ -266,15 +266,16 @@ def test_face_areas_calculate_total_face_area_triangle():
# validate the grid
assert grid_verts.validate()

Copy link
Member

Choose a reason for hiding this comment

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

Do we have any references face areas that we can compare our implementation too? Could be worth adding a test if we do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, we don't - I'll look for one.

rajeeja and others added 6 commits January 8, 2025 11:08
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.

2 participants