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

Constant latitude intersections using bounding box #1017

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

Conversation

philipc2
Copy link
Member

@philipc2 philipc2 commented Oct 14, 2024

Closes #1018

Overview

  • Uses the internally computed bounding box to compute the constant latitude intersections for each face

Usage

uxgrid = ...

# bounding box
uxgrid.get_faces_at_constant_latitude(lat=20.0, method='bounding_box_intersection')

# intersection of each edge
uxgrid.get_faces_at_constant_latitude(lat=20.0, method='edge_intersection')

@philipc2 philipc2 self-assigned this Oct 14, 2024
@philipc2 philipc2 marked this pull request as ready for review October 14, 2024 21:50
@philipc2
Copy link
Member Author

@hongyuchen1030 @amberchen122

This implements _get_candidate_faces_at_constant_latitude from #785 using the desired API.

Let me know if method='bounding_box_intersection' is appropriate for this.

@philipc2
Copy link
Member Author

Feel free to merge any tests from #785 that are relevant to the candidate face computation also.

@hongyuchen1030
Copy link
Contributor

@hongyuchen1030 @amberchen122

This implements _get_candidate_faces_at_constant_latitude from #785 using the desired API.

Let me know if method='bounding_box_intersection' is appropriate for this.

Hi @philipc2
Thanks for putting this up together. I am extremely busy this week for my paper and my QE. I will try my best to review all the recent PRs this weekend.

However, I don't think method='bounding_box_intersection' is the proper name.

In fact, this is the only method we mathematically calculate the intersections correctly.

All other "faster" methods didn't guarantee the intersection points and just gave some approximate results that "might work".

So I feel like we should name this one similar to "mathematical intersections" and other methods as similar to "tentative methods".

@philipc2
Copy link
Member Author

@hongyuchen1030 @amberchen122

This implements _get_candidate_faces_at_constant_latitude from #785 using the desired API.

Let me know if method='bounding_box_intersection' is appropriate for this.

Hi @philipc2
Thanks for putting this up together. I am extremely busy this week for my paper and my QE. I will try my best to review all the recent PRs this weekend.

However, I don't think method='bounding_box_intersection' is the proper name.

In fact, this is the only method we mathematically calculate the intersections correctly.

All other "faster" methods didn't guarantee the intersection points and just gave some approximate results that "might work".

So I feel like we should name this one similar to "mathematical intersections" and other methods as similar to "tentative methods".

Thanks for the quick feedback! Good luck with your work this week!

@rajeeja
Copy link
Contributor

rajeeja commented Oct 15, 2024

Hey @philipc2 thanks for putting this together, would be the first step to determine the faces to perform area correction when edge is around line of constant latitude or great circle arc?

@philipc2
Copy link
Member Author

Hey @philipc2 thanks for putting this together, would be the first step to determine the faces to perform area correction when edge is around line of constant latitude or great circle arc?

I don't believe this would require any area correction, as the bounding box implemented by @hongyuchen1030 already considers the spherical geometry.

Though area calculation is definitely something that down the line is important, as a lot of calculations are area-weighted.

@hongyuchen1030
Copy link
Contributor

Hey @philipc2 thanks for putting this together, would be the first step to determine the faces to perform area correction when edge is around line of constant latitude or great circle arc?

I don't believe this would require any area correction, as the bounding box implemented by @hongyuchen1030 already considers the spherical geometry.

Though area calculation is definitely something that down the line is important, as a lot of calculations are area-weighted.

For non-conservative zonal average, we don't need to consider area calculation.

Area calculation is one of the last two steps of conservative zonal average.

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.

Constant latitude cross sections using bounding box
3 participants