Return underlying recession rate

master
Dan Howe 3 years ago
parent af56cbe031
commit 2005b1785f

@ -277,16 +277,20 @@ def get_ongoing_recession(n_runs, start_year, end_year, sea_level_rise,
# Calculate total underlying recession # Calculate total underlying recession
year_factor = np.arange(1, n_years + 1)[:, np.newaxis] year_factor = np.arange(1, n_years + 1)[:, np.newaxis]
underlying_recession = underlying_recession_rate * year_factor underlying_recession = underlying_recession_rate * year_factor
underlying_recession_rate = np.tile(underlying_recession_rate,
[n_years, 1])
# Remove probabilistic component from start year # Remove probabilistic component from start year
slr[0, :] = slr[0, :].mean() slr[0, :] = slr[0, :].mean()
underlying_recession[0, :] = underlying_recession[0, :].mean() underlying_recession[0, :] = underlying_recession[0, :].mean()
bruun_factor[0, :] = bruun_factor[0, :].mean() bruun_factor[0, :] = bruun_factor[0, :].mean()
underlying_recession_rate[0, :] = underlying_recession_rate[0, :].mean()
# Calculate total ongoing recession (m) # Calculate total ongoing recession (m)
ongoing_recession = slr * bruun_factor + underlying_recession ongoing_recession = slr * bruun_factor + underlying_recession
return ongoing_recession, slr, bruun_factor, underlying_recession return (ongoing_recession, slr, bruun_factor, underlying_recession,
underlying_recession_rate)
def get_storm_demand_volume(ref_aep, ref_vol, n, mode='fit'): def get_storm_demand_volume(ref_aep, ref_vol, n, mode='fit'):
@ -397,9 +401,10 @@ def process(beach_name, beach_scenario, n_runs, start_year, end_year,
probabilistic = True probabilistic = True
# Simulate ongoing shoreline recession # Simulate ongoing shoreline recession
r, slr, bf, ur = get_ongoing_recession(n_runs, start_year, end_year, r, slr, bf, ur, ur_rate = get_ongoing_recession(n_runs, start_year,
sea_level_rise, bruun_factor, end_year, sea_level_rise,
underlying_recession) bruun_factor,
underlying_recession)
ongoing_recession = r.copy() ongoing_recession = r.copy()
# Pre-allocate storm demand volume for each year (m3/m) # Pre-allocate storm demand volume for each year (m3/m)

Loading…
Cancel
Save