Skip to content

Commit

Permalink
support running only damage assessments in R2D simulations
Browse files Browse the repository at this point in the history
R2D does not explicitly specifies the desired outputs for regional
simulations. With this updated, we remove the request for loss results
when the auto-pop script does not specify loss simulations.
  • Loading branch information
zsarnoczay committed Dec 3, 2024
1 parent 6ca00fd commit 6fb0d38
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pelicun/tools/DL_calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,10 @@ def _parse_config_file( # noqa: C901
regional_out_config['Settings']
)

# if no loss simulation is requested, remove the corresponding outputs
if is_unspecified(config_ap, 'DL/Losses'):
update(config_ap, 'DL/Outputs/Loss', {})

# save the extended config to a file
config_ap_path = Path(config_path.stem + '_ap.json').resolve()

Expand Down

0 comments on commit 6fb0d38

Please sign in to comment.