UCL / pyCascadia

Implementation of GEBCO cookbook remove-restore and other cleaning of topography/bathymetry. Uses `pyGMT`.
Mozilla Public License 2.0
9 stars 0 forks source link

`close_boundary.py` fails with TypeError #35

Closed alessandrofelder closed 3 years ago

alessandrofelder commented 3 years ago
 python3 close_boundary.py --input gdal_translate_OK08.nc --output gdal_contour_OK08.shp

gives the following error:

Loading gdal_translate_OK08.nc
Resolution: (1251, 924)
Traceback (most recent call last):
  File "close_boundary.py", line 38, in <module>
    main()
  File "close_boundary.py", line 30, in main
    replace_land_with_zeros(input_grid[0,:])
TypeError: tuple indices must be integers or slices, not tuple

This was first reported in #28 , but is unrelated to the installation or the environment setup, so moved here for clarity. The bug is a consequence of changing the API of the load_source output, that we forgot to change in this file.