Changes between Version 13 and Version 14 of OMI_Callback_obs_pdafomi
- Timestamp:
- Nov 22, 2020, 10:24:20 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OMI_Callback_obs_pdafomi
v13 v14 13 13 == init_dim_obs_pdafomi == 14 14 15 15 In this routine we declare a dimension variable `dim_obs_TYPE` for each observation type. This is initialized by the corresponding routine `init_dim_obs_TYPE`. The sum of these individual dimensions yields the total number of observations, which is returned to PDAF. 16 16 17 The implementation stepsare:17 The '''implementation steps''' are: 18 18 1. Include the observation-specific routine `init_dim_obs_TYPE` and the variable `assim_TYPE` from the observation-module with 'use' 19 19 1. Declare a dimension variable `dim_obs_TYPE` and initialize it to 0 … … 21 21 1. add `dim_obs_TYPE` to the final sum computing `dim_obs`. 22 22 23 As an example, in `tutorial/online_2D_serialmodel_omi/` we have three observations, named A, B, and C. In `init_dim_obs_pdafomi` we find the lines23 As an '''example''', in `tutorial/online_2D_serialmodel_omi/` we have three observations, named A, B, and C. In `init_dim_obs_pdafomi` we find the lines 24 24 {{{ 25 25 SUBROUTINE init_dim_obs_pdafomi(step, dim_obs) … … 47 47 48 48 49 Notes: 49 '''Notes:''' 50 50 - The variable `assim_TYPE` indicates whether a particular observation type is assimilated. It is usually set in `init_pdaf`, or by reading from the command line or a namelist file. 51 51 - The obs-module can have either a specific name for `init_dim_obs_TYPE` or a generic name. If the generic name `init_dim_obs` is used one can apply a name conversion `init_dim_obs_TYPE => init_dim_obs`. … … 57 57 In this routine one just calls `obs_op_TYPE` for each observation type. 58 58 59 The implementation stepsare:59 The '''implementation steps''' are: 60 60 1. Include the observation-specific routine `obs_op_TYPE` from the observation-module with 'use' 61 61 1. Add a call to the observation-specific routine `obs_op_TYPEz 62 62 63 As an example, in `tutorial/online_2D_serialmodel_omi/` we have63 As an '''example''', in `tutorial/online_2D_serialmodel_omi/` we have 64 64 {{{ 65 65 SUBROUTINE obs_op_pdafomi(step, dim_p, dim_obs, state_p, ostate) … … 76 76 }}} 77 77 78 Notes: 78 '''Notes:''' 79 79 - The arguments in the calls to `obs_op_TYPE` are input argumnets to `obs_op_pdafomi`. They are just passed on. 80 80 - The order of the calls to `obs_op_TYPE` is not relevant because the setup of the overall full observation vector is defined by the order of the calls in init_dim_obs_pdafomi. Anyway, it's good practice to keep the order of the calls consistent. … … 86 86 In this routine one just calls `init_dim_obs_l_TYPE` for each observation type. The routine is only required for domain-localized filters (like LESTKF, LETKF, LNETF). 87 87 88 The implementation stepsare:88 The '''implementation steps''' are: 89 89 1. Include the observation-specific routine `init_dim_obs_l_TYPE` from the observation-module with 'use' 90 90 1. Add a call to the observation-specific routine init_dim_obs_l_TYPE 91 91 92 As an example, in `tutorial/online_2D_serialmodel_omi/` we have92 As an '''example''', in `tutorial/online_2D_serialmodel_omi/` we have 93 93 {{{ 94 94 SUBROUTINE init_dim_obs_l_pdafomi(domain_p, step, dim_obs, dim_obs_l) … … 105 105 }}} 106 106 107 Notes: 107 '''Notes:''' 108 108 - The order of the calls to `init_dim_obs_l_TYPE` defines the order in which the observations are stored in the local observation vector. The calling order does not need to be the same as in the other routines, but it's good practive to keep the order of the calls consistent. 109 109 … … 112 112 In this routine one calls `localize_covar_TYPE` for each observation type. The routine is only required for the localized EnKF and performs covariance localization. 113 113 114 The implementation stepsare:114 The '''implementation steps''' are: 115 115 1. Include the observation-specific routine `localize_covar_TYPE` from the observation-module with 'use' 116 116 1. Initialize the array `coords` which holds the coordinates of all elements of the state vector for the current process domain 117 117 1. Add a call to the observation-specific routine localize_covar_TYPE 118 118 119 As an example, in `tutorial/online_2D_serialmodel_omi/` we have119 As an '''example''', in `tutorial/online_2D_serialmodel_omi/` we have 120 120 {{{ 121 121 SUBROUTINE localize_covar_pdafomi(dim_p, dim_obs, HP_p, HPH) … … 132 132 coords_p = ... ! Initialize coords_p 133 133 134 135 134 CALL localize_covar_A(dim_p, dim_obs, HP_p, HPH, coords_p) 136 135 CALL localize_covar_B(dim_p, dim_obs, HP_p, HPH, coords_p) … … 140 139 }}} 141 140 142 Notes: 141 '''Notes:''' 143 142 - Instead of allocating and filling the coordinate array `coords_p` in this routine one could also do it once in `init_pdaf` and declare the array in the module `mod_assimilation`. 144 143 - The order of the calls to `obs_op_TYPE` is not relevant because the setup of the overall full observation vector is defined by the order of the calls in init_dim_obs_pdafomi. Anyway, it's good practice to keep the order of the calls consistent. … … 148 147 The file callback_obs_pdafomi.F90 also contains a routine deallocate_obs_pdafomi. Each obs-module allocates arrays in the observation type `obs_f` and `deallocate_obs_pdafomi` is used to deallocate the different observation-specific arrays after the analysis step. 149 148 150 The implementation stepsare:149 The '''implementation steps''' are: 151 150 1. Include the observation-specific type `thisobs` from the observation-module with 'use' apply a name conversion like `obs_TYPE => thisobs` 152 151 1. add a call to `PDAFomi_deallocate_obs` giving the observation-specific `obs_TYPE` as argument. 153 152 1. To perform the deallocation, insert a call to deallocate_obs_pdafomi at the end of the routine `prepoststep_pdaf`. 154 153 155 As an example, in `tutorial/online_2D_serialmodel_omi/` we have154 As an '''example''', in `tutorial/online_2D_serialmodel_omi/` we have 156 155 {{{ 157 156 SUBROUTINE deallocate_obs_pdafomi(step)