Could not find file [GSHHG high resolution shorelines]

Hi there

I have been using GMT to plot some nice maps of Iran (-R43/64/25/40.5) with GNSS and other velocities using pscoast.

I tried to shrink the region and so zoom in on one area (-R49/56/27/34) but when I did this I got the error:

coast [ERROR]: 2. GSHHG: Did not find /usr/share/gshhg-gmt-nc4/binned_GSHHS_h.cdf nor the older *.cdf version
coast [WARNING]: 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/.
coast [ERROR]: Could not find file [GSHHG high resolution shorelines]
coast [ERROR]: 2. GSHHG: Did not find /usr/share/gshhg-gmt-nc4/binned_border_h.cdf nor the older *.cdf version
coast [ERROR]: Could not find file [GSHHG high resolution political boundaries]
coast [ERROR]: No GSHHG databases available - must abort

However when the region was larger I did not get these errors.
How do I install the necessary packages/data to get around this problem?

Everything else in the plot is exactly the same.

Thanks,
Jessica

Odd. Could you tell us what GMT version and operating system you have, please?

I am using GMT 6.1.0 on RHEL 8

Not sure what’s causing the issue with the gshhg files that you have, but you could try downloading the latest release of gshhg from https://github.com/GenericMappingTools/gshhg-gmt/releases and using gmt set DIR_GSHHG <path-to-files> to specify the location of the unzipped files.

1 Like

Thanks for this! In my /usr/share/gshhg-gmt-nc4/ I only had:

binned_border_c.nc binned_border_i.nc binned_border_l.nc binned_GSHHS_c.nc binned_GSHHS_i.nc binned_GSHHS_l.nc binned_river_c.nc binned_river_i.nc binned_river_l.nc

and none of the *h.nc or *f.nc files.

I copied the unzipped *h.nc and *f.nc files from https://github.com/GenericMappingTools/gshhg-gmt/releases to my /usr/share/gshhg-gmt-nc4/ directory and I no longer have the coast error!

Thanks so much