Changes between Version 6 and Version 7 of ImplementAnalysislseik
 Timestamp:
 Sep 1, 2010, 4:45:37 PM (10 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

ImplementAnalysislseik
v6 v7 50 50 with the following arguments: 51 51 * `U_collect_state`: The name of the usersupplied routine that initializes a state vector from the array holding the ensembel of model states from the model fields. This is basically the inverse operation to `U_distribute_state` used in `PDAF_get_state` 52 * `U_init_dim_obs_f `: The name of the usersupplied routine that provides the size of observation vector53 * `U_obs_op_f `: The name of the usersupplied routine that acts as the observation operator on some state vector54 * `U_init_obs_f `: The name of the usersupplied routine that initializes the vector of observations52 * `U_init_dim_obs_full`: The name of the usersupplied routine that provides the size of observation vector 53 * `U_obs_op_full`: The name of the usersupplied routine that acts as the observation operator on some state vector 54 * `U_init_obs_full`: The name of the usersupplied routine that initializes the vector of observations 55 55 * `U_init_obs_l`: The name of the usersupplied routine that initializes the vector of observations for a local analysis domain 56 56 * `U_prepoststep`: The name of the pre/poststep routine as in `PDAF_get_state` … … 83 83 The interface for this routine is: 84 84 {{{ 85 SUBROUTINE init_dim_obs_f (step, dim_obs_f)85 SUBROUTINE init_dim_obs_full(step, dim_obs_f) 86 86 87 87 INTEGER, INTENT(in) :: step ! Current time step … … 90 90 91 91 The routine is called at the beginning of each analysis step, before the loop over all local analysis domains is entered. It has to initialize the size `dim_obs_f` of the full observation vector according to the current time step. For simplicity, `dim_obs_f` can be the size for the global model domain. 92 When a domaindecomposed model is used, `dim_obs_f` will be the size of the observation vector for the subdomain of the calling process plus .93 92 94 93 Some hints: 95 * 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 * It can be useful to not only determine the size of the observation vector 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`. 95 * The routine is similar to `init_dim_obs` used in the global filters. However, if the global filter is used with a domaindecomposed model, it only initializes the size of the observation vector for the local model subdomain. This is different for the local filters, as the local analysis also requires observational data from neighboring model subdomains. Anyway, one can base on an implemented routine `init_dim_obs` to implement `init_dim_obs_full`. 96 96 97 == `U_obs_op ` (obs_op.F90) ==97 == `U_obs_op_full` (obs_op_full.F90) == 98 98 99 This routine is used by all global filter algorithms (SEEK, SEIK, EnKF,ETKF).99 This routine is used by all local filter algorithms (LSEIK, LETKF). 100 100 101 101 The interface for this routine is: 102 102 {{{ 103 SUBROUTINE obs_op(step, dim_p, dim_obs_p, state_p, m_state_p) 104 103 SUBROUTINE obs_op_full(step, dim_p, dim_obs_f, state_p, m_state_f) 105 104 INTEGER, INTENT(in) :: step ! Currrent time step 106 105 INTEGER, INTENT(in) :: dim_p ! PElocal dimension of state 107 INTEGER, INTENT(in) :: dim_obs_ p ! Dimension ofobserved state106 INTEGER, INTENT(in) :: dim_obs_f ! Dimension of the full observed state 108 107 REAL, INTENT(in) :: state_p(dim_p) ! PElocal model state 109 REAL, INTENT(out) :: m_state_ p(dim_obs_p) ! PElocal observed state108 REAL, INTENT(out) :: m_state_f(dim_obs_f) ! Full observed state 110 109 }}} 111 110 112 The 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`. 113 114 For a model using domain decomposition, the operation is on the PElocal subdomain of the model and has to provide the observed substate for the PElocal domain. 111 The routine is called during the analysis step, before the loop over the local analysis domain is entered. 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_f`. It is the observed state corresponding to the 'full' observation vector. 115 112 116 113 Hint: 117 114 * If the observation operator involves a global operation, e.g. some global integration, while using domaindecompostion one has to gather the information from the other model domains using MPI communication. 115 * Analogously to the situation with `init_dim_obs_full`, the routine is similar to `init_dim_obs` used for the global filters. However, with a domaindecompoared model also here `m_state_f` will contain parts of the state vector from neighboring model subdomains. To make these parts accessible, some parallel communication will be necessary (The state information for a neighboring model subdomain, will be in the memory of the process that handles that subdomain). The example implementation in `testsuite/dummymodel_1d` uses the function `MPI_AllGatherV` for this communication. 118 116 119 == `U_init_obs ` (init_obs.F90) ==117 == `U_init_obs_full` (init_obs_full.F90) == 120 118 121 This routine is used by all global filter algorithms (SEEK, SEIK, EnKF,ETKF).119 This routine is used by all local filter algorithms (LSEIK, LETKF). 122 120 123 121 The interface for this routine is: 124 122 {{{ 125 SUBROUTINE init_obs (step, dim_obs_p, observation_p)123 SUBROUTINE init_obs_full(step, dim_obs_f, observation_f) 126 124 127 125 INTEGER, INTENT(in) :: step ! Current time step 128 INTEGER, INTENT(in) :: dim_obs_ p ! PElocal dimension of obs.vector129 REAL, INTENT(out) :: observation_ p(dim_obs_p) ! PElocal observation vector126 INTEGER, INTENT(in) :: dim_obs_f ! Dimension of full observation vector 127 REAL, INTENT(out) :: observation_f(dim_obs_f) ! Full observation vector 130 128 }}} 131 129 132 The routine is called during the analysis step .133 It has to provide the vector of observations in `observation_p` for the current time step.130 The routine is called during the analysis step before the loop over the local analysis domains is entered. 131 It has to provide the full vector of observations in `observation_f` for the current time step. 134 132 135 For a model using domain decomposition, the vector of observations that exist on the model subdomain for the calling process has to be initialized. 136 133 Hints: 134 * As for the other 'full' routines: While the global counterpart of this routine (`init_obs`) has to initialize the observation vector for the local model subdomain, the 'full' routine has to include observations that spatially belong to neighboring model subdomains. As an easy choice one can simply initialize a vector of all globally available observations. 137 135 138 136 == `U_prodRinvA` (prodrinva.F90) ==