Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pygmt.Figure.grdcontour kills kernel after running for a long time #1927

Closed
saeedmohanna opened this issue May 22, 2022 · 7 comments
Closed
Labels
bug Something isn't working upstream Bug or missing feature of upstream core GMT
Milestone

Comments

@saeedmohanna
Copy link

saeedmohanna commented May 22, 2022

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:
Screen Shot 2022-05-22 at 12 40 00 AM

With grdcontour:
Screen Shot 2022-05-22 at 12 41 41 AM

@welcome
Copy link

welcome bot commented May 22, 2022

👋 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 saeedmohanna changed the title pygmt.Figure.grdcontour kills kernel/runs out of memory when being run pygmt.Figure.grdcontour kills kernel after running for a long time May 22, 2022
@seisman
Copy link
Member

seisman commented May 22, 2022

@saeedmohanna Can you share with us the "src_inversion_5.nc" file, so that we can try to reproduce the issue?

@saeedmohanna
Copy link
Author

@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

@seisman
Copy link
Member

seisman commented May 22, 2022

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

@PaulWessel
Copy link
Member

I will have a look on the flight. It is probably a non-COARDS-compliant grid of some sort.

@seisman seisman added the upstream Bug or missing feature of upstream core GMT label May 23, 2022
@seisman
Copy link
Member

seisman commented May 24, 2022

@saeedmohanna FYI, the upstream bug is being tracked in GenericMappingTools/gmt#6738

@seisman
Copy link
Member

seisman commented Mar 15, 2024

I believe the upstream bug has been fixed in GenericMappingTools/gmt#6738, and the command at #1927 (comment) now works for me using the GMT dev version. Closing the issue.

@seisman seisman closed this as completed Mar 15, 2024
@seisman seisman added this to the 0.12.0 milestone Mar 15, 2024
@seisman seisman added the bug Something isn't working label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Bug or missing feature of upstream core GMT
Projects
None yet
Development

No branches or pull requests

3 participants