The MIKE FM DA module can output 3 different types of diagnostic outputs:
All are read by the FMDAp method read_diagnostic()
import fmdap
Measurement diagnostic (type 1) comes in two kinds depending on the type measurement they refer to:
They furthermore behave differently depending on presence of assimilation updates or not.
Measurement diagnostic have the following main data properties:
If the file contains updates (from assimilation) it will also have properties:
If the file does not have updates, the forecast and result properties will be identical.
fn = '../tests/testdata/Diagnostics_F16_EnKF.dfs0'
diag = fmdap.read_diagnostic(fn, name="F16")
diag
<MeasurementPointDiagnostic> F16 (Significant wave height [m]) Time: 2017-10-27 00:00:00 - 2017-10-29 18:00:00 (397 steps; 347 with updates) Ensemble with 10 members Model: 7440 values from 1.7218 to 7.3975 with mean 3.9859 Measurements: 125 values from 1.7495 to 7.2173 with mean 3.9901 Mean skill: bias=0.1871, rmse=0.4057 ensemble_std=0.1365
diag.type
<DiagnosticType.Measurement: 1>
diag.has_updates
True
fn = '../tests/testdata/Diagnostics_Altimetry_C2.dfs0'
diag = fmdap.read_diagnostic(fn, name="c2 alti")
diag
<MeasurementDistributedDiagnostic> c2 alti (Significant wave height [m]) Time: 2017-10-27 12:50:00 (1 record with update) Spatially distributed points with avg 62.0 points per step Ensemble with 7 members Model: 434 values from 0.0297 to 2.6706 with mean 0.9674 Measurements: 62 values from 0.3489 to 2.5001 with mean 1.0032 Mean skill: bias=-1.0368, rmse=1.1841 ensemble_std=0.1531
Non-measurement diagnostic (type 2) are always point-type. The don't have any measurement information. They behave differently depending on presence of assimilation updates or not.
Non-measurement diagnostic have the following main data properties:
If the file contains updates (from assimilation) it will also have properties:
If the file does not have updates, the forecast and result properties will be identical.
fn = '../tests/testdata/diagnostics_nonMeas_SSC1.dfs0'
diag = fmdap.read_diagnostic(fn)
diag
<NonMeasurementPointDiagnostic> diagnostics_nonMeas_SSC1 (Concentration 2 [kg per m pow 3]) Time: 2016-01-01 02:00:00 - 2016-01-01 11:25:00 (114 steps; 0 with updates) Ensemble with 3 members Model: 342 values from 0.1810 to 0.6348 with mean 0.3458
diag.type
<DiagnosticType.NonMeasurementPoint: 2>
diag.has_updates
False
Currently, global assimilation statistics files have very limited support!
fn = '../tests/testdata/Global_stats.dfs0'
diag = fmdap.read_diagnostic(fn)
diag.type
<DiagnosticType.GlobalAssimilationStatistics: 3>