Diagnostic Output#

Main Properties#

The data in a diagnostics file can be categorized as

  1. non-update step

  2. update-step: before update

  3. update-step: after update (analysis)

The Diagnostic object therefore has the following result properties:

  • forecast (0 and 1)

  • forecast_at_update (1)

  • analysis (2)

  • result (0 and 2)

and the additional data properties:

  • innovation (y-Hx measurement-minus-model at 0, 1 and 2)

  • increment (2-1; the update itself)

All these properties are also diagnostic objects with similar functionality as the diagnostic object: min(), max(), std(), plot(), hist(), …

Main Properties for files without updates#

If the diagnostic files stem from a non-DA simulation it will only contain non-update steps (0). The object will therefore only contain:

  • forecast

  • result

  • innovation (y-Hx measurement-minus-model)

And forecast = result.

Diagnostic Collection#

It’s often convenient to load all diagnostic files from a simulation using FMDAp’s DiagnosticCollection. It can done with the

API#

The diagnostic_output module contains methods and classes for working with MIKE FM DA diagnostic outputs.

The entrance point is always the read_diagnostic() method which will return a specialized object depending on the type of diagnostic output.

The returned object will be of type:

Examples

>>> import fmdap
>>> d = fmdap.read_diagnostic("Diagnostics_Drogden_OI.dfs0", name="Drogden")
>>> d.increment.hist()
>>> d.analysis.innovation.hist()
>>> d.result.plot()
class fmdap.diagnostic_output.DiagnosticType(value)#

An enumeration.

class fmdap.diagnostic_output.MeasurementDistributedDiagnostic(df, name, eumItem=None, filename=None)#
property has_updates#

has file any assimilation updates (duplicate index)

hist(**kwargs)#

plot histogram of values using plt.hist()

Parameters

bins (int, optional) – histgram bins, by default 100

property idx_analysis#

index after assimilation updates (analysis)

property idx_forecast#

index before assimilation updates (forecast)

property idx_no_update#

index when there is no assimilation updates

property innovation#

innovation (y-Hx) object

property n_updates#

number of assimilation updates

property time#

the time vector (index as datetime)

property values#

all values as a nd array

class fmdap.diagnostic_output.MeasurementPointDiagnostic(df, name, eumItem=None, filename=None)#
property has_updates#

has file any assimilation updates (duplicate index)

hist(**kwargs)#

plot histogram of values using plt.hist()

Parameters

bins (int, optional) – histgram bins, by default 100

property idx_analysis#

index after assimilation updates (analysis)

property idx_forecast#

index before assimilation updates (forecast)

property idx_no_update#

index when there is no assimilation updates

property innovation#

innovation (y-Hx) object

property n_updates#

number of assimilation updates

property time#

the time vector (index as datetime)

property values#

all values as a nd array

class fmdap.diagnostic_output.NonMeasurementPointDiagnostic(df, name, eumItem=None, filename=None)#
property has_updates#

has file any assimilation updates (duplicate index)

hist(bins=100, show_Gaussian=False, **kwargs)#

plot histogram of values using plt.hist()

Parameters

bins (int, optional) – histgram bins, by default 100

property idx_analysis#

index after assimilation updates (analysis)

property idx_forecast#

index before assimilation updates (forecast)

property idx_no_update#

index when there is no assimilation updates

property n_updates#

number of assimilation updates

property time#

the time vector (index as datetime)

property values#

all values as a nd array

fmdap.diagnostic_output.read_diagnostic(filename, name=None)#

Read diagnostic output dfs0 file