|
|
@ -1,6 +1,8 @@
|
|
|
|
import numpy as np
|
|
|
|
import numpy as np
|
|
|
|
import pandas as pd
|
|
|
|
import pandas as pd
|
|
|
|
|
|
|
|
from logs import setup_logging
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logger = setup_logging()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def sto06(Hs0, Tp, beta, **kwargs):
|
|
|
|
def sto06(Hs0, Tp, beta, **kwargs):
|
|
|
@ -104,8 +106,98 @@ def atk18(Hs0, Tp, beta):
|
|
|
|
pass
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def pow18(Hs0, Tp, beta):
|
|
|
|
def pow18(Hs0, Tp, beta, r, **kwargs):
|
|
|
|
pass
|
|
|
|
logger.info("Calculating runup using Power et al. (2018)")
|
|
|
|
|
|
|
|
df = pd.DataFrame(
|
|
|
|
|
|
|
|
{"Hs0": Hs0, "Tp": Tp, "beta": beta, "r": r},
|
|
|
|
|
|
|
|
index=[x for x in range(0, np.size(Hs0))],
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
df["Lp"] = 9.8 * df["Tp"] ** 2 / 2 / np.pi
|
|
|
|
|
|
|
|
df["x1"] = df["Hs0"] / df["Lp"]
|
|
|
|
|
|
|
|
df["x2"] = df["beta"]
|
|
|
|
|
|
|
|
df["x3"] = df["r"] / df["Hs0"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
df["R2"] = df.Hs0 * (
|
|
|
|
|
|
|
|
(df.x2 + (((df.x3 * 3) / np.exp(-5)) * ((3 * df.x3) * df.x3)))
|
|
|
|
|
|
|
|
+ ((((df.x1 + df.x3) - 2) - (df.x3 - df.x2)) + ((df.x2 - df.x1) - df.x3))
|
|
|
|
|
|
|
|
+ (((df.x3 ** df.x1) - (df.x3 ** (1 / 3))) - (np.exp(df.x2) ** (df.x1 * 3)))
|
|
|
|
|
|
|
|
+ np.sqrt((((df.x3 + df.x1) - df.x2) - (df.x2 + np.log10(df.x3))))
|
|
|
|
|
|
|
|
+ ((((df.x2 ** 2) / (df.x1 ** (1 / 3))) ** (df.x1 ** (1 / 3))) - np.sqrt(df.x3))
|
|
|
|
|
|
|
|
+ (
|
|
|
|
|
|
|
|
(df.x2 + ((df.x3 / df.x1) ** (1 / 3)))
|
|
|
|
|
|
|
|
+ (np.log(2) - (1 / (1 + np.exp(-(df.x2 + df.x3)))))
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
+ ((np.sqrt(df.x3) - (((3 ** 2) + 3) * (df.x2 ** 2))) ** 2)
|
|
|
|
|
|
|
|
+ ((((df.x3 * -5) ** 2) ** 2) + (((df.x3 + df.x3) * df.x1) / (df.x2 ** 2)))
|
|
|
|
|
|
|
|
+ np.log(
|
|
|
|
|
|
|
|
(np.sqrt(((df.x2 ** 2) + (df.x3 ** (1 / 3)))) + ((df.x2 + 3) ** (1 / 3)))
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
+ (
|
|
|
|
|
|
|
|
(((df.x1 / df.x3) * (-5 ** 2)) * (df.x3 ** 2))
|
|
|
|
|
|
|
|
- np.log10((1 / (1 + np.exp(-(df.x2 + df.x3)))))
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
+ (df.x1 ** df.x3)
|
|
|
|
|
|
|
|
+ np.exp(-((((df.x3 / df.x1) ** np.exp(4)) + (np.exp(df.x3) ** 3)) ** 2))
|
|
|
|
|
|
|
|
+ np.exp((np.log((df.x2 - df.x3)) - np.log(np.exp(-((-1 + df.x1) ** 2)))))
|
|
|
|
|
|
|
|
+ ((np.sqrt(4) * (((df.x3 / df.x2) - df.x2) - (0 - df.x1))) ** 2)
|
|
|
|
|
|
|
|
+ (2 * ((((-5 * df.x3) + df.x1) * (2 - df.x3)) - 2))
|
|
|
|
|
|
|
|
+ ((np.sqrt(4) * (((df.x3 / df.x2) - df.x2) - (0 - df.x1))) ** 2)
|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
|
|
|
|
|
|
|
|
|
|
|
df["setup"] = np.nan
|
|
|
|
|
|
|
|
df["S_ig"] = np.nan
|
|
|
|
|
|
|
|
df["S_inc"] = np.nan
|
|
|
|
|
|
|
|
df["S_total"] = np.nan
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
float_or_list(df["R2"].tolist()),
|
|
|
|
|
|
|
|
float_or_list(df["setup"].tolist()),
|
|
|
|
|
|
|
|
float_or_list(df["S_total"].tolist()),
|
|
|
|
|
|
|
|
float_or_list(df["S_inc"].tolist()),
|
|
|
|
|
|
|
|
float_or_list(df["S_ig"].tolist()),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def beu(Hs0, Tp, beta):
|
|
|
|
def beu(Hs0, Tp, beta):
|
|
|
|