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

Fix clip 2dx2d cells include poles #59

Merged

Conversation

nikizadehgfdl
Copy link
Contributor

  • This update addresses and fixes issue exchange grid clipper tool does not work correctly around the tripolar fold #42
  • Fixes clip_2dx2d for grids surrounding the Poles
    • The clip_2dx2d issue exchange grid clipper tool does not work correctly around the tripolar fold #42 seems to arise when the first box passes through
      the NorthPole and corners have a longitude greater than 2*pi or when
      the SouthPole and corners have a longitude less than 0.

    • This heuristic fix shifts ALL the longitudes of the two boxes to be
      within -pi and pi and it seems to cure the clipping issues.

    • I can't figure out why this fixes the issue. Need help!

    • Shifting all angles (regardless of location of the grid boxes) to be within -pi and pi does not work and ruins the clipper! Only the boxes that cross the poles have to be shifted!

    • I added some unit tests to create_xgrid.c to show this.

@ceblanton please assign this for review to @jwdGFDL and @bensonr . Please add anyone you think might be familiar with the clip_2dx2d algorithm.

- The clip_2dx2d issue NOAA-GFDL#42 seems to arise when the first box passes through
  the NP and corners have a longitude greater than 2*pi.
  This heurtistic fix shifts ALL the longitudes of the two boxes to be
  within -pi and pi and it seems to cure the clipping issues. Why?

- I added some unit tests to create_xgrid.c to show this.
- The clip_2dx2d issue NOAA-GFDL#42 seems to arise when the first box passes through
  the NP and corners have a longitude greater than 2*pi or when
  the SP and corners have a longitude less than 0.
  This heurtistic fix shifts ALL the longitudes of the two boxes to be
  within -pi and pi and it seems to cure the clipping issues. Why?

- I added some unit tests to create_xgrid.c to show this.
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.

exchange grid clipper tool does not work correctly around the tripolar fold
4 participants