GMT_AUTO_DOWNLOAD off results in [ERROR]: Remote download is currently deactivated

Querying a remote data server is usually inappropriate so we do this:

GMT_AUTO_DOWNLOAD off

Thereafter, even this:

gmt grdinfo test.grd

raises this error:

grdinfo [ERROR]: Remote download is currently deactivated

which breaks scripts that don’t catch it.

Also, thinking about how often user scripts must be needlessly querying data servers, wouldn’t it be much better if
GMT_AUTO_DOWNLOAD was off by default?

I think there are two fixes needed here.

Mac. 6.1.1

My problems are related to the following issue; as if the fixes were not complete.

which look like they were subsequently resolved here.

Yet it still exists in 6.1.1.

Perhaps the problem become evident to me because:

GMT_DATA_SERVER = https://oceania.generic-mapping-tools.org

was not always available

It seems I can choose between ~30 second delays while processes wait to download 2 template files (that they generally don’t need) or I switch GMT_AUTO_DOWNLOAD off which leaves me dealing with every subsequent GMT process writing a message to stderr.

If GMT_AUTO_DOWNLOAD is off, there should be no error to report.

I’m adding a bit more detail here. Unless I am missing something, this seems important. I see it at Centos installs too. Where GMT_AUTO_DOWNLOAD is off (surely it should mostly be off) there should be no error in this context and sending a message to stdout would cause other problems. There should not be a message at all.

[robd@moomin MRFGRD]$ gmt --version
6.1.1
[robd@moomin MRFGRD]$ gmt grdinfo stempmax.102.grd -Cn > /dev/null
grdinfo [ERROR]: Remote download is currently deactivated
grdinfo [ERROR]: Remote download is currently deactivated

I totally agree that this is not an ERROR message and not sure why it was labeled as such. I will deescalate that to INFORMATION so it is only printed if -Vi is used.
Most people using our remote data will want to have it on so the default will remain on.

Looks like copy/paste mistake. That message shall only be a error message if you actually access a remote file but remote download is off. The other place it is is used shall only be for information since it is just checking to see if it is time to refresh the server listings. PR submitted: https://github.com/GenericMappingTools/gmt/pull/4362