Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/grdinterpolate.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,12 @@ EXTERN_MSC int GMT_grdinterpolate (void *V_API, int mode, void *args) {
}
else if (C[GMT_IN] == NULL) { /* Read the cube */
gmt_M_free (GMT, level); /* Free this one now since it will be re-read by GMT_Read_Data */
if ((C[GMT_IN] = GMT_Read_Data (API, GMT_IS_CUBE, GMT_IS_FILE, GMT_IS_VOLUME, GMT_CONTAINER_AND_DATA, wesn, Ctrl->In.file[0], NULL)) == NULL)
Return (GMT_DATA_READ_ERROR);
if (cube_layer[0]) /* Restore the requested variable name that was chopped off earlier */
sprintf(file, "%s?%s", Ctrl->In.file[0], cube_layer);
else
strncpy(file, Ctrl->In.file[0], PATH_MAX-1);
if ((C[GMT_IN] = GMT_Read_Data(API, GMT_IS_CUBE, GMT_IS_FILE, GMT_IS_VOLUME, GMT_CONTAINER_AND_DATA, wesn, file, NULL)) == NULL)
Return(GMT_DATA_READ_ERROR);
}

if (convert_to_cube) { /* Just want to build cube from input stack */
Expand Down
Loading