- Miniker 102 manual
- - 3 Advanced Miniker programming

## 3.8 Observations and data

- 3.8.1 Observations
- 3.8.2 Data

Some support for observations and interactions with data is available. The observations are functions of the model variables. They don’t have any action on the model result, but they may (in theory) be observed and measured. The natural use of these observations is to be compared with data that correspond with the values from real measurements. They are used in the Kalman filter (see Kalman filter).

The (model) observation vector is noted ω and the observation function is noted h:

### 3.8.1 Observations

The observation functions are set in a `set_probe` block in the ‘`zinit`’ sequence.

For example suppose that, in the predator-prey model, we only have access to the total population of preys and predators, we would have:

    set_probe
    < eqn: pop = eta_pred + eta_pray;
    >;

The number of observations is put in the integer variable `mobs`. The observation vector corresponds with the part of the `ff(.)` array situated past the regular transferts, `ff(mp+.)`, and is output in the file ‘`obs.data`’.

### 3.8.2 Data

Currently this code is only used if the Kalman code is activated. This may be changed in the future.

The convention for data is that whenever some data are available, the logical variable `zgetobs` should be set to ‘`.true.`’. And the `vobs(.)` vector should be filled with the data values. This vector has the same dimension than the observation vector and each coordinate is meant to correspond with one coordinate of the observation vector.

This feature is turned on by setting the logical variable `zdata` to ‘`.true.`’, and the `zgetobs` flag is typically set in the ‘`zsteer`’ sequence (see Executing code at the end of each time step). Every instant data are available (`zgetobs` is true) the observations are written to the file ‘`data.data`’. With the Kalman filter more informations are output to the ‘`data.data`’ file, see Kalman filter results.