Do not let the API object for the assembled grid live on#3771
Merged
PaulWessel merged 1 commit intomasterfrom Jul 29, 2020
Merged
Do not let the API object for the assembled grid live on#3771PaulWessel merged 1 commit intomasterfrom
PaulWessel merged 1 commit intomasterfrom
Conversation
GMT_Read_Data assigns a new object number to what is read, but for tiles it calls gmt_assemble_grid which also creates an object to pass to grdblend. However, once we get it back from grdblend we only want to keep the grid and discard the container since GMT_Read_Data already has a container for it.
joa-quim
approved these changes
Jul 29, 2020
Contributor
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-6.1 6.1
# Navigate to the new working tree
cd .worktrees/backport-6.1
# Create a new branch
git switch --create backport-3771-to-6.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 46ff22613bbbc181bb4bf5b9ad4ebc928c1bab5f
# Push it to GitHub
git push --set-upstream origin backport-3771-to-6.1
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-6.1Then, create a pull request where the |
Member
Author
|
Pinging @seisman |
Member
|
OK, will see what happened later. |
Member
|
So there is a conflict in src/gmt_internal.h ++<<<<<<< HEAD
++=======
+ EXTERN_MSC int gmtlib_delete_virtualfile (void *API, const char *string);
+ EXTERN_MSC bool gmtlib_file_lock (struct GMT_CTRL *GMT, int fd);
+ EXTERN_MSC bool gmtlib_file_unlock (struct GMT_CTRL *GMT, int fd);
++>>>>>>> 46ff22613b... Do not let the API object for the assembled grid live one (#3771)These two functions were added in PR #3735, but not backported to 6.1 branch. So they shouldn't be added to 6.1. |
seisman
pushed a commit
that referenced
this pull request
Jul 30, 2020
GMT_Read_Data assigns a new object number to what is read, but for tiles it calls gmt_assemble_grid which also creates an object to pass to grdblend. However, once we get it back from grdblend we only want to keep the grid and discard the container since GMT_Read_Data already has a container for it.
Member
Author
|
yes, correct. |
seisman
added a commit
that referenced
this pull request
Jul 30, 2020
) GMT_Read_Data assigns a new object number to what is read, but for tiles it calls gmt_assemble_grid which also creates an object to pass to grdblend. However, once we get it back from grdblend we only want to keep the grid and discard the container since GMT_Read_Data already has a container for it. Co-authored-by: Paul Wessel <pwessel@hawaii.edu>
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.
GMT_Read_Data assigns a new object number to what is read, but if input file is a set of tiles it calls gmt_assemble_grid which also creates an object to pass from grdblend. However, once we get it back from grdblend we only want to keep the grid and discard the container since GMT_Read_Data already has a container for it.
gmtmex('grdcut @earth_relief_01m -R-37.0/-35.0/-2.3/-1.0')
works when built with this PR.