Skip to content

Commit

Permalink
remove changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquelynsmale committed Jan 10, 2025
1 parent 60677d3 commit 01f0786
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
21 changes: 9 additions & 12 deletions tools/RAiDER/cli/raider.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,17 +592,18 @@ def calcDelaysGUNW(iargs: Optional[list[str]] = None) -> Optional[xr.Dataset]:
print('Nothing to do!')
return

if args.weather_model == 'AUTO':
args.weather_model = determine_weather_model(gunw_id)
print('Selected weather model args.weather_model for scene gunw')

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

if args.file is None:
Expand All @@ -619,7 +620,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' or args.weather_model == 'AUTO') and args.interpolate_time == 'azimuth_time_grid':
if args.weather_model == 'HRRR' 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,14 +664,10 @@ 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
try:
cube_filenames = calcDelays([str(path_cfg)])
except:
if args.weather_model == 'AUTO':
print('WARNING: error acquiring HRRR model. Nothing to do!')
return

cube_filenames = calcDelays([str(path_cfg)])
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
2 changes: 0 additions & 2 deletions tools/RAiDER/cli/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ def parse_weather_model(weather_model_name: str, aoi: AOI) -> WeatherModel:
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 01f0786

Please sign in to comment.