@@ -18,6 +18,12 @@ def _ensure_dir_exists(ctx, param, value):
1818
1919
2020@click .command (name = 'Dynamic Flood Simulation' )
21+ @click .option (
22+ '--initial-conditions-id' , '-i' ,
23+ type = click .Choice (['001' , '002' , '003' ]),
24+ default = '001' ,
25+ help = 'Initialization for real-world emissions scenarios to represent future climate conditions' ,
26+ )
2127@click .option (
2228 '--time-period' , '-t' ,
2329 type = click .Choice (['2031-2050' , '2041-2060' ]),
@@ -83,6 +89,7 @@ def _ensure_dir_exists(ctx, param, value):
8389 help = 'Library to use for writing result tiff'
8490)
8591def main (
92+ initial_conditions_id : Literal ['001' , '002' , '003' ],
8693 time_period : Literal ['2031-2050' , '2041-2060' ],
8794 annual_probability : float ,
8895 hydrograph_name : Literal ['short_charles' , 'long_charles' ],
@@ -97,13 +104,14 @@ def main(
97104 logging .basicConfig (level = logging .INFO )
98105
99106 logger .info ((
100- f'Inputs: { time_period = } , { annual_probability = } , { hydrograph = } , '
107+ f'Inputs: { initial_conditions_id = } , { time_period = } , { annual_probability = } , { hydrograph = } , '
101108 f'{ pet_percentile = } , { sm_percentile = } , { gw_percentile = } , '
102109 f'{ output_path = } , { animation = } '
103110 ))
104111 start = time .perf_counter ()
105112
106113 flood = run_sim (
114+ initial_conditions_id = initial_conditions_id ,
107115 time_period = time_period ,
108116 annual_probability = annual_probability ,
109117 hydrograph_name = hydrograph_name ,
@@ -113,11 +121,18 @@ def main(
113121 gw_percentile = gw_percentile ,
114122 )
115123
116- write_multiframe_geotiff (flood , output_path , writer = tiff_writer )
124+ write_multiframe_geotiff (
125+ flood_results = flood ,
126+ output_path = output_path / 'flood_simulation.tif' ,
127+ writer = tiff_writer ,
128+ )
117129 logger .info (f'Done in { time .perf_counter () - start } seconds.' )
118130
119131 if animation :
120- animate_results (flood , output_path )
132+ animate_results (
133+ flood_results = flood ,
134+ output_path = output_path / 'animation.gif' ,
135+ )
121136
122137
123138if __name__ == '__main__' :
0 commit comments