Changes between Initial Version and Version 1 of U_prepoststep


Ignore:
Timestamp:
Jan 21, 2015, 2:50:21 PM (10 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • U_prepoststep

    v1 v1  
     1= U_prepoststep =
     2
     3The page document the user-supplied call-back routine `U_prepoststep`.
     4
     5The routine `U_prepoststep` is a call-back routine that has to be provided by the user. In the simplified interface the predefined name of the routine is `prepoststep_pdaf`, but in the full interface, the user can choose the name of the routine.
     6`U_prepoststep` is called by `PDAF_get_state`, `PDAF_put_state_X`, and `PDAF_assimilate_X` with 'X' being the name of a filter method. The routine is called at the initial time and after a forecast (directly before computing the filter analysis step) and after the analysis step. The purpose of the routine is to give the user full access to the forecast and the analysis ensembles. Typically operations that are performed in `U_prepoststep` are to compute the estimated RMS errors form the ensemble and to write e.g. the state estimate (i.e. the ensemble mean state). In case of the offline mode, one will also write the model restart files in `U_prepoststep` when the routine is called after the filter analysis update.
     7
     8The interface is the following:
     9{{{
     10SUBROUTINE U_prepoststep(step, dim_p, dim_ens, dim_ens_p, dim_obs_p, &
     11                       state_p, Uinv, ens_p, flag)
     12}}}
     13with
     14 * `step` : `integer, intent(in)`[[BR]] Current time step (When the routine is called before the analysis -step is provided.)
     15 * `dim_p` : `integer, intent(in)`[[BR]] Size of state vector (local part of process if decomposed)
     16 * `dim_ens` : `integer, intent(in)`[[BR]] Size of ensemble
     17 * `dim_ens_p` : `integer, intent(in)`[[BR]] Process-local size of ensemble
     18 * `dim_obs_p` : `integer, intent(in)`[[BR]] Size of observation vector (local part of process if decomposed)
     19 * `state_p` : `real, intent(inout), dimension(dim_p)`[[BR]] State vector (forecast or analysis). The vector is generally not initialized in the case of ESTKF/ETKF/EnKF/SEIK. IT can be used freely in this routine
     20 * `Uinv` : `real, intent(inout), dimension(dim_ens-1, dim_ens-1)`[[BR]] Inverse of the error-subspace matrix matrix A in ETKF and ESKTF; inverse of matrix U in SEIK and SEEK; not used in EnKF
     21 * `ens_p` : `real, intent(inout), dimension(dim_p, dim_ens)`[[BR]] State ensemble (process-local part of process if decomposed)
     22 * `flag` : `integer, intent(in)`[[BR]] PDAF status flag (0 if no error)
     23
     24Notes:
     25 * The routine is called by all filter processes.
     26 * If parallelization with domain decomposition is used, the variables `state_p` and `ens_p` will only contain the state information for the process-local domain. Accordingly, also `dim_p` and `dim_obs_p` only contain the state vector size for the local domain.
     27 * For the local filters (LESTKF, LETKF, LSEIK) `dim_obs_p` is the observation dimension for the `full` observations.
     28
     29Hints:
     30 * If a user considers to perform adjustments to the estimates (e.g. for balances), this routine is the right place for it.
     31 * Only for the SEEK filter the state vector (`state_p`) is initialized. For all other filters, the array is allocated, but it can be used freely during the execution of `U_prepoststep`.
     32 * The interface through which `U_prepoststep` is called does not include the array of smoothed ensembles. In order to access the smoother ensemble array one has to set a pointer to it using a call to the routine `PDAF_get_smootherens` (see page on [AuxiliaryRoutines auxiliary routines])
     33