Measurement diagnostics (type 1) support different type of skill assessments by comparison between the model result and the measurements stored in the file:
The same skill assessment methods and properties are available for their main data properties .result, .forecast, .forecast_at_update, and .analysis (if the file contains no updates only .result and .forecast will be available and they will be identical).
import fmdap
fn = '../tests/testdata/Diagnostics_F16_EnKF.dfs0'
diag = fmdap.read_diagnostic(fn, name="F16")
diag.skill()
n | bias | rmse | urmse | mae | cc | si | r2 | |
---|---|---|---|---|---|---|---|---|
observation | ||||||||
F16 analysis | 58 | 0.207470 | 0.419241 | 0.364307 | 0.311775 | 0.970885 | 0.087019 | 0.920583 |
F16 forecast | 67 | 0.169513 | 0.393557 | 0.355179 | 0.281344 | 0.973028 | 0.088905 | 0.930080 |
F16 forecast@update | 58 | 0.204999 | 0.418657 | 0.365033 | 0.307975 | 0.970494 | 0.087193 | 0.920804 |
F16 result | 67 | 0.171653 | 0.394095 | 0.354748 | 0.284634 | 0.973410 | 0.088797 | 0.929889 |
diag.forecast_at_update.skill().round(3)
n | bias | rmse | urmse | mae | cc | si | r2 | |
---|---|---|---|---|---|---|---|---|
observation | ||||||||
F16 forecast@update | 58 | 0.205 | 0.419 | 0.365 | 0.308 | 0.97 | 0.087 | 0.921 |
diag.analysis.skill(metrics=["mape","mef","nse","r2","lin_slope"])
n | mape | mef | nse | r2 | lin_slope | |
---|---|---|---|---|---|---|
observation | ||||||
F16 analysis | 58 | 7.902526 | 0.28181 | 0.923925 | 0.920583 | 0.991982 |
diag.scatter() = diag.result.scatter()
diag.scatter(figsize=(6,6))
diag.analysis.scatter(figsize=(6,6), show_points=False)
diag.forecast.scatter(figsize=(6,6), show_hist=False)