Changes between Version 3 and Version 4 of ImplementAnalysislseik


Ignore:
Timestamp:
Sep 1, 2010, 4:02:41 PM (10 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ImplementAnalysislseik

    v3 v4  
    7575See [ModifyModelforEnsembleIntegration#U_collect_statecollect_state.F90 here] for the description of this routine.
    7676
     77
     78== `U_init_dim_obs` (init_dim_obs.F90) ==
     79
     80This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF).
     81
     82The interface for this routine is:
     83{{{
     84SUBROUTINE init_dim_obs(step, dim_obs_p)
     85
     86  INTEGER, INTENT(in)  :: step       ! Current time step
     87  INTEGER, INTENT(out) :: dim_obs_p  ! Dimension of observation vector
     88}}}
     89
     90The routine is called at the beginning of each analysis step.  It has to initialize the size `dim_obs_p` of the observation vector according to the current time step. Without parallelization `dim_obs_p` will be the size for the full model domain. When a domain-decomposed model is used, `dim_obs_p` will be the size of the observation vector for the sub-domain of the calling process.
     91
     92Some hints:
     93 * It can be useful if not only the size of the observation vector is determined at this point. One can also already gather information about the location of the observations, which will be used later, e.g. to implement the observation operator. An array for the locations can be defined in a module like `mod_assimilation`.
     94
     95== `U_obs_op` (obs_op.F90) ==
     96
     97This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF).
     98
     99The interface for this routine is:
     100{{{
     101SUBROUTINE obs_op(step, dim_p, dim_obs_p, state_p, m_state_p)
     102
     103  INTEGER, INTENT(in) :: step               ! Currrent time step
     104  INTEGER, INTENT(in) :: dim_p              ! PE-local dimension of state
     105  INTEGER, INTENT(in) :: dim_obs_p          ! Dimension of observed state
     106  REAL, INTENT(in)    :: state_p(dim_p)     ! PE-local model state
     107  REAL, INTENT(out) :: m_state_p(dim_obs_p) ! PE-local observed state
     108}}}
     109
     110The routine is called during the analysis step. It has to perform the operation of the observation operator acting on a state vector that is provided as `state_p`. The observed state has to be returned in `m_state_p`.
     111
     112For a model using domain decomposition, the operation is on the PE-local sub-domain of the model and has to provide the observed sub-state for the PE-local domain.
     113
     114Hint:
     115 * If the observation operator involves a global operation, e.g. some global integration, while using domain-decompostion one has to gather the information from the other model domains using MPI communication.
     116
     117== `U_init_obs` (init_obs.F90) ==
     118
     119This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF).
     120
     121The interface for this routine is:
     122{{{
     123SUBROUTINE init_obs(step, dim_obs_p, observation_p)
     124
     125  INTEGER, INTENT(in) :: step             ! Current time step
     126  INTEGER, INTENT(in) :: dim_obs_p        ! PE-local dimension of obs. vector
     127  REAL, INTENT(out)   :: observation_p(dim_obs_p) ! PE-local observation vector
     128}}}
     129
     130The routine is called during the analysis step.
     131It has to provide the vector of observations in `observation_p` for the current time step.
     132
     133For a model using domain decomposition, the vector of observations that exist on the model sub-domain for the calling process has to be initialized.
     134
     135
     136== `U_prodRinvA` (prodrinva.F90) ==
     137
     138This routine is used by all filters whose algorithm uses the inverse of the observation error covariance matrix (SEEK, SEIK, and ETKF).
     139
     140The interface for this routine is:
     141{{{
     142SUBROUTINE prodRinvA(step, dim_obs_p, rank, obs_p, A_p, C_p)
     143
     144  INTEGER, INTENT(in) :: step                ! Current time step
     145  INTEGER, INTENT(in) :: dim_obs_p           ! PE-local dimension of obs. vector
     146  INTEGER, INTENT(in) :: rank                ! Rank of initial covariance matrix
     147  REAL, INTENT(in)    :: obs_p(dim_obs_p)    ! PE-local vector of observations
     148  REAL, INTENT(in)    :: A_p(dim_obs_p,rank) ! Input matrix from analysis routine
     149  REAL, INTENT(out)   :: C_p(dim_obs_p,rank) ! Output matrix
     150}}}
     151
     152The routine is called during the analysis step. In the algorithms the product of the inverse of the observation error covariance matrix with some matrix has to be computed. For the SEIK filter this matrix holds the observed part of the ensemble perturbations. The matrix is provided as `A_p`. The product has to be given as `C_p`.
     153
     154For a model with domain decomposition, `A_p` contains the part of the matrix that resides on the model sub-domain of the calling process. The product has to be computed for this sub-domain, too.
     155
     156Hints:
     157 * the routine does not require that the product is implemented as a real matrix-matrix product. Rather, the product can be implemented in its most efficient form. For example, if the observation error covariance matrix is diagonal, only the multiplication of the diagonal with matrix `A_p` has to be implemented.
     158 * The observation vector `obs_p` is provided through the interface for cases where the observation error variance is relative to the actual value of the observations.
     159
     160
     161
     162== `U_init_obsvar` (init_obsvar.F90) ==
     163
     164This routine is used by the global filter algorithms SEIK and  ETKF as well as the local filters LSEIK and LETKF. The routine is only called if the adaptive forgetting factor is used (`type_forget=1` in the example impementation).
     165
     166The interface for this routine is:
     167{{{
     168SUBROUTINE init_obsvar(step, dim_obs_p, obs_p, meanvar)
     169
     170  INTEGER, INTENT(in) :: step          ! Current time step
     171  INTEGER, INTENT(in) :: dim_obs_p     ! PE-local dimension of observation vector
     172  REAL, INTENT(in) :: obs_p(dim_obs_p) ! PE-local observation vector
     173  REAL, INTENT(out)   :: meanvar       ! Mean observation error variance
     174}}}
     175
     176The routine is called in the global filters during the analysis or
     177by the routine that computes an adaptive forgetting factor (PDAF_set_forget).
     178The routine has to initialize the mean observation error variance. 
     179For the global filters this should be the global mean.
     180
     181Hints:
     182 * For a model with domain-decomposition one might use the mean variance for the model sub-domain of the calling process. Alternatively one can compute a mean variance for the full model domain using MPI communication (e.g. the function `MPI_allreduce`).
     183 * The observation vector `obs_p` is provided to the rotine for the case that the observation error variance is relative to the value of the observations.
     184
    77185=== `U_prepoststep` (prepoststep_seik.F90) ===
    78186