Skip to content

Commit

Permalink
add in logic to not fail when no HRRR weather model is available
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquelynsmale committed Jan 8, 2025
1 parent c79109a commit a246470
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/RAiDER/cli/raider.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,16 @@ def calcDelaysGUNW(iargs: Optional[list[str]] = None) -> Optional[xr.Dataset]:

if (
args.file is not None and
args.weather_model == 'HRRR' and
[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):
raise NoWeatherModelData('The required HRRR data for time-grid interpolation is not available')
if args.weather_model == 'AUTO':
print('No HRRR weather model available for AOI. Nothing to do!')
return
else:
raise NoWeatherModelData('The required HRRR data for time-grid interpolation is not available')

if args.file is None:
if args.bucket is None or args.bucket_prefix is None:
Expand Down

0 comments on commit a246470

Please sign in to comment.