Skip to content

Commit

Permalink
No longer extract ancillary layers by default through ariaTSsetup (#418)
Browse files Browse the repository at this point in the history
* No longer extract ancillary layers by default through ariaTSsetup

* Adjust tropo layer logic to handle NISAR GUNW

* Update tssetup test runner for changes to default layers

---------

Co-authored-by: Alex Fore <[email protected]>
  • Loading branch information
sssangha and alexfore authored May 29, 2024
1 parent ee3efec commit 267c844
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
3 changes: 2 additions & 1 deletion tests/regression/run_tssetup_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def run_subproc(exec_string, message, raise_exception=False):

exec_string = (
'ariaTSsetup.py -f "golden_test_inputs/tssetup/products/*.nc" '
'-tm HRRR -d golden_test_inputs/tssetup/DEM/glo_90.dem '
'-l "solidEarthTide,ionosphere,troposphereTotal" -tm HRRR '
'-d golden_test_inputs/tssetup/DEM/glo_90.dem '
'-w test_outputs/tssetup/')
if not args.old:
exec_string += ' --log-level %s' % args.log_level
Expand Down
15 changes: 2 additions & 13 deletions tools/ARIAtools/util/vrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ def layerCheck(
layers = list(layers.split(','))
layers = [i.replace(' ', '') for i in layers]
if 'troposphereTotal' in layers and \
set(RAIDER_TROPO_LAYERS).issubset(all_valid_layers):
set(RAIDER_TROPO_LAYERS).issubset(all_valid_layers) and \
(model_names != [] or is_nisar_file):
tropo_total = True

# differentiate between extract and TS pipeline
Expand Down Expand Up @@ -466,8 +467,6 @@ def layerCheck(
# TS pipeline
TS_LAYERS_DUP = ['unwrappedPhase', 'coherence', 'incidenceAngle',
'lookAngle', 'azimuthAngle', 'bPerpendicular']

ts_defaults = ['ionosphere', 'solidEarthTide']
if extract_or_ts == 'tssetup':
if layers:
# remove layers already generated in default TS workflow
Expand All @@ -476,16 +475,6 @@ def layerCheck(
else:
layers = []

# add additional layers for default workflow
ts_defaults = list(
set.intersection(*map(set, [ts_defaults, all_valid_layers])))

if ts_defaults != []:
tropo_total = True
for i in ts_defaults:
if i not in layers:
layers.append(i)

# pass intersection of valid layers and track invalid requests
layer_reject = list(
set.symmetric_difference(*map(set, [all_valid_layers, layers])))
Expand Down

0 comments on commit 267c844

Please sign in to comment.