Skip to content

Commit a8328df

Browse files
sssanghamgovorcinSimran S Sanghayunjunzrzinke
authored
prep_aria: support for ARIA product v3 correction layers (#1247)
* added loading of correction layers * Add support for updated epoch stacks * Mask out 0s * updating correction func to be consistent w others * Adjust sign error and handle multiple tropo files * Update cli examples in prep_aria * Reuse write_ifgram_stack and iono_split_spectrum to reduce maintainance burden * add ARIA-tools example * change 'write_model_stack' to 'write_timeseries' and correct indentations * fix pre-commit hooks * Update prep_aria.py * remove unused variable * remove unused arguments and comments --------- Co-authored-by: mgovorcin <[email protected]> Co-authored-by: Simran S Sangha <[email protected]> Co-authored-by: Zhang Yunjun <[email protected]> Co-authored-by: rzinke <[email protected]> Co-authored-by: ehavazli <[email protected]>
1 parent bfe8dd9 commit a8328df

File tree

2 files changed

+290
-80
lines changed

2 files changed

+290
-80
lines changed

src/mintpy/cli/prep_aria.py

+21-6
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@
4949
prep_aria.py -t SanFranSenDT42.txt
5050
prep_aria.py -s ../stack/ -d ../DEM/SRTM_3arcsec.dem -i '../incidenceAngle/*.vrt'
5151
prep_aria.py -s ../stack/ -d ../DEM/SRTM_3arcsec.dem -i '../incidenceAngle/*.vrt' -a '../azimuthAngle/*.vrt' -w ../mask/watermask.msk
52+
prep_aria.py -s ../stack/ -d ../DEM/SRTM_3arcsec.dem -i '../incidenceAngle/*.vrt' --set '../stack/setStack.vrt' --tropo '../stack/troposphereTotal/HRRR_stack.vrt' --iono '../stack/ionStack.vrt'
5253
5354
# download / extract / prepare inteferograms stack from ARIA using ARIA-tools:
54-
# reference: https://github.com/aria-tools/ARIA-tools
55-
ariaDownload.py -b '37.25 38.1 -122.6 -121.75' --track 42
56-
ariaTSsetup.py -f 'products/*.nc' -b '37.25 38.1 -122.6 -121.75' --mask Download --num_threads 4 --verbose
55+
ariaDownload.py --track 71 --bbox "34.21 34.31 -118.60 -118.43" --start 20240101 --end 20240301
56+
ariaTSsetup.py -f "products/*.nc" --bbox "34.21 34.31 -118.60 -118.43" --mask Download --num_threads 4 --layers "solidEarthTide, troposphereTotal, ionosphere" --tropo_models HRRR
57+
prep_aria.py -s stack -d DEM/glo_90.dem -i incidenceAngle/*.vrt -a azimuthAngle/*.vrt -w mask/esa_world_cover_2021.msk --set stack/setStack.vrt --tropo stack/troposphereTotal/HRRRStack.vrt --iono stack/ionoStack.vrt
5758
"""
5859

5960
def create_parser(subparsers=None):
@@ -106,6 +107,16 @@ def create_parser(subparsers=None):
106107
help='Name of the azimuth angle file.')
107108
geom.add_argument('-w','--water-mask', dest='waterMaskFile', type=str,
108109
help='Name of the water mask file')
110+
111+
# correction layers: troposphereTotal, ionosphere, solidEarthTides
112+
corr = parser.add_argument_group('corrections')
113+
corr.add_argument('-ct', '--tropo', dest='tropoFile', type=str,
114+
help='Name of the Troposhere Delay stack file', default=None)
115+
corr.add_argument('-ci', '--iono', dest='ionoFile', type=str,
116+
help='Name of the Ionosphere Delay stack file', default=None)
117+
corr.add_argument('-cs', '--set', dest='setFile', type=str,
118+
help='Name of the Solid Earth Tides stack file', default=None)
119+
109120
return parser
110121

111122

@@ -146,10 +157,14 @@ def cmd_line_parse(iargs = None):
146157
# search for wildcard pattern
147158
fnames = glob.glob(iDict[key]) if iDict[key] else []
148159

149-
# user the first element if more than one exist
160+
# return the first element if more than one exist
161+
# except for tropo, for which multiple inputs could be passed
150162
if len(fnames) > 0:
151-
iDict[key] = fnames[0]
152-
print('{k:<{w}} : {f}'.format(k=key, w=max_digit, f=fnames[0]))
163+
if 'tropo' not in key:
164+
iDict[key] = fnames[0]
165+
else:
166+
iDict[key] = fnames
167+
print('{k:<{w}} : {f}'.format(k=key, w=max_digit, f=iDict[key]))
153168

154169
elif key in required_ds_keys:
155170
# raise exception if any required DS is missing

0 commit comments

Comments
 (0)