|
|
@ -14,7 +14,6 @@ logger = setup_logging()
|
|
|
|
|
|
|
|
|
|
|
|
MULTIPROCESS_THREADS = int(os.environ.get("MULTIPROCESS_THREADS", 4))
|
|
|
|
MULTIPROCESS_THREADS = int(os.environ.get("MULTIPROCESS_THREADS", 4))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def forecast_twl(
|
|
|
|
def forecast_twl(
|
|
|
|
df_tides,
|
|
|
|
df_tides,
|
|
|
|
df_profiles,
|
|
|
|
df_profiles,
|
|
|
@ -103,11 +102,12 @@ def mean_slope_for_site_id(
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
# Get the prestorm beach profile
|
|
|
|
# Get the prestorm beach profile
|
|
|
|
profile = df_profiles.query("site_id =='{}' and profile_type == '{}'".format(site_id, profile_type))
|
|
|
|
profile = df_profiles.loc[(site_id, profile_type)]
|
|
|
|
profile_x = profile.index.get_level_values("x").tolist()
|
|
|
|
profile_x = profile.index.get_level_values("x").tolist()
|
|
|
|
profile_z = profile.z.tolist()
|
|
|
|
profile_z = profile.z.tolist()
|
|
|
|
|
|
|
|
|
|
|
|
df_twl_site = df_twl.query("site_id == '{}'".format(site_id))
|
|
|
|
idx = pd.IndexSlice
|
|
|
|
|
|
|
|
df_twl_site = df_twl.loc[idx[site_id, :], :]
|
|
|
|
|
|
|
|
|
|
|
|
df_beta = df_twl_site.apply(
|
|
|
|
df_beta = df_twl_site.apply(
|
|
|
|
lambda row: slope_from_profile(
|
|
|
|
lambda row: slope_from_profile(
|
|
|
|