Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/example_NORA_wind_waves.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
plots.var_rose(df,var_dir=var_wind_dir,var=var_wind,method='overall',max_perc=40,decimal_places=1, units='m/s',output_file=folder / 'wind_omni.png')
plots.var_rose(df,var_dir=var_wind_dir,var=var_wind,method='monthly',max_perc=40,decimal_places=1, units='m/s',output_file=folder / 'wind_monthly.png')
plots.plot_directional_stats(df,var=var_wind,step_var=0.1,var_dir=var_wind_dir,title = 'W10[m/s]', output_file=folder / 'directional_wind_stats.png')
plots.table_directional_non_exceedance(df,var=var_wind,step_var=2,var_dir=var_wind_dir,output_file=folder / 'table_wind_directional_non_exceedance.csv')
tables.table_directional_non_exceedance(df,var=var_wind,step_var=2,var_dir=var_wind_dir,output_file=folder / 'table_wind_directional_non_exceedance.csv')
plots.plot_monthly_stats(df,var=var_wind,title = 'Wind Speed at 10 m [m/s]', output_file=folder / 'monthly_wind_stats.png')
tables.table_monthly_non_exceedance(df,var=var_wind,step_var=2,output_file=folder / 'table_monthly_non_exceedance.csv')
plots.plot_prob_non_exceedance_fitted_3p_weibull(df,var=var_wind,output_file=folder / 'prob_non_exceedance_fitted_3p_weibull_wind.png')
Expand Down
2 changes: 1 addition & 1 deletion metocean_stats/stats/extreme.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ def directional_extremes(data: pd.DataFrame, var: str, var_dir: str, periods=[1,
for dir in range(0,360,30):
sector_data = data[data['direction_sector']==dir]
if sector_data.empty:
sector_data = data * 0 # fill with zeros, this will give 0 extremes for empety sectors
sector_data = data.loc[:, data.select_dtypes(include=['number']).columns] * 0 # fill with zeros, this will give 0 extremes for empty sectors

if isinstance(threshold, str) and threshold.startswith('P'):
threshold_value = sector_data[var].quantile(int(threshold.split('P')[1])/100)
Expand Down
Loading