aria-tools / ARIA-tools

Tools for exploiting ARIA standard products
Apache License 2.0
99 stars 36 forks source link

[BUG] #449

Closed rzinke closed 2 weeks ago

rzinke commented 1 month ago

Describe the bug ariaTSsetup.py errors out when the 'all' argument is passed to layers. This is caused by ariaTSsetup.py attempting to extract the 'lookAngle' and 'bPerpendicluar' layers, which are not part of the ARIA_STACK_OUTFILES, causing an Exception to be raised.

Instead of erroring out, ariaTSsetup.py should raise a warning and continue processing the other "stack" products.

To Reproduce Steps to reproduce the behavior:

  1. Download
    ariaDownload.py -t 71 -b '37.5 39.5 -118.5 -114.5' -s 20200515 -e 20200601 --version 3 -o download
  2. Command used
    ariaTSsetup.py -f "products/*.nc" -d download -l all
  3. Error Output
    2024-10-21 13:36:56,635 - ariaTSsetup.py - INFO - setStack stack generated
    Traceback (most recent call last):
    File "/opt/miniconda3/envs/insarXX/bin/ariaTSsetup.py", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
    File "/Users/rzinke/Tools/ARIA-tools/tools/bin/ariaTSsetup.py", line 671, in <module>
    main()
    File "/Users/rzinke/Tools/ARIA-tools/tools/bin/ariaTSsetup.py", line 665, in main
    raise Exception(f'Selected {layer} not supported in tsSetup' + msg)
    Exception: Selected lookAngle not supported in tsSetupAvailable layers are: dict_keys(['unwrappedPhase', 'gacos_corrections', 'coherence', 'connectedComponents', 'bParallel', 'amplitude', 'troposphereHydrostatic', 'troposphereWet', 'troposphereTotal', 'ionosphere', 'solidEarthTide', 'ERA5', 'GMAO', 'HRES', 'HRRR', 'GACOS'])

Expected behavior Skip the non-stack product and process the rest. Prefer to raise LOGGER.warning and continue.

rzinke commented 1 month ago

Suggested fix in PR https://github.com/aria-tools/ARIA-tools/pull/451

mgovorcin commented 2 weeks ago

resolved in PR #451