Problem running example 1

Have installed gmt from Synaptic package manager and am trying the first example.

But getting

hagbard@fuckup:~/05chaos/geosw/stg1$ ./gmt-ex1.sh

	GMT - The Generic Mapping Tools, Version 5.4.3 (r19528) [64-bit] [8 cores]
(c) 1991-2018 Paul Wessel, Walter H. F. Smith, Remko Scharroo, Joaquim Luis, and Florian Wobbe

Supported in part by the US National Science Foundation (http://www.nsf.gov/)
and volunteers from around the world (see http://gmt.soest.hawaii.edu/).

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program under the terms of the
GNU Lesser General Public License (http://www.gnu.org/licenses/lgpl.html).
For more information about legal matters, see the file named LICENSE.TXT.

usage: gmt [options]
       gmt <module name> [<module-options>]

Session management:
  gmt clear history | conf | cache | all
                    Deletes gmt.history, gmt.conf, the user cache dir, or all of them

options:
  --help            List descriptions of available GMT modules.
  --show-bindir     Show directory with GMT executables.
  --show-cores      Print number of available cores.
  --show-datadir    Show directory/ies with user data.
  --show-modules    List all module names.
  --show-library    Show path of the shared GMT library.
  --show-plugindir  Show directory for plug-ins.
  --show-sharedir   Show directory for shared GMT resources.
  --version         Print GMT version number.

if <module-options> is '=' we call exit (0) if module exist and non-zero otherwise.

ERROR: No module named begin was found.  This could mean one of three cases:
  1. There actually is no such module; please check your spelling.
  2. Module exists in the GMT supplemental library, but the library could not be found.
  3. Module exists in a GMT custom library, but none was specified via GMT_CUSTOM_LIBS.
Shared libraries must be in standard system paths or set via environmental parameter LD_LIBRARY_PATH.


	GMT - The Generic Mapping Tools, Version 5.4.3 (r19528) [64-bit] [8 cores]
(c) 1991-2018 Paul Wessel, Walter H. F. Smith, Remko Scharroo, Joaquim Luis, and Florian Wobbe

Supported in part by the US National Science Foundation (http://www.nsf.gov/)
and volunteers from around the world (see http://gmt.soest.hawaii.edu/).

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program under the terms of the
GNU Lesser General Public License (http://www.gnu.org/licenses/lgpl.html).
For more information about legal matters, see the file named LICENSE.TXT.

usage: gmt [options]
       gmt <module name> [<module-options>]

Session management:
  gmt clear history | conf | cache | all
                    Deletes gmt.history, gmt.conf, the user cache dir, or all of them

options:
  --help            List descriptions of available GMT modules.
  --show-bindir     Show directory with GMT executables.
  --show-cores      Print number of available cores.
  --show-datadir    Show directory/ies with user data.
  --show-modules    List all module names.
  --show-library    Show path of the shared GMT library.
  --show-plugindir  Show directory for plug-ins.
  --show-sharedir   Show directory for shared GMT resources.
  --version         Print GMT version number.

if <module-options> is '=' we call exit (0) if module exist and non-zero otherwise.

ERROR: No module named subplot was found.  This could mean one of three cases:
  1. There actually is no such module; please check your spelling.
  2. Module exists in the GMT supplemental library, but the library could not be found.
  3. Module exists in a GMT custom library, but none was specified via GMT_CUSTOM_LIBS.
Shared libraries must be in standard system paths or set via environmental parameter LD_LIBRARY_PATH.


	GMT - The Generic Mapping Tools, Version 5.4.3 (r19528) [64-bit] [8 cores]
(c) 1991-2018 Paul Wessel, Walter H. F. Smith, Remko Scharroo, Joaquim Luis, and Florian Wobbe

Supported in part by the US National Science Foundation (http://www.nsf.gov/)
and volunteers from around the world (see http://gmt.soest.hawaii.edu/).

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program under the terms of the
GNU Lesser General Public License (http://www.gnu.org/licenses/lgpl.html).
For more information about legal matters, see the file named LICENSE.TXT.

usage: gmt [options]
       gmt <module name> [<module-options>]

Session management:
  gmt clear history | conf | cache | all
                    Deletes gmt.history, gmt.conf, the user cache dir, or all of them

options:
  --help            List descriptions of available GMT modules.
  --show-bindir     Show directory with GMT executables.
  --show-cores      Print number of available cores.
  --show-datadir    Show directory/ies with user data.
  --show-modules    List all module names.
  --show-library    Show path of the shared GMT library.
  --show-plugindir  Show directory for plug-ins.
  --show-sharedir   Show directory for shared GMT resources.
  --version         Print GMT version number.

if <module-options> is '=' we call exit (0) if module exist and non-zero otherwise.

ERROR: No module named coast was found.  This could mean one of three cases:
  1. There actually is no such module; please check your spelling.
  2. Module exists in the GMT supplemental library, but the library could not be found.
  3. Module exists in a GMT custom library, but none was specified via GMT_CUSTOM_LIBS.
Shared libraries must be in standard system paths or set via environmental parameter LD_LIBRARY_PATH.

grdcontour: Syntax error: Must specify a map projection with the -J option
grdcontour: Syntax error: Must specify a map projection with the -J option

	GMT - The Generic Mapping Tools, Version 5.4.3 (r19528) [64-bit] [8 cores]
(c) 1991-2018 Paul Wessel, Walter H. F. Smith, Remko Scharroo, Joaquim Luis, and Florian Wobbe

Supported in part by the US National Science Foundation (http://www.nsf.gov/)
and volunteers from around the world (see http://gmt.soest.hawaii.edu/).

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program under the terms of the
GNU Lesser General Public License (http://www.gnu.org/licenses/lgpl.html).
For more information about legal matters, see the file named LICENSE.TXT.

usage: gmt [options]
       gmt <module name> [<module-options>]

Session management:
  gmt clear history | conf | cache | all
                    Deletes gmt.history, gmt.conf, the user cache dir, or all of them

options:
  --help            List descriptions of available GMT modules.
  --show-bindir     Show directory with GMT executables.
  --show-cores      Print number of available cores.
  --show-datadir    Show directory/ies with user data.
  --show-modules    List all module names.
  --show-library    Show path of the shared GMT library.
  --show-plugindir  Show directory for plug-ins.
  --show-sharedir   Show directory for shared GMT resources.
  --version         Print GMT version number.

if <module-options> is '=' we call exit (0) if module exist and non-zero otherwise.

ERROR: No module named coast was found.  This could mean one of three cases:
  1. There actually is no such module; please check your spelling.
  2. Module exists in the GMT supplemental library, but the library could not be found.
  3. Module exists in a GMT custom library, but none was specified via GMT_CUSTOM_LIBS.
Shared libraries must be in standard system paths or set via environmental parameter LD_LIBRARY_PATH.

grdcontour: Syntax error: Must specify a map projection with the -J option
grdcontour: Syntax error: Must specify a map projection with the -J option

	GMT - The Generic Mapping Tools, Version 5.4.3 (r19528) [64-bit] [8 cores]
(c) 1991-2018 Paul Wessel, Walter H. F. Smith, Remko Scharroo, Joaquim Luis, and Florian Wobbe

Supported in part by the US National Science Foundation (http://www.nsf.gov/)
and volunteers from around the world (see http://gmt.soest.hawaii.edu/).

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program under the terms of the
GNU Lesser General Public License (http://www.gnu.org/licenses/lgpl.html).
For more information about legal matters, see the file named LICENSE.TXT.

usage: gmt [options]
       gmt <module name> [<module-options>]

Session management:
  gmt clear history | conf | cache | all
                    Deletes gmt.history, gmt.conf, the user cache dir, or all of them

options:
  --help            List descriptions of available GMT modules.
  --show-bindir     Show directory with GMT executables.
  --show-cores      Print number of available cores.
  --show-datadir    Show directory/ies with user data.
  --show-modules    List all module names.
  --show-library    Show path of the shared GMT library.
  --show-plugindir  Show directory for plug-ins.
  --show-sharedir   Show directory for shared GMT resources.
  --version         Print GMT version number.

if <module-options> is '=' we call exit (0) if module exist and non-zero otherwise.

ERROR: No module named subplot was found.  This could mean one of three cases:
  1. There actually is no such module; please check your spelling.
  2. Module exists in the GMT supplemental library, but the library could not be found.
  3. Module exists in a GMT custom library, but none was specified via GMT_CUSTOM_LIBS.
Shared libraries must be in standard system paths or set via environmental parameter LD_LIBRARY_PATH.


	GMT - The Generic Mapping Tools, Version 5.4.3 (r19528) [64-bit] [8 cores]
(c) 1991-2018 Paul Wessel, Walter H. F. Smith, Remko Scharroo, Joaquim Luis, and Florian Wobbe

Supported in part by the US National Science Foundation (http://www.nsf.gov/)
and volunteers from around the world (see http://gmt.soest.hawaii.edu/).

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program under the terms of the
GNU Lesser General Public License (http://www.gnu.org/licenses/lgpl.html).
For more information about legal matters, see the file named LICENSE.TXT.

usage: gmt [options]
       gmt <module name> [<module-options>]

Session management:
  gmt clear history | conf | cache | all
                    Deletes gmt.history, gmt.conf, the user cache dir, or all of them

options:
  --help            List descriptions of available GMT modules.
  --show-bindir     Show directory with GMT executables.
  --show-cores      Print number of available cores.
  --show-datadir    Show directory/ies with user data.
  --show-modules    List all module names.
  --show-library    Show path of the shared GMT library.
  --show-plugindir  Show directory for plug-ins.
  --show-sharedir   Show directory for shared GMT resources.
  --version         Print GMT version number.

if <module-options> is '=' we call exit (0) if module exist and non-zero otherwise.

ERROR: No module named end was found.  This could mean one of three cases:
  1. There actually is no such module; please check your spelling.
  2. Module exists in the GMT supplemental library, but the library could not be found.
  3. Module exists in a GMT custom library, but none was specified via GMT_CUSTOM_LIBS.
Shared libraries must be in standard system paths or set via environmental parameter LD_LIBRARY_PATH.

hagbard@fuckup:~/05chaos/geosw/stg1$

What GMT version do you have? It seems you have 5.4.3 and you are running and script with modern syntax which is only available since version 6.

I see, that makes sense then. It is what I was getting from my package manager. Shall get the newer version, install it, and see how that goes.

Built the latest release and ran some examples successfully.

Have exported some environment variables, but unsure of the path to the netcdf installation.
Have installed netcdf through Synaptic Package Manager.

This is what I have got

   GMTHOME=/usr/local/bin/gmt
   PATH="$PATH:$GMTHOME/bin"
   NETCDFHOME=/usr/lib
   NETCDF_PREFIX=$NETCDFHOME
   MANPATH="$MANPATH:$GMTHOME/man"

   export GMTHOME
   export PATH
   export NETCDFHOME
   export MANPATH

Although tho path to the netcdf is incorrect

In previous installations one did set path to netcdf as listed next

   NETCDFHOME=/usr/lib
   NETCDF_PREFIX=$NETCDFHOME

But reading the BUILDING.md file, it mentions only the path to gmt.

export PATH=${PATH}:/path/to/gmt/bin

For the netcdf installation I have the following paths

/.
/usr
/usr/bin
/usr/bin/nc-config
/usr/include
/usr/include/netcdf.h
/usr/include/netcdf_mem.h
/usr/include/netcdf_meta.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/cmake
/usr/lib/x86_64-linux-gnu/cmake/netCDF
/usr/lib/x86_64-linux-gnu/cmake/netCDF/netCDFConfig.cmake
/usr/lib/x86_64-linux-gnu/cmake/netCDF/netCDFConfigVersion.cmake
/usr/lib/x86_64-linux-gnu/cmake/netCDF/netCDFTargets-none.cmake
/usr/lib/x86_64-linux-gnu/cmake/netCDF/netCDFTargets.cmake
/usr/lib/x86_64-linux-gnu/libnetcdf.settings
/usr/lib/x86_64-linux-gnu/libnetcdf.so
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/netcdf.pc
/usr/share
/usr/share/doc
/usr/share/doc/libnetcdf-dev
/usr/share/doc/libnetcdf-dev/changelog.Debian.gz
/usr/share/doc/libnetcdf-dev/copyright
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/nc-config.1.gz
/usr/share/man/man3
/usr/share/man/man3/netcdf.3.gz

Although I do not see why the gmt developers are bothering users with finding the netcdf path to export.

What operating system do you have?

I am using Ubuntu 20.04 LTS. Are there examples using GSHHG 2.3.7 and DCW 2.0.0 ?

Ok. The same as me.

You could try:

gmt coast -R-30/30/-40/40 -Jm0.1i -B5 -I1/1p,blue -N1/0.25p,- -I2/0.25p,blue -W0.25p,white -Sblue -png africa -ENA+gred

There should be examples for testing the installation using GSHHG and DCW. There does not seem to be such a distinction in the examples.

I got the plot. Thank you.

1 Like

In the gallery there are lot of examples for testing the installation. Those datasets are used by the module coast. You can check for examples in the docs.

Yes, but I am unsure which ones are testing GSHHG, and which DCW, and which other things. As regards netcdf, does one still have to specify the netcdf paths using environment variables?

You can red these links: