ASFHyP3 / hyp3-gamma

HyP3 plugin for generating SAR products with GAMMA
BSD 3-Clause "New" or "Revised" License
28 stars 7 forks source link

INSAR_GAMMA jobs near the south pole fail due to missing water mask tiles #553

Open asjohnston-asf opened 4 months ago

asjohnston-asf commented 4 months ago

INSAR_GAMMA jobs in the far south fail when attempting to build a water mask due to missing S80 tiles.

For an example, see https://hyp3-api.asf.alaska.edu/jobs/dfd67697-0f44-46b7-b1d4-16d40ee77409 :

ERROR 11: HTTP response code: 404
Warning 1: Can't open /vsicurl/https://asf-dem-west.s3.amazonaws.com/WATER_MASK/TILES/s80w165.tif. Skipping it
ERROR 11: HTTP response code: 404
Warning 1: Can't open /vsicurl/https://asf-dem-west.s3.amazonaws.com/WATER_MASK/TILES/s80w155.tif. Skipping it
0...10...20...30...40...50...60...70...80...90...100 - done.
Traceback (most recent call last):
  File "/usr/local/bin/hyp3_gamma", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/hyp3_gamma/__main__.py", line 38, in main
    process_entry_point.load()()
  File "/usr/local/lib/python3.10/dist-packages/hyp3_gamma/__main__.py", line 185, in insar
    product_name = insar_sentinel_gamma(
  File "/usr/local/lib/python3.10/dist-packages/hyp3_gamma/insar/ifm_sentinel.py", line 427, in insar_sentinel_gamma
    coords, ref_point_info = unwrapping_geocoding(reference, secondary, step="man", rlooks=rlooks, alooks=alooks,
  File "/usr/local/lib/python3.10/dist-packages/hyp3_gamma/insar/unwrapping_geocoding.py", line 253, in unwrapping_geocoding
    get_water_mask(f"{ifgname}.adf.cc", width, lt, demw, demn, dempar)
  File "/usr/local/lib/python3.10/dist-packages/hyp3_gamma/insar/unwrapping_geocoding.py", line 150, in get_water_mask
    create_water_mask(f'{temp_dir}/tmpgtiff_mask_geo.tif', 'water_mask.tif')
  File "/usr/local/lib/python3.10/dist-packages/hyp3_gamma/water_mask.py", line 136, in create_water_mask
    subprocess.run(build_vrt_command, check=True)
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['gdalbuildvrt', 'merged.vrt', '/vsicurl/https://asf-dem-west.s3.amazonaws.com/WATER_MASK/TILES/s80w165.tif', '/vsicurl/https://asf-dem-west.s3.amazonaws.com/WATER_MASK/TILES/s80w155.tif']' returned non-zero exit status 1.

I've confirmed https://asf-dem-west.s3.amazonaws.com/WATER_MASK/TILES/s80w165.tif and https://asf-dem-west.s3.amazonaws.com/WATER_MASK/TILES/s80w155.tif both return "The specified key does not exist." as indicated in the error message.