Closed phloose closed 5 years 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.
Please check if the following command works:
gmt coast -JC47/-19/8i -RMG+R2 -Bafg -Ggray -W1 -pdf map
Results in the same error:
$ gmt coast -JC47/-19/8i -RMG+R2 -Bafg -Ggray -W1 -pdf map
pscoast [ERROR]: Unable to find or open the Digital Chart of the World for GMT
pscoast [ERROR]: Perhaps you did not install this file in DIR_DCW, the shared dir, or the user dir?
pscoast [ERROR]: Use your package manager to install package dcw-gmt.
pscoast [ERROR]: Alternatively, get the latest dcw-gmt-<version>.tar.gz or dcw-gmt-<version>.zip from the ftp://ftp.soest.hawaii.edu/gmt.
pscoast [ERROR]: Internal Error = GMT_MAP_BAD_LAT_MIN
pscoast [ERROR]: Internal Error = i
pscoast (GMT_pscoast): South is outside -90 to +90 degree range
Please run it again with an extra -Vd
option and paste the full debug logs.
gmt coast -JC47/-19/8i -RMG+R2 -Bafg -Ggray -W1 -Vd -pdf map
Here you go:
$ gmt coast -JC47/-19/8i -RMG+R2 -Bafg -Ggray -W1 -Vd -pdf map
gmt [DEBUG]: Obtained the ppid from parent: 5491
gmt [DEBUG]: Enter: gmtinit_new_GMT_ctrl
gmt [DEBUG]: GMT->session.SHAREDIR = /usr/local/share/gmt
gmt [DEBUG]: GMT->session.HOMEDIR = /home/mo3klo4r
gmt [DEBUG]: GMT->session.USERDIR = /home/mo3klo4r/.gmt [created]
gmt [DEBUG]: GMT->session.CACHEDIR = /home/mo3klo4r/.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 /home/mo3klo4r/.gmt
gmt [DEBUG]: GMT: 3. gmt_getsharepath trying USERDIR subdir /home/mo3klo4r/.gmt/postscriptlight
gmt [DEBUG]: GMT: 4. gmt_getsharepath trying SHAREDIR subdir /usr/local/share/gmt/postscriptlight
gmt [DEBUG]: GMT: 5. 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]: The PROJ_GEODESIC set to Vincenty
gmt [DEBUG]: Enter: gmt_getdefaults
gmt [DEBUG]: Look for file /home/mo3klo4r/gmt.conf
gmt [DEBUG]: Look for file /home/mo3klo4r/.gmt/gmt.conf
gmt [DEBUG]: Look for file /home/mo3klo4r/.gmt/server/gmt.conf
gmt [DEBUG]: Look for file /home/mo3klo4r/.gmt/cache/gmt.conf
gmt [DEBUG]: Could not find file gmt.conf
gmt [DEBUG]: Exit: gmt_getdefaults
gmt [DEBUG]: Enter: gmtlib_plot_C_format
gmt [DEBUG]: Exit: gmtlib_plot_C_format
gmt [DEBUG]: Enter: gmtinit_get_history
gmt [DEBUG]: GMT_Create_Session initialized GMT structure
gmt [DEBUG]: Shared Library # 0 (core). Path = libgmt.so
gmt [DEBUG]: Loading core GMT shared library: libgmt.so
gmt [DEBUG]: Loading GMT plugins from: /usr/local/lib/gmt/plugins
gmt [DEBUG]: Shared Library # 1 (supplements). Path = /usr/local/lib/gmt/plugins/supplements.so
begin [INFORMATION]: Creating a workflow directory /home/mo3klo4r/.gmt/sessions/gmt6.5491
begin [DEBUG]: The PROJ_GEODESIC set to Vincenty
begin [DEBUG]: Look for file /home/mo3klo4r/gmt.conf
begin [DEBUG]: Look for file /home/mo3klo4r/.gmt/gmt.conf
begin [DEBUG]: Look for file /home/mo3klo4r/.gmt/server/gmt.conf
begin [DEBUG]: Look for file /home/mo3klo4r/.gmt/cache/gmt.conf
begin [DEBUG]: Could not find file gmt.conf
begin [DEBUG]: Set session name to be map pdf
begin [DEBUG]: Begin Workflow. Session ID = 5491. Directory /home/mo3klo4r/.gmt/sessions/gmt6.5491 created.
begin [DEBUG]: GMT now running in modern mode [Session ID = 5491]
gmt [DEBUG]: Use PS filename /home/mo3klo4r/.gmt/sessions/gmt6.5491/gmt_0.ps-
gmt [DEBUG]: get_current_panel: No current panel selected so not in subplot mode
pscoast [DEBUG]: History: Process -JC47/-19/8i
pscoast [DEBUG]: History: Process -RMG+R2
pscoast [DEBUG]: Map distance calculation will be using great circle approximation with authalic auxiliary latitudes and authalic (R_2) radius = 6371007.1809 m, in meter.
pscoast [DEBUG]: Look for file MG+R2 in /home/mo3klo4r/.gmt
pscoast [DEBUG]: Look for file MG+R2 in /home/mo3klo4r/.gmt/cache
pscoast [DEBUG]: Look for file MG+R2 in /home/mo3klo4r/.gmt/server
pscoast [DEBUG]: Look for file MG+R2 in /home/mo3klo4r/.gmt/server/srtm1
pscoast [DEBUG]: Look for file MG+R2 in /home/mo3klo4r/.gmt/server/srtm3
pscoast [DEBUG]: GMT: 0. Will try to find subdir=dcw stem = dcw-countries suffix=.txt
pscoast [DEBUG]: GMT: 1. gmt_getsharepath trying current dir
pscoast [DEBUG]: GMT: 2. gmt_getsharepath trying USERDIR /home/mo3klo4r/.gmt
pscoast [DEBUG]: GMT: 3. gmt_getsharepath trying USERDIR subdir /home/mo3klo4r/.gmt/dcw
pscoast [DEBUG]: GMT: 4. gmt_getsharepath trying SHAREDIR subdir /usr/local/share/gmt/dcw
pscoast [DEBUG]: GMT: 5. gmt_getsharepath failed
pscoast [ERROR]: Unable to find or open the Digital Chart of the World for GMT
pscoast [ERROR]: Perhaps you did not install this file in DIR_DCW, the shared dir, or the user dir?
pscoast [ERROR]: Use your package manager to install package dcw-gmt.
pscoast [ERROR]: Alternatively, get the latest dcw-gmt-<version>.tar.gz or dcw-gmt-<version>.zip from the ftp://ftp.soest.hawaii.edu/gmt.
pscoast [DEBUG]: Map distance calculation will be using great circle approximation with authalic auxiliary latitudes and authalic (R_2) radius = 6371007.1809 m, in meter.
pscoast [ERROR]: Internal Error = GMT_MAP_BAD_LAT_MIN
pscoast [ERROR]: Internal Error = i
pscoast (GMT_pscoast): South is outside -90 to +90 degree range
pscoast (Free_Ctrl): tried to free unallocated memory
pscoast (Free_Ctrl): tried to free unallocated memory
pscoast [DEBUG]: GMT now running in modern mode [Session ID = 5491]
pscoast (gmtlib_free_tmp_arrays): tried to free unallocated memory
end [DEBUG]: End Workflow. Session ID = 5491. Directory /home/mo3klo4r/.gmt/sessions/gmt6.5491 removed.
end [DEBUG]: No figure file /home/mo3klo4r/.gmt/sessions/gmt6.5491/gmt.figures - nothing to do
end [DEBUG]: Got session name as map and default graphics formats as pdf
end [INFORMATION]: Process GMT figure queue: 1 figures found
end [INFORMATION]: Processing GMT figure #0 [map pdf ]
end [INFORMATION]: Destroying the current workflow directory /home/mo3klo4r/.gmt/sessions/gmt6.5491
end [DEBUG]: Delete gmt.conf
end [DEBUG]: Delete gmt.frame
end [DEBUG]: Delete gmt.session
end (gmtlib_free_tmp_arrays): tried to free unallocated memory
pscoast (gmtlib_free_tmp_arrays): tried to free unallocated memory
gmt [DEBUG]: Entering GMT_Destroy_Session
You can try to put all the dcw files (one .nc file and two .txt files) under the directory /home/mo3klo4r/.gmt/dcw
and see if it works.
Ok now it works, but i get a different error concering GSHHG:
pscoast [ERROR]: GSHHG version 2.2.0 or newer is needed to use coastlines with GMT.
Get and install GSHHG from ftp://ftp.soest.hawaii.edu/gshhg/.
pscoast [ERROR]: Could not find file [GSHHG high resolution shorelines]
pscoast [ERROR]: Could not find file [GSHHG high resolution political boundaries]
pscoast [ERROR]: No GSHHG databases available - must abort
But as this is not part of this issue i would consider it as solved.
Thank you very much for your fast help!!
Though i have to mention, that it is not very clear how to install or download dcw-gmt or gshhg from the build instructions, especially that i have to name a folder dcw
(whether in the .../share or .gmt folder) and not only put in there the .nc file but ALSO the two .txt files.
The reason is the same, GMT cannot find your GSHHGG data.
When building GMT, it's recommended to at least use following configurations:
set (CMAKE_INSTALL_PREFIX /opt/gmt)
set (GSHHG_ROOT /path/to/gshhg)
set (DCW_ROOT /path/to/dcw)
set (COPY_GSHHG true)
set (COPY_DCW true)
If COPY_GSHHG
and COPY_DCW
are set to TRUE
, it will automatically copy the GSHHG and DCW data to the right place (usually, GMT/share/coast and GMT/share/dcw).
Yeah i assumed that. I fixed the GSHHG issue by placing a gmt.conf into the .gmt folder which points to the gshhg directory.
The thing is, that it is not mentioned that DCW or GSHHG is necessarily needed to run GMT successfully on the build instructions page. Only that i have to place the path to it in the respective settings in the cmake file. For my feeling it should be mentioned in a small sentence that one needs DCW and GSHHG before building to not have a hassle afterwards and a link where to get them.
I used gmt some time ago but on windows, where everything was bundled together, so no need to build it from source.
Thanks again for your help!
Hi @xibalba01 those datasets are the kind of dependency that isn't "required" but you can't really do much without them. But they are listed as requirements in the building instructions: https://github.com/GenericMappingTools/gmt/blob/master/BUILDING.md#build-and-runtime-dependencies
Thanks for giving this a try! Did you manage to get everything working?
@leouieda yes i got it up and running! I looked up the link you provided and maybe i just skimmed to fast over that dependency list on the first try and overlooked GSHHG and DCW... I mean it is mentioned that one needs that support data, but not why, i.e. that no single plot out of the box is working :)
I also stumbled over the respective path settings in the configuration step and was confused about that settings so i left it out. Maybe a reminder that the support data is really needed and a link to the dependency list (or a download link) would help here. Just a suggestion from a lazy reader :)
I mean it is mentioned that one needs that support data, but not why, i.e. that no single plot out of the box is working :)
Yeah, that is a good point. We're hoping that once GMT 6 is actually released we can let the conda package do all the dependency management. Closing this for now, OK?
Description of the problem
When trying to plot the projections from the examples folder inside a jupyter notebook after compiling GMT from source i am not able to generate a single plot. It always shows the error that the Digital Chart of the World for GMT file is not found. Initially i wasn't aware that dcw-gmt.nc file was maybe needed and i didn't point the cmake file to any location. Then i downloaded it from here and tried to add it to ~/.gmt and to usr/local/share but without success. I tried to recompile with the specific setting in the cmake file but also without success. What am i doing wrong? Do i need an environment variable pointing to that location like this error from the gmt julia wrapper, even though he is running gmt on windows? I tried to set an environment variable
GMT_SHAREDIR
but this also didn't work.Full code that generated the error
cassini.py
fromexamples/projections
Full error message
System information
conda list
below:output of conda list