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

Let -Jp|P optionally set what angles"w/e" really are #5124

Merged
merged 16 commits into from
Apr 22, 2021

Conversation

PaulWessel
Copy link
Member

See #5120 for background. Since we cannot tell what the angles are we default to great-circle angles (0-360 or -180/80 depending on FORMAT_GEO_MAP setting, and append the degree symbol) unless users add +kx to select longitude annotations or +ky for latitude annotations. The latter also requires -R to be within -90/90 range.

I labelled this WIP for now since we have to decide if this is a bug fix or a feature that should be included in 6.2.0.

Closes #5120.

Since we cannot tell what the angles are we default to great-circle angles (0-360 or -180/80 depending on FORMAT_GEO_MAP setting unless users add +kx to select longitude annotations or +ky for latitude annotations.  The latter restricts -R to be within -90/90 range.
@PaulWessel PaulWessel self-assigned this Apr 10, 2021
@PaulWessel
Copy link
Member Author

This PR yields these failures:

	480 - test/grdinterpolate/slices.sh (Failed)
	481 - test/grdinterpolate/slices_file.sh (Failed)
	645 - test/psbasemap/azim_radial.sh (Failed)
	665 - test/psbasemap/polarapex.sh (Failed)
	666 - test/psbasemap/polarcases.sh (Failed)
	667 - test/psbasemap/polarcircles.sh (Failed)

because they previously all were assumed to be longitudinal crossections for a north pole but in this PR we do not make that assumption. So either (1) add +kx to these examples and then they will pass, or (2) update some scripts/plots to allow for +kx and +ky as well.

@maxrjones
Copy link
Member

@PaulWessel, should I review this now or is more work needed first?

@PaulWessel
Copy link
Member Author

Not yet, working on the labels.

@PaulWessel
Copy link
Member Author

This PR is good to be reviewed. It contains these changes:

  1. Fixes the bug that angles were always assumed to be longitudes. We do so by offering new modifier +kx|y to select longitudes, latitudes [Default is great circle angles]
  2. Adds some checks based on this knowledge (e.g. if +ky then angle range must not exceed ±90).
  3. Adds documentation to this effect and updates test plots that falsely used longitude annotations
  4. Honors label annotation for the radial direction (depth or radius, for instance) which had been left off earlier since the annotation machinery used is that for geographic maps.
  5. Adds three new psbasemap tests to ensure the radial labels are placed correctly for various -JP modifier settings.

All tests pass for me.

@PaulWessel PaulWessel added this to the 6.2.0 milestone Apr 22, 2021
@PaulWessel
Copy link
Member Author

Just pinging @joa-quim @meghanrjones @seisman about this finalized PR since it has been awhile.

@maxrjones maxrjones changed the title WIP Let -Jp|P optionally set what angles"w/e" really are Let -Jp|P optionally set what angles"w/e" really are Apr 22, 2021
@PaulWessel PaulWessel merged commit de67155 into master Apr 22, 2021
@PaulWessel PaulWessel deleted the polar-proj-annotations branch April 22, 2021 17:30
@joa-quim joa-quim mentioned this pull request May 3, 2021
38 tasks
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.

Failed to specify the suffix for latitudes (i.e. N/S) in the polar coordinate system (-Jp, -JP)
3 participants