Changes between Version 2 and Version 3 of ExternalModelLoop
- Timestamp:
- Nov 30, 2020, 11:21:55 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ExternalModelLoop
v2 v3 26 26 == External ensemble loop == 27 27 28 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 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 `PDAFomi_put_state_global` for global filters. Both routines are described in sections below. 29 29 30 30 The extended model code can look like this for the SEIK filter: … … 43 43 END IF 44 44 45 CALL PDAF _put_state_seik(...)45 CALL PDAFomi_put_state_global(...) 46 46 47 47 ELSE ifcontrol … … 76 76 PDAF also has a [PdafSimplifiedInterface Simplified Interface] providing the routine `PDAF_get_state_si`. In the simplified interface, the names of all user-supplied call back routines are predefined such that they not appear in the call to `PDAF_get_state_si`. More information on the pre-defined names is provided in the [PdafSimplifiedInterface documentation of PDAF's simplified interface]. 77 77 78 == `PDAF _put_state_X` ==79 80 There is a separate routine `PDAF_put_state_X` for each of the filter algorithms. The name of the routine includes the name of the filter at its end (instead of `X`). The purpose of the `PDAF_put_state_X` routines is to write back the forecast model fields into the array holding the ensemble of model state vectors. In addition, the routine checks if the current forecast phase is completed. If not, the routine is exited and the next cycle of the ensemble loop is performed. If the current forecast phase is completed, the routine executes the analysis step of the chosen filter algorithm. The interface to each put-state routine is specific for each filter algorithm, because the names of several user-supplied routines have to be specified, which are specific for each filter algorithm. However, at the stage of implementing the ensemble integration only the first and last arguments of the routines are relevant.81 82 For example, the interface when using the SEIK filteris the following:83 {{{ 84 SUBROUTINE PDAF _put_state_seik(U_collect_state, U_init_dim_obs, U_obs_op, &85 U_ init_obs, U_prepoststep, U_prodRinvA, U_init_obsvar, status)78 == `PDAFomi_put_state_X` == 79 80 There are separate routines `PDAF_put_state_global` and `PDAF_put_state_local`, respeectively for global and local filter algorithms. The purpose of the `PDAF_put_state_X` routines is to write back the forecast model fields into the array holding the ensemble of model state vectors. In addition, the routine checks if the current forecast phase is completed. If not, the routine is exited and the next cycle of the ensemble loop is performed. If the current forecast phase is completed, the routine executes the analysis step of the chosen filter algorithm. The interface to each put-state routine is specific for each filter algorithm, because the names of several user-supplied routines have to be specified, which are specific for each filter algorithm. However, at the stage of implementing the ensemble integration only the first and last arguments of the routines are relevant. 81 82 For example, the interface when using global filters is the following: 83 {{{ 84 SUBROUTINE PDAFomi_put_state_global(U_collect_state, U_init_dim_obs, U_obs_op, & 85 U_prepoststep, status) 86 86 }}} 87 87 At this state of the implementation only these arguments are relevant: … … 91 91 The other arguments are names of user-supplied subroutines that are only executed if the analysis step is executed (See the section [#Compilationandtesting 'Compilation and testing'] for how to provide these routines for compilation at this stage). These routines are explained in the next section of the implementation guide ([ImplementationofAnalysisStep Implementation of the Analysis step]) separately for each available filter algorithm. 92 92 93 PDAF also has a [PdafSimplifiedInterface Simplified Interface] providing the routine `PDAF_out_state_X_si`. In the simplified interface, the names of all user-supplied call back routines are predefined such that they not appear in the call to `PDAF_put_state_X_si`. More information on the pre-defined names is provided in the [PdafSimplifiedInterface documentation of PDAF's simplified interface].94 93 95 94 == User-supplied routines ==