-
Notifications
You must be signed in to change notification settings - Fork 361
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 grdcut -E extract a vertical slice from a 3-D cube #7961
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you have a 3D cube it is nice to get a vertical slice grid out for some given x or y value. grdinterpolate -R does this by point and via grdtrack so it is slow. If n_layers are equidistantly spaced then it is simple to extract a grid.
PaulWessel
added
the
new core module feature
PR that implements a new core module feature
label
Oct 20, 2023
PaulWessel
changed the title
WIP Let crd cut -E extract a vertical slice from a 3-D cube
WIP Let grdcut -E extract a vertical slice from a 3-D cube
Oct 20, 2023
joa-quim
approved these changes
Oct 20, 2023
Summary of changed imagesThis is an auto-generated report of images that have changed on the DVC remote
Image diff(s)Report last updated at commit 22de03c |
PaulWessel
changed the title
WIP Let grdcut -E extract a vertical slice from a 3-D cube
Let grdcut -E extract a vertical slice from a 3-D cube
Oct 22, 2023
Added working test and polished docs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
add-changelog
Add PR to the changelog
new core module feature
PR that implements a new core module feature
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.
grdcut -Ex|ycoord lets users extract a vertical slice grid that is either parallel to the x or y direction and goes through the specified coordinate. For example,
gmt grdcut my cube.nc -Gslice.nc -Ey33
will cut along the row corresponding to y = 33. For grdcut we require the cube be equidistant in the 3rd dimension, and that coord is a node coordinate so there is no resampling here, just picking the nodes along that slice. Once tested I will add this to grdinterpolate where, if -T is set and coord does not necessarily fall on a node,. we will resample by providing the coordinates for the output grid.