Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.