Closed saeedmohanna closed 8 months ago
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.
@saeedmohanna Can you share with us the "src_inversion_5.nc" file, so that we can try to reproduce the issue?
@seisman Unfortunately github doesn't let me attach the file directly. Here is a google drive link: https://drive.google.com/file/d/1Ll2qYqeOM882mV3wrjuwYFSSSgSFwyDR/view?usp=sharing
Running the following GMT command, it also takes forever for me.
gmt grdcontour src_inversion_5.nc -A2 -C2 -pdf map
@PaulWessel Is this an upstream bug or is there something wrong with the grid.
I see something weird like:
gmt [INFORMATION]: No range attribute, guessing registration to be pixel
gmt [INFORMATION]: netCDF grid src_inversion_5.nc has no default CPT.
gmt [INFORMATION]: netCDF grid src_inversion_5.nc information has zmin = zmax = NaN. Reset to 0/0.
gmt [INFORMATION]: Cartesian input grid
I will have a look on the flight. It is probably a non-COARDS-compliant grid of some sort.
@saeedmohanna FYI, the upstream bug is being tracked in https://github.com/GenericMappingTools/gmt/issues/6738
I believe the upstream bug has been fixed in https://github.com/GenericMappingTools/gmt/issues/6738, and the command at https://github.com/GenericMappingTools/pygmt/issues/1927#issuecomment-1133914464 now works for me using the GMT dev version. Closing the issue.
I am reading in a 722x480 array and trying to plot it with pygmt.Figure.grdcontour. The code runs for a long time before killing the kernel. I don't think this is a memory issue because I was able to plot a 360x240 array with grdcontour instantly. Is it stuck in some loop somewhere in the source code?
Please see attached. One shows the code outputting the desired result without contours (blocked out by white rectangle ) and the other shows the case with grdcontour being used.
Any help on this issue would be appreciated.
Without grdcontour:
With grdcontour: