|
|
@ -20,6 +20,7 @@ def forecast_twl(
|
|
|
|
df_profiles,
|
|
|
|
df_profiles,
|
|
|
|
df_waves,
|
|
|
|
df_waves,
|
|
|
|
df_profile_features,
|
|
|
|
df_profile_features,
|
|
|
|
|
|
|
|
df_grain_size,
|
|
|
|
runup_function,
|
|
|
|
runup_function,
|
|
|
|
n_processes=MULTIPROCESS_THREADS,
|
|
|
|
n_processes=MULTIPROCESS_THREADS,
|
|
|
|
slope="foreshore",
|
|
|
|
slope="foreshore",
|
|
|
@ -82,6 +83,7 @@ def forecast_twl(
|
|
|
|
Hs0=df_twl["Hs0"].tolist(),
|
|
|
|
Hs0=df_twl["Hs0"].tolist(),
|
|
|
|
Tp=df_twl["Tp"].tolist(),
|
|
|
|
Tp=df_twl["Tp"].tolist(),
|
|
|
|
beta=df_twl["beta"].tolist(),
|
|
|
|
beta=df_twl["beta"].tolist(),
|
|
|
|
|
|
|
|
r=df_twl.merge(df_grain_size, on="site_id").r.tolist(),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
df_twl["R2"] = R2
|
|
|
|
df_twl["R2"] = R2
|
|
|
@ -340,6 +342,7 @@ def slope_from_profile(
|
|
|
|
type=click.Choice(["prestorm", "poststorm"]),
|
|
|
|
type=click.Choice(["prestorm", "poststorm"]),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@click.option("--output-file", required=True, help="")
|
|
|
|
@click.option("--output-file", required=True, help="")
|
|
|
|
|
|
|
|
@click.option("--grain-size-csv", required=False, help="")
|
|
|
|
def create_twl_forecast(
|
|
|
|
def create_twl_forecast(
|
|
|
|
waves_csv,
|
|
|
|
waves_csv,
|
|
|
|
tides_csv,
|
|
|
|
tides_csv,
|
|
|
@ -349,6 +352,7 @@ def create_twl_forecast(
|
|
|
|
slope,
|
|
|
|
slope,
|
|
|
|
profile_type,
|
|
|
|
profile_type,
|
|
|
|
output_file,
|
|
|
|
output_file,
|
|
|
|
|
|
|
|
grain_size_csv,
|
|
|
|
):
|
|
|
|
):
|
|
|
|
logger.info("Creating forecast of total water levels")
|
|
|
|
logger.info("Creating forecast of total water levels")
|
|
|
|
logger.info("Importing data")
|
|
|
|
logger.info("Importing data")
|
|
|
@ -356,6 +360,7 @@ def create_twl_forecast(
|
|
|
|
df_tides = pd.read_csv(tides_csv, index_col=[0, 1])
|
|
|
|
df_tides = pd.read_csv(tides_csv, index_col=[0, 1])
|
|
|
|
df_profiles = pd.read_csv(profiles_csv, index_col=[0, 1, 2])
|
|
|
|
df_profiles = pd.read_csv(profiles_csv, index_col=[0, 1, 2])
|
|
|
|
df_profile_features = pd.read_csv(profile_features_csv, index_col=[0, 1])
|
|
|
|
df_profile_features = pd.read_csv(profile_features_csv, index_col=[0, 1])
|
|
|
|
|
|
|
|
df_grain_size = pd.read_csv(grain_size_csv, index_col=[0])
|
|
|
|
|
|
|
|
|
|
|
|
logger.info("Forecasting TWL")
|
|
|
|
logger.info("Forecasting TWL")
|
|
|
|
df_twl = forecast_twl(
|
|
|
|
df_twl = forecast_twl(
|
|
|
@ -363,6 +368,7 @@ def create_twl_forecast(
|
|
|
|
df_profiles,
|
|
|
|
df_profiles,
|
|
|
|
df_waves,
|
|
|
|
df_waves,
|
|
|
|
df_profile_features,
|
|
|
|
df_profile_features,
|
|
|
|
|
|
|
|
df_grain_size,
|
|
|
|
runup_function=getattr(runup_models, runup_function),
|
|
|
|
runup_function=getattr(runup_models, runup_function),
|
|
|
|
slope=slope,
|
|
|
|
slope=slope,
|
|
|
|
profile_type=profile_type,
|
|
|
|
profile_type=profile_type,
|
|
|
|