Pygmt.datasets.load_earth_relief

when i user pygmt.load_earth_relief() get grid data,all data has been downloaded,but the code didn’t run,stop in the function pygmt.datasets.load_earth_relief() ,i want to kown how to resolve this problem?



line 137 not run!

Hello @xiaojingdounaodan,

Welcome to the GMT forum :slightly_smiling_face:!

Can you please provide a complete example showing your issue and also post the warning and error messages.

Please also avoid posting screenshots. Just copy & past your code and any error or warning messages. You can format your script as code by placing three backticks in the line before and after the block with the script:

```
your script formatted as code
```
fig=pygmt.Figure()
        region = "74/-2/151/55+r"
        projection = "L110/30/10/40/16c"        
        grid = pygmt.datasets.load_earth_relief(
            "03s"
            region="74/151/-2/55"
            registration="gridline",
            use_srtm=True,
        )
         # calculate the reflection of a light source projecting from west to east#(azimuth of 270 degrees)and at a latitude of 30 degrees from the horizondgrid = pygmt.grdgradient(grid=grid, radiance=[270,30])fig.grdimage(grid=grid,projection=projection,region=region,
        fig.grdimage(
            grid=grid,
            projection=projection,
            region=region,
            frame=['WSrt+t"test"',"xa","ya"],
            cmap="dem1",
        )

Your region is so large 74/151/-2/55. Using a high-resolution data like 03s means that GMT will download several GB of data files and then merge them into one single grid. It definitely takes a lot of time.

thank you very much. I’v changed the resolution, the program is ok now.