Changes between Version 1 and Version 2 of ModifyModelforEnsembleIntegrationFullpar


Ignore:
Timestamp:
Apr 28, 2014, 3:24:36 PM (7 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModifyModelforEnsembleIntegrationFullpar

    v1 v2  
    2323Operations that are specific to the model and to the assimilated observations are performed by routines that are supplied by the user. These are called through the defined interface of PDAF. Generally, these user-supplied routines have to provide quite elementary operations, like initializing a model state vector for PDAF from model fields or providing the vector of observations. PDAF provides examples for these routines and templates that can be used as the basis for the implementation. As only the interface of these routines is specified, the user can implement the routines like a routine of the model. Thus, the implementation of these routines should not be difficult.
    2424
    25 == External ensemble loop ==
    26 
    27 The external loop for the ensemble integration has to enclose the time stepping loop of the model. Next to the external loop, a control structure for exiting the external loop as well as two calls to subroutines of PDAF have to be added. These are the calls to `PDAF_get_state` and a filter-specific routine like `PDAF_put_state_seik` for the SEIK filter. Both routines are described in sections below.
    28 
    29 The extended model code can look like this for the SEIK filter:
    30  {{{
    31   pdaf_modelloop: DO 
    32 
    33      CALL PDAF_get_state(nsteps, ..., doexit, ...)
    34 
    35      ! Check whether forecast has to be performed
    36      ifcontrol: IF (doexit /= 1) THEN
    37      
    38         IF (nsteps > 0) THEN
    39 
    40           ... Time stepping code of the model ...         
    41 
    42         END IF
    43 
    44         CALL PDAF_put_state_seik(...)
    45 
    46      ELSE ifcontrol
    47 
    48         ! No more assimilation work; exit loop
    49         EXIT pdaf_modelloop
    50 
    51      END IF ifcontrol
    52 
    53   END DO pdaf_modelloop
    54 }}}
    55 In this example, which is taken from the example implementation in `testsuite/src/dummymodel_1D`, we use an unconditional DO loop (while loop). The exit flag `doexit` for this loop is set within `PDAF_get_state`. In addition, the variable `nsteps` is initialized, which defines the number of time steps to be performed during the current forecast phase. Thus, we only execute the time stepping code if `nsteps>0`. (If this has to be implemented using an IF-clause as in the example should be checked for the particular code).
    5625
    5726== `PDAF_get_state` ==