Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prep_aria: support for ARIA product v3 correction layers #1247

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions src/mintpy/cli/prep_aria.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@
prep_aria.py -t SanFranSenDT42.txt
prep_aria.py -s ../stack/ -d ../DEM/SRTM_3arcsec.dem -i '../incidenceAngle/*.vrt'
prep_aria.py -s ../stack/ -d ../DEM/SRTM_3arcsec.dem -i '../incidenceAngle/*.vrt' -a '../azimuthAngle/*.vrt' -w ../mask/watermask.msk
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'

# download / extract / prepare inteferograms stack from ARIA using ARIA-tools:
# reference: https://github.com/aria-tools/ARIA-tools
ariaDownload.py -b '37.25 38.1 -122.6 -121.75' --track 42
ariaTSsetup.py -f 'products/*.nc' -b '37.25 38.1 -122.6 -121.75' --mask Download --num_threads 4 --verbose
ariaDownload.py --track 71 --bbox "34.21 34.31 -118.60 -118.43" --start 20240101 --end 20240301
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
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
"""

def create_parser(subparsers=None):
Expand Down Expand Up @@ -106,6 +107,16 @@ def create_parser(subparsers=None):
help='Name of the azimuth angle file.')
geom.add_argument('-w','--water-mask', dest='waterMaskFile', type=str,
help='Name of the water mask file')

# correction layers: troposphereTotal, ionosphere, solidEarthTides
corr = parser.add_argument_group('corrections')
corr.add_argument('-ct', '--tropo', dest='tropoFile', type=str,
help='Name of the Troposhere Delay stack file', default=None)
corr.add_argument('-ci', '--iono', dest='ionoFile', type=str,
help='Name of the Ionosphere Delay stack file', default=None)
corr.add_argument('-cs', '--set', dest='setFile', type=str,
help='Name of the Solid Earth Tides stack file', default=None)

return parser


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

# user the first element if more than one exist
# return the first element if more than one exist
# except for tropo, for which multiple inputs could be passed
if len(fnames) > 0:
iDict[key] = fnames[0]
print('{k:<{w}} : {f}'.format(k=key, w=max_digit, f=fnames[0]))
if 'tropo' not in key:
iDict[key] = fnames[0]
else:
iDict[key] = fnames
print('{k:<{w}} : {f}'.format(k=key, w=max_digit, f=iDict[key]))

elif key in required_ds_keys:
# raise exception if any required DS is missing
Expand Down
Loading
Loading