GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
747 stars 216 forks source link

pygmt-session [ERROR]: GMT_COMPATIBILITY: Expects values from 6 to 6; reset to 6. #365

Closed MarkWieczorek closed 4 years ago

MarkWieczorek commented 4 years ago

GMT version = 6.0.0 (macOS installed via brew)

pygmt complains about the GMT_COMPATIBILITY parameter. By default, this is set to 4, but pygmt expects 6. Setting GMT_COMPATIBILITY = 6 in my root gmt.conf file removes this warning, but setting this parameter to 6 should rather be done locally by pygmt itself.

In [3]: fig = pygmt.Figure()
pygmt-session [ERROR]: GMT_COMPATIBILITY: Expects values from 6 to 6; reset to 6.
welcome[bot] commented 4 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.

seisman commented 4 years ago

Any reason you want to have a "gmt.conf" file in you home directory? The simplest way is to remove the "root" gmt.conf.

MarkWieczorek commented 4 years ago

Historically, gmt has always had a default configuration file, which as of version 6 should be located in .gmt. I note that gmt v6 does not itself create a default configuration file for you, but the documentation tells you how to do this, and I presume that everyone will in fact do this. This default configuration is most often used to set high level defaults, such as the paper size (which differs between the US and Europe), as well as the preferred measurement units (SI or english).

It doesn't appear to be a good idea to ask the user to delete the default gmt configuration file just to suppress pygmt warnings.

seisman commented 4 years ago

This issue has been fixed in upstream GMT codes in https://github.com/GenericMappingTools/gmt/pull/1981.

weiji14 commented 4 years ago

This issue has been fixed in upstream GMT codes in GenericMappingTools/gmt#1981.

Closing this issue as it should be resolved. If anyone else has this problem, let us know and we can reopen it if necessary.