Skip to content

Commit

Permalink
correct obsmon statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
asmundb committed May 3, 2024
1 parent ee69f15 commit 5d4c3c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pysurfex/obsmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def rmse(predictions, targets):
"""
if len(predictions) > 0:
return np.sqrt(np.nanmin(((predictions - targets) ** 2)))
return np.sqrt(np.nanmean(((predictions - targets) ** 2)))
else:
return "NULL"

Expand Down Expand Up @@ -303,7 +303,7 @@ def calculate_statistics(observations, modes, stat_cols):
if col == "nobs":
statistics.update({tab: len(obs)})
elif col == "fg_bias":
statistics.update({tab: bias(fg_dep)})
statistics.update({tab: mean(fg_dep)})
elif col == "fg_abs_bias":
statistics.update({tab: absbias(fg_dep)})
elif col == "fg_rms":
Expand All @@ -315,7 +315,7 @@ def calculate_statistics(observations, modes, stat_cols):
elif col == "bc":
statistics.update({tab: 0})
elif col == "an_bias":
statistics.update({tab: bias(an_dep)})
statistics.update({tab: mean(an_dep)})
elif col == "an_abs_bias":
statistics.update({tab: absbias(an_dep)})
elif col == "an_rms":
Expand Down

0 comments on commit 5d4c3c6

Please sign in to comment.