Skip to content

Commit

Permalink
Merge pull request #42 from theaje/main
Browse files Browse the repository at this point in the history
Fixed an error in equation HsTP join distribution
  • Loading branch information
KonstantinChri authored Oct 2, 2024
2 parents 72922c7 + bd13868 commit 125f85a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion metocean_stats/stats/extreme.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,8 @@ def joint_distribution_Hs_Tp(data,var_hs='hs',var_tp='tp',periods=[1,10,100,1000
pdf_Hs2 = h*0

if 0 < mu < 5 :
pdf_Hs1 = 1/(np.sqrt(2*np.pi)*alpha*h)*np.exp(-(np.log(h)-sigma)**2/(2*alpha**2))
#Based on Moan et al. (2005), "Uncertainty of wave-induced response of marine structures due to long-term variation of extratropical wave conditions":
pdf_Hs1 = 1/(np.sqrt(2*np.pi)*sigma*h)*np.exp(-(np.log(h)-alpha)**2/(2*sigma**2))
else:
param = stats.lognorm.fit(df.hs.values,) # shape, loc, scale
pdf_lognorm = stats.lognorm.pdf(h, param[0], loc=param[1], scale=param[2])
Expand Down

0 comments on commit 125f85a

Please sign in to comment.