Closed Sistjerne 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.
What happens if you add region=regionr
to the following line?
fig.grdimage(grid=back_img, projection=projX, cmap=True, nan_transparent=True, shading=False, transparency=30)
The code never reaches this line. It fails in the line fig.coast(region=regionX, projection=projS, resolution="f", water=True)
What about changing regionX
to regionr
in fig.coast(region=regionX, projection=projS, resolution="f", water=True)
?
Now I get to another issue (I have experienced after updating my conda environment). I get Segmentation fault (core dumped)
when running
fig.grdimage(
grid="@earth_relief_03m",
projection=projS,
region=regionX,
cmap="grayC",
shading=True,
)
It helps if I change grid="@earth_relief_03m"
to grid="@earth_relief_06m"
but I do not experience this in my old conda environment on the same server.
The next issue arises when I want to plot the line
fig.grdimage(grid=back_img, projection=projX, cmap=True, nan_transparent=True, shading=False, transparency=30)
I get the same error: grdimage [ERROR]: Map region exceeds 360 degrees
. back_img
is the Arctic DEM given in NSIDC Sea Ice Polar Stereographic projection. Do I need to do some reprojection before hand?
Good to see someone using my old code :smile: You'll need to use regionr
for that fig.grdimage(grid="@earth_relief_03m", ...
call. Also, can you provide the output of gmt grdinfo <path_to_arcticdem.tif>
, or gdalinfo <path_to_arcticdem.tif>
? Or the link to the Arctic DEM file you downloaded? This will help us to determine the projection parameters you'll need for plotting back_img
. I managed to plot @earth_relief_03m
without crashing on my computer, but cannot reproduce the ArcticDEM part. This is as far as I got:
By the way, the IGPP Earth Relief grids (https://www.generic-mapping-tools.org/remote-datasets/earth-relief.html) based on SRTM15+V2.5.5 actually uses ArcticDEM R7 above 60°N (see https://doi.org/10.1029/2019EA000658), but I'm guessing you're trying to plot a higher resolution version?
Thanks for helping out!
Just for your information, I can run the code above in this setup:
PyGMT information:
version: v0.8.0
System information:
python: 3.9.15 | packaged by conda-forge | (main, Nov 22 2022, 08:45:29) [GCC 10.4.0]
executable: /g5/procdata/skr/anaconda3/envs/s3mpc/bin/python
machine: Linux-3.10.0-1062.7.1.el7.x86_64-x86_64-with-glibc2.17
Dependency information:
numpy: 1.23.1
pandas: 1.4.3
xarray: 2022.6.0
netCDF4: 1.6.0
packaging: 21.3
geopandas: 0.11.1
ghostscript: 9.54.0
GMT library information:
cores: 56
grid layout: rows
library path: /nfs/g5/procdata/skr/anaconda3/envs/s3mpc/lib/libgmt.so
padding: 2
plugin dir: /nfs/g5/procdata/skr/anaconda3/envs/s3mpc/lib/gmt/plugins
share dir: /g5/procdata/skr/anaconda3/envs/s3mpc/share/gmt
version: 6.3.0
and get this output:
The Arctic DEM I am using can be downloaded here: https://www.dropbox.com/scl/fi/1l3il1wvczofm0fgdpw10/arcticdem_mosaic_1km_v3.0_GL.tif?rlkey=gahc2sqauyoyqdmmrqhqiftee&dl=0
I may be able to use the Earh relief grid for this particular plot, but I would like to make this type of plot with different projections for other cases.
I'm going to close this issue since it's more likely a question rather than a bug report. If you'd like to ask for more support about this question, please post it to the forum https://forum.generic-mapping-tools.org/.
Dear PyGMT support,
I get an error in an old code after a coda update.
The example is heavily inspired by: https://nbviewer.org/github/weiji14/nzasc2021/blob/main/key_figure.ipynb#Figure-of-Antarctic-active-subglacial-lake-map and the code is here:
System information:
In the old installation, I got the following Warning:
This makes sense, but has there been a change to GMT/PyGMT? Do I need to adjust the code, or is it an installation issue?