Let grdcut -E extract a vertical slice from a 3-D cube#7961
Merged
PaulWessel merged 16 commits intomasterfrom Oct 22, 2023
Merged
Let grdcut -E extract a vertical slice from a 3-D cube#7961PaulWessel merged 16 commits intomasterfrom
PaulWessel merged 16 commits intomasterfrom
Conversation
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.
joa-quim
approved these changes
Oct 20, 2023
Contributor
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 |
Member
Author
|
Added working test and polished docs. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 -Ey33will 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.