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

grdimage turns all black when region changes #395

Closed
tjcrone opened this issue Feb 12, 2020 · 2 comments
Closed

grdimage turns all black when region changes #395

tjcrone opened this issue Feb 12, 2020 · 2 comments

Comments

@tjcrone
Copy link

tjcrone commented Feb 12, 2020

I am using grdimage to plot data from a high-resolution NetCDF file. With smaller regions, the grid image shows just fine. With larger region sizes, the image turns completely black. Example here: https://github.com/ooicloud/axial-drilling/blob/master/maps/notebooks/grdimage_black.ipynb. Any thoughts on what could be going on? Suggestions on best ways to troubleshoot? Thank you!

@tjcrone
Copy link
Author

tjcrone commented Feb 12, 2020

I think I figured it out. Changing the region may lead to the incorporation of a bad data point, so we get this in the debug output: grdimage [INFORMATION]: Auto-stretching CPT file turbo to fit data range -1621.96 to inf. I should be able to fix this by either fixing the data file, or changing the range of the CPT.

@tjcrone
Copy link
Author

tjcrone commented Feb 12, 2020

Looks like the grid I have set masked areas to inf rather than NaN. I fixed the grid with:

$ gmt grdclip axial_auv_mbari09and11s_gcs_1m_v3.grd -Gaxial_auv_mbari09and11s_gcs_1m_v3_nan.grd -Srinf/NaN

@tjcrone tjcrone closed this as completed Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant