aria-tools / ARIA-tools

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

[BUG] Mixing v2 and v3 GUNW products fails #419

Closed EJFielding closed 6 months ago

EJFielding commented 6 months ago

Describe the bug It seems that the ariaTSsetup.py program cannot handle a product list with a mixture of v2 and v3 S1 GUNW products

To Reproduce Steps to reproduce the behavior:

  1. Download
  2. ariaDownload.py --num_threads 16 -b '33.4 34.5 -119.0 -117.4' -s 20190101 -e 20211231 -t 64 no version specified
    2024-05-22 18:46:40,233 - ariaDownload.py - INFO - Download complete. Wrote -- 4181 -- products to: /scratch/nisar-st-calval-solidearth/ARIA_S1/Secular/LA_A64_3years/fielding/20240522/v1/products
  3. Command used ariaTSsetup.py -f "/scratch/nisar-st-calval-solidearth/ARIA_S1/Secular/LA_A64_3years/fielding/20240522/v1/products/*.nc" -b '33.6 34.3 -118.5 -117.5' -mo 5800 --mask Download --verbose
  4. Error Output
    Traceback (most recent call last):
    File "/home/jovyan/.local/envs/solid_earth_atbd/bin/ariaTSsetup.py", line 632, in <module>
    main()
    File "/home/jovyan/.local/envs/solid_earth_atbd/bin/ariaTSsetup.py", line 410, in main
    standardproduct_info = ARIAtools.product.Product(
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/jovyan/.local/envs/solid_earth_atbd/lib/python3.11/site-packages/ARIAtools/product.py", line 420, in __init__
    self.__run__()
    File "/home/jovyan/.local/envs/solid_earth_atbd/lib/python3.11/site-packages/ARIAtools/product.py", line 1247, in __run__
    self.products = self.__continuous_time__()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/jovyan/.local/envs/solid_earth_atbd/lib/python3.11/site-packages/ARIAtools/product.py", line 1009, in __continuous_time__
    vers.append(ver_num)
                ^^^^^^^
    UnboundLocalError: cannot access local variable 'ver_num' where it is not associated with a value

Expected behavior If ariaTSsetup cannot work with both v2 and v3 products, it should give a warning message and stop quickly, instead of running for several hours and then giving an error. For the LA area, the v2 products are difficult to select because there are both v2_0_2 and v2_0_5 products, and I did not see a way to provide a list of versions for ariaDownload or ariaTSsetup.

Desktop (please complete the following information):

Additional context Running in NISAR Science Team On-Demand System

sssangha commented 6 months ago

@EJFielding , this bug had been resolved and pushed to dev a few days back. Once we merge two other unrelated, pending changes, I'll work to issue a formal release though so these changes are reflected on conda. Thanks!

dbekaert commented 6 months ago

Closed as fixed on dev