grdfill fails, probably in situation where holes extend to the edge of the grid domain

Ouverte
#7,736 6 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@PaulWessel y travaille déjà.

Depuis le 18/8/2023.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

bug

I have found that grdfill is failing, running into a segmentation fault. I am running gmt 6.4.0 on MacOS. It fails when trying to do certain operations on a grid which has lots of nans running up against the edge of the grid. It fails when using -L and -Ac but not -An. (I have not tried other options)

Command that creates failure: (the file D20191226.nc can be found here: https://drive.google.com/file/d/1rDbvuEidaeIdsuik0O7kSReNcsjzoVt2/view?usp=sharing)

gmt grdfill D20191226.nc -Ac -GD20191226_HOLESFILLED.nc -Vd

Full error message

gmt [DEBUG]: GMT_Create_Session: Terminal width = 122
gmt [DEBUG]: Obtained the ppid from parent: 36863
gmt [DEBUG]: Enter: gmtinit_new_GMT_ctrl
gmt [DEBUG]: GMT->session.SHAREDIR = /Users/mlees/.conda/envs/general_science/share/gmt
gmt [DEBUG]: GMT->session.HOMEDIR = /Users/mlees
gmt [DEBUG]: GMT->session.USERDIR = /Users/mlees/.gmt [created]
gmt [DEBUG]: GMT->session.CACHEDIR = /Users/mlees/.gmt/cache [created]
gmt [DEBUG]: GMT: 0. Will try to find subdir=postscriptlight stem = PSL_custom_fonts suffix=.txt
gmt [DEBUG]: GMT: 1. gmt_getsharepath trying current dir
gmt [DEBUG]: GMT: 2. gmt_getsharepath trying USERDIR /Users/mlees/.gmt
gmt [DEBUG]: GMT: 3. gmt_getsharepath trying USERDIR subdir /Users/mlees/.gmt/postscriptlight
gmt [DEBUG]: GMT: 4. gmt_getsharepath trying SHAREDIR subdir /Users/mlees/.conda/envs/general_science/share/gmt/postscriptlight
gmt [DEBUG]: GMT: 5. gmt_getsharepath trying SHAREDIR /Users/mlees/.conda/envs/general_science/share/gmt
gmt [DEBUG]: GMT: 6. gmt_getsharepath failed
gmt [DEBUG]: Map distance calculation will be Cartesian
gmt [DEBUG]: Exit: gmtinit_new_GMT_ctrl
gmt [DEBUG]: Enter: New_PSL_Ctrl
gmt [DEBUG]: Exit: New_PSL_Ctrl
gmt [DEBUG]: Enter: gmt_manage_workflow
gmt [DEBUG]: Exit : gmt_manage_workflow
gmt [DEBUG]: Enter: PSL_beginsession
gmt [DEBUG]: Exit : PSL_beginsession
gmt [DEBUG]: Enter: PSL_setdefaults
gmt [DEBUG]: Exit : PSL_setdefaults
gmt [DEBUG]: Enter: gmtlib_io_init
gmt [DEBUG]: Exit : gmtlib_io_init
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit: gmt_hash_init
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit: gmt_hash_init
gmt [DEBUG]: Enter: gmt_reload_settings
gmt [DEBUG]: The PROJ_GEODESIC set to Vincenty
gmt [DEBUG]: Look for file /Users/mlees/gmt.conf
gmt [DEBUG]: Look for file /Users/mlees/.gmt/gmt.conf
gmt [DEBUG]: Look for file /Users/mlees/.gmt/server/gmt.conf
gmt [DEBUG]: Look for file /Users/mlees/.gmt/cache/gmt.conf
gmt [DEBUG]: Could not find file gmt.conf
gmt [DEBUG]: Exit: gmt_reload_settings
gmt [DEBUG]: Enter: gmtlib_plot_C_format
gmt [DEBUG]: Exit: gmtlib_plot_C_format
gmt [DEBUG]: Enter: gmtinit_get_history
gmt [DEBUG]: Enter: gmt_hash_init
gmt [DEBUG]: Exit: gmt_hash_init
gmt [DEBUG]: Exit: gmtinit_get_history
gmt [DEBUG]: Initialize FFTW with 8 threads.
gmt [DEBUG]: GMT_Create_Session initialized GMT structure
gmt [DEBUG]: Loading core GMT shared library: libgmt.dylib
gmt [DEBUG]: Shared Library # 0 (core). Path = libgmt.dylib
gmt [DEBUG]: Loading GMT plugins from: /Users/mlees/.conda/envs/general_science/lib/gmt/plugins
gmt [DEBUG]: Shared Library # 1 (supplements). Path = /Users/mlees/.conda/envs/general_science/lib/gmt/plugins/supplements.so
gmt [DEBUG]: Revised options: D20191226.nc -Ac0.0 -GD20191226_HOLESFILLED.nc -Vd
grdfill [DEBUG]: Found readable file D20191226.nc
grdfill [DEBUG]: Replace file D20191226.nc with path D20191226.nc
grdfill [DEBUG]: Replace file D20191226.nc with D20191226.nc
grdfill [DEBUG]: Found readable file D20191226.nc
grdfill [DEBUG]: Replace file D20191226.nc with path D20191226.nc
grdfill [DEBUG]: Found readable file D20191226.nc
grdfill [DEBUG]: Replace file D20191226.nc with path D20191226.nc
grdfill [DEBUG]: Found readable file D20191226.nc
grdfill [DEBUG]: Object ID 0 : Registered Grid File D20191226.nc as an Input resource with geometry Surface [n_objects = 1]
grdfill [DEBUG]: gmtapi_begin_io: Input resource access is now enabled [container]
grdfill [DEBUG]: gmtapi_import_grid: Passed ID = 0 and mode = 1
grdfill [DEBUG]: Found readable file D20191226.nc
grdfill [DEBUG]: Calling nc_open on D20191226.nc, ncid = 65536, err = 0
grdfill [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdfill [DEBUG]: Calling nc_open on D20191226.nc, ncid = 65536, err = 0
grdfill [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdfill [DEBUG]: Call gmtgrdio_doctor_geo_increments on a geographic grid
grdfill [DEBUG]: Geographic input grid, longitudes span less than 360
grdfill [DEBUG]: GMT_End_IO: Input resource access is now disabled
grdfill [DEBUG]: gmtapi_begin_io: Input resource access is now enabled [container]
grdfill [DEBUG]: gmtapi_import_grid: Passed ID = 0 and mode = 2
grdfill [INFORMATION]: Reading grid from file D20191226.nc
grdfill [DEBUG]: Calling nc_open on D20191226.nc, ncid = 65536, err = 0
grdfill [DEBUG]: packed z-range: [-0.179119,0.0716667]
grdfill [DEBUG]: Calling nc_close on ncid 65536, err = 0
grdfill [DEBUG]: Geographic input grid, longitudes span less than 360
grdfill [DEBUG]: Chosen boundary condition for all edges: geographic
grdfill [INFORMATION]: gmt_grd_BC_set: Set boundary condition for all edges: natural
grdfill [INFORMATION]: gmt_grd_BC_set: Set boundary condition for left edge: natural
grdfill [INFORMATION]: gmt_grd_BC_set: Set boundary condition for right edge: natural
grdfill [INFORMATION]: gmt_grd_BC_set: Set boundary condition for bottom edge: natural
grdfill [INFORMATION]: gmt_grd_BC_set: Set boundary condition for top edge: natural
grdfill [DEBUG]: GMT_End_IO: Input resource access is now disabled
Segmentation fault: 11

Langage dominant
C
Étoiles
997
Forks
420
Merge moyen
13 h 27 min
PR mergées (30 j)
47

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de GenericMappingTools/gmt

Toutes les issues de GenericMappingTools/gmt

Issues similaires

Plus d'issues C

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.