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

Figure.coast/pygmt.select/pygmt.grdlandmask: Use long names ("crude"/"low"/"intermediate"/"high"/"full") for the 'resolution' parameter #3013

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

seisman
Copy link
Member

@seisman seisman commented Jan 18, 2024

This PR updates the resolution parameter for Figure.coast/pygmt.select/pygmt.grdlandmask to use long names.

@seisman seisman force-pushed the coast/resolution branch from d9af3e0 to 88be372 Compare July 21, 2024 09:53
@seisman seisman changed the title POC: coast: Make the 'resolution' parameter more Pythonic Figure.coast: Use long names ("crude"/"low"/"intermediate"/"high"/"full") for the 'resolution' parameter Jul 21, 2024
@seisman seisman changed the title Figure.coast: Use long names ("crude"/"low"/"intermediate"/"high"/"full") for the 'resolution' parameter Figure.coast/pygmt.select/pygmt.grdlandmask: Use long names ("crude"/"low"/"intermediate"/"high"/"full") for the 'resolution' parameter Jul 22, 2024
@seisman seisman marked this pull request as ready for review October 30, 2024 01:23
@seisman seisman added needs review This PR has higher priority and needs review. run/benchmark Trigger the benchmark workflow in PRs enhancement Improving an existing feature labels Oct 30, 2024
Copy link

codspeed-hq bot commented Oct 30, 2024

CodSpeed Performance Report

Merging #3013 will degrade performances by 12.94%

Comparing coast/resolution (1267a9c) with main (8eb2b4f)

Summary

❌ 1 regressions
✅ 100 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main coast/resolution Change
test_grdlandmask_no_outgrid 118.6 ms 136.2 ms -12.94%

if not found]. Note that because the coastlines differ in details
it is not guaranteed that a point will remain inside [or outside] when
a different resolution is selected.
resolution
Copy link
Member Author

Choose a reason for hiding this comment

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

Copied from https://docs.generic-mapping-tools.org/dev/gmtselect.html#d, but the +f modifier is not mentioned.

the coastlines differ in details a node in a mask file using one
resolution is not guaranteed to remain inside [or outside] when a
different resolution is selected.
resolution
Copy link
Member Author

Choose a reason for hiding this comment

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

Copied from https://docs.generic-mapping-tools.org/dev/grdlandmask.html#d, but the +f modifier is not mentioned.

**f**\|\ **h**\|\ **i**\|\ **l**\|\ **c**.
Select the resolution of the data set to: (**f**\ )ull, (**h**\ )igh,
(**i**\ )ntermediate, (**l**\ )ow, and (**c**\ )rude.
resolution
Copy link
Member Author

Choose a reason for hiding this comment

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

Copied from https://docs.generic-mapping-tools.org/dev/coast.html#d, but the +f modifier is not mentioned at all, since it's rarely used. It may not work as documented since in recent GMT versions, GMT can automatically download GSHHG and DCW datasets from the GMT data server.

@seisman
Copy link
Member Author

seisman commented Oct 30, 2024

Ping @GenericMappingTools/pygmt-maintainers for thoughts on the proposed changes towards more Pythonic arguments.

@seisman seisman self-assigned this Oct 30, 2024
@seisman
Copy link
Member Author

seisman commented Oct 30, 2024

Actually, this PR is not needed if PR #3238 is implemented.

@seisman seisman removed the needs review This PR has higher priority and needs review. label Oct 30, 2024
@seisman seisman marked this pull request as draft October 30, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving an existing feature run/benchmark Trigger the benchmark workflow in PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant