Skip to content

Commit

Permalink
push progress while ASF search is done
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquelynsmale committed Jan 10, 2025
1 parent f39668b commit 60677d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions tools/RAiDER/cli/raider.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ def calcDelaysGUNW(iargs: Optional[list[str]] = None) -> Optional[xr.Dataset]:
raise ValueError(
'GUNW product file could not be found at' f's3://{args.bucket}/{args.input_bucket_prefix}'
)
if args.weather_model == 'HRRR' and args.interpolate_time == 'azimuth_time_grid':
if (args.weather_model == 'HRRR' or args.weather_model == 'AUTO') and args.interpolate_time == 'azimuth_time_grid':
gunw_id = args.file.name.replace('.nc', '')
if not RAiDER.aria.prepFromGUNW.check_hrrr_dataset_availablity_for_s1_azimuth_time_interpolation(gunw_id):
print(
Expand Down Expand Up @@ -663,10 +663,14 @@ def calcDelaysGUNW(iargs: Optional[list[str]] = None) -> Optional[xr.Dataset]:

# write delay cube (nc) to disk using config
# return a list with the path to cube for each date
cube_filenames = calcDelays([str(path_cfg)])
try:
cube_filenames = calcDelays([str(path_cfg)])
except:
if args.weather_model == 'AUTO':
print('WARNING: error acquiring HRRR model. Nothing to do!')
return

assert len(cube_filenames) == 2, 'Incorrect number of delay files written.'

# calculate the interferometric phase and write it out
ds = RAiDER.aria.calcGUNW.tropo_gunw_slc(
cube_filenames,
Expand Down
4 changes: 2 additions & 2 deletions tools/RAiDER/cli/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@

def parse_weather_model(weather_model_name: str, aoi: AOI) -> WeatherModel:
weather_model_name = weather_model_name.upper().replace('-', '')
if weather_model_name == 'AUTO':
weather_model_name = 'HRRR'
try:
_, Model = get_wm_by_name(weather_model_name)
except ModuleNotFoundError:
if weather_model_name == 'AUTO':
_, Model = get_wm_by_name('HRRR')
raise NotImplementedError(
f'Model {weather_model_name} is not yet fully implemented, please contribute!'
)
Expand Down

0 comments on commit 60677d3

Please sign in to comment.