Skip to content
Merged
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
5 changes: 3 additions & 2 deletions src/potential/grdseamount.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#define THIS_MODULE_MODERN_NAME "grdseamount"
#define THIS_MODULE_LIB "potential"
#define THIS_MODULE_PURPOSE "Create synthetic seamounts (Gaussian, parabolic, polynomial, cone or disc; circular or elliptical)"
#define THIS_MODULE_KEYS "<T{,GG},LD),MD),TD("
#define THIS_MODULE_KEYS "<D{,GG},KG(,WG(,LD),MD),TD("
#define THIS_MODULE_NEEDS "R"
#define THIS_MODULE_OPTIONS "-:RVbdefhir"

Expand Down Expand Up @@ -1219,7 +1219,7 @@ struct SEAMOUNT *grdseamount_read_input (struct GMTAPI_CTRL *API, struct GRDSEAM
}
n_time = 0; /* Number of numerical columns used for time for current record */
S[n].code = Ctrl->C.code; /* Set default code if given */
if (In->text[0]) { /* May have passed time information and/or code via trailing text */
if (In->text && In->text[0]) { /* May have passed time information and/or code via trailing text */
int ns = sscanf (In->text, "%s %s %s", txt_x, txt_y, m); /* Only consider first three words */
if (Ctrl->T.active) { /* -T requires times t0, t1 */
if (ns == 1) { /* Possibly only shape code was given as trailing text */
Expand Down Expand Up @@ -1981,6 +1981,7 @@ EXTERN_MSC int GMT_grdseamount (void *V_API, int mode, void *args) {
if (GMT_Set_Comment (API, GMT_IS_GRID, GMT_COMMENT_IS_OPTION | GMT_COMMENT_IS_COMMAND, options, Grid))
goto wrap_up;
gmt_M_memcpy (data, Grid->data, Grid->header->size, gmt_grdfloat); /* This will go away once gmt_nc.c is fixed to leave array alone */
if (API->GMT->current.io.col_type[GMT_X][0] == GMT_IS_LON) Grid->header->ProjRefPROJ4 = strdup("+proj=longlat");
if (GMT_Write_Data (API, GMT_IS_GRID, GMT_IS_FILE, GMT_IS_SURFACE, GMT_CONTAINER_AND_DATA, NULL, gfile, Grid) != GMT_NOERROR)
goto wrap_up;
gmt_M_memcpy (Grid->data, data, Grid->header->size, gmt_grdfloat);
Expand Down
Loading