Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datasets.load_earth_relief() keyword parse error #652

Closed
uliw opened this issue Oct 16, 2020 · 3 comments
Closed

datasets.load_earth_relief() keyword parse error #652

uliw opened this issue Oct 16, 2020 · 3 comments
Labels
question Further information is requested

Comments

@uliw
Copy link

uliw commented Oct 16, 2020

Description of the problem

this will work

import pygmt as gmt
grid =  gmt.datasets.load_earth_relief()

this will not

import pygmt as gmt
grid =  gmt.datasets.load_earth_relief(resolution='01d')

Full error message

GMTInvalidInput                           Traceback (most recent call last)
<ipython-input-12-49d650faeb3c> in <module>
      2 import pandas as pf
      3 
----> 4 grid =  gmt.datasets.load_earth_relief(resolution='01d')
      5 grid.registration
      6 grid.gmt.type

~/anaconda3/envs/mygmt/lib/python3.8/site-packages/pygmt/datasets/earth_relief.py in load_earth_relief(resolution)
     35 
     36     """
---> 37     _is_valid_resolution(resolution)
     38     fname = which("@earth_relief_{}".format(resolution), download="u")
     39     grid = xr.open_dataarray(fname)

~/anaconda3/envs/mygmt/lib/python3.8/site-packages/pygmt/datasets/earth_relief.py in _is_valid_resolution(resolution)
     85     valid_resolutions.extend(["{:02d}s".format(res) for res in [30, 15]])
     86     if resolution not in valid_resolutions:
---> 87         raise GMTInvalidInput(
     88             "Invalid Earth relief resolution '{}'.".format(resolution)
     89         )

GMTInvalidInput: Invalid Earth relief resolution '01d'.


System information

Please paste the output of python -c "import pygmt; pygmt.show_versions()":

{'date': '2020-05-22T15:04:09+1200',
 'dirty': False,
 'error': None,
 'full-revisionid': '809a888755c5dedc86ea74d0ae0497295b5311a4',
 'version': 'v0.1.1'}
@welcome
Copy link

welcome bot commented Oct 16, 2020

👋 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
Copy link
Member

seisman commented Oct 16, 2020

The latest PyGMT release is v0.2.0. Please upgrade your PyGMT to the latest version.

@seisman seisman added the question Further information is requested label Oct 16, 2020
@uliw
Copy link
Author

uliw commented Oct 16, 2020 via email

@seisman seisman closed this as completed Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants