MIKE FM Data assimilation quick start guide¶
Overall description¶
DA module is build around the Ensemble Kalman Filter and ensemble modelling is therefore an integral part of the module. But the DA module can be used for ensemble modelling without data assimilation (e.g. if probabilistic output is needed) and non-ensemble assimilation types (e.g. optimal interpolation) are also supported.
Installation¶
Data assimilation has been available as part of the release of MIKE Zero since version 2020 (as a hidden feature). It is recommended to use MIKE Zero 2021 for all DA simulations. Using the module requires a DA license which all DHI employees have by default. Some features require the latest development version of the FemEngine executable.
Note
Data assimilation models was previously (before 2019) run with a separate engine called FemEngineDA.exe. This engine no longer exists, instead DA models can be run from all FemEngines. Old DA setups can be run with new engines if the root element is changed from [FemEngineDA] to [FemEngine].
Execution and GUI¶
Data assimilation models cannot be executed from the MIKE Zero GUI and if it's opened in the GUI and saved, the [DATA_ASSIMILATION_MODULE] will disappear. The model needs to be executed from the command-line or via MzLaunch (see MIKE FAQ on batch execution).
PFS file¶
To make the engine recognize that your model is a DA model, it needs to be told to look for the DA section in the PFS by adding the following line to the [MODULE_SELECTION]:
[MODULE_SELECTION]
mode_of_data_assimilation_module = 2
EndSect
This will make the engine look for the PFS section [DATA_ASSIMILATION_MODULE].
PFS section¶
The sections of reference manual correspond to different PFS sections in the overall DA PFS structure which should be included after the other sections in the pfs file (inside the root element [FemEngine])
[DATA_ASSIMILATION_MODULE]
[TIME]
[METHOD]
[MODEL_ERROR_MODEL]
[MODEL_STATE_SPACE]
[MEASUREMENTS]
[ESTIMATOR]
[ERRCOV_IO]
[ENSEMBLE_IO]
[DIAGNOSTICS]
EndSect
All of these are explained in the reference manual but as a beginner pay most attention to
[METHOD]overall method, ensemble size, DA settings[MODEL_ERROR_MODEL]model perturbations (for ensemble models)[MEASUREMENTS]define measurements for assimilation and validation[ENSEMBLE_IO]output the whole state and all ensemble members to file[DIAGNOSTICS]save time series in a point showing all ensemble members
Making a new data assimilation setup¶
The simplest procedure for making a new DA model is the following:
- Make a FM model that suits your needs and name the setup file [mymodel]HD.m21fm (or .m3fm or .sw). Make outputs etc in the GUI.
- Make a copy of the model PFS file (and call it [mymodel]DA.m21fm)
- Open the new PFS file in a text editor make the following modifications
- add mode_of_data_assimilation_module = 2 to the
[MODULE_SELECTION]. - add a template
[DATA_ASSIMILATION_MODULE]PFS section (see Examples) - modify the different DA section to fit your needs
- add mode_of_data_assimilation_module = 2 to the
- run the model for a few time steps and assess the log file
Learning to use the DA module¶
The three most basic ways of running the module:
- Ensemble without assimilation
- Ensemble Kalman Filter - the full EnKF assimilation
- Optimal Interpolation - a simple distance-based assimilation update
Step 1: Make a dummy DA setup: DA type 0 with ensemble size 1, no model errors, 1 measurements and just one diagnostic output referring to that measurement. Run it and evaluate the log file. PFS
Step 2: Make a OI model: DA type 2 with a [OPTIMAL_INTERPOLATION] section, no model errors, 2 measurements (1 for assimilation, 1 for validation). Run it and evaluate log file and diagnostic files.
Step 3: Make your first ensemble model: DA type 0 with ensemble size 5, 1 model error
Step 4: Make an EnKF model: Change your step 3 ensemble model to an EnKF model by changing the DA type to 1.