Changes between Version 13 and Version 14 of OMI_Callback_obs_pdafomi


Ignore:
Timestamp:
Nov 22, 2020, 10:24:20 AM (4 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OMI_Callback_obs_pdafomi

    v13 v14  
    1313== init_dim_obs_pdafomi ==
    1414
    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.
     15In 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.
    1616
    17 The implementation steps are:
     17The '''implementation steps''' are:
    18181. Include the observation-specific routine `init_dim_obs_TYPE` and the variable `assim_TYPE` from the observation-module with 'use'
    19191. Declare a dimension variable `dim_obs_TYPE` and initialize it to 0
     
    21211. add `dim_obs_TYPE` to the final sum computing `dim_obs`.
    2222
    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 lines
     23As 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
    2424{{{
    2525SUBROUTINE init_dim_obs_pdafomi(step, dim_obs)
     
    4747
    4848
    49 Notes:
     49'''Notes:'''
    5050 - 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.
    5151 - 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`.
     
    5757In this routine one just calls `obs_op_TYPE` for each observation type.
    5858
    59 The implementation steps are:
     59The '''implementation steps''' are:
    60601. Include the observation-specific routine `obs_op_TYPE` from the observation-module with 'use'
    61611. Add a call to the observation-specific routine `obs_op_TYPEz
    6262
    63 As an example, in `tutorial/online_2D_serialmodel_omi/` we have
     63As an '''example''', in `tutorial/online_2D_serialmodel_omi/` we have
    6464{{{
    6565SUBROUTINE obs_op_pdafomi(step, dim_p, dim_obs, state_p, ostate)
     
    7676}}}
    7777
    78 Notes:
     78'''Notes:'''
    7979 - The arguments in the calls to `obs_op_TYPE` are input argumnets to `obs_op_pdafomi`. They are just passed on.
    8080 - 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.
     
    8686In 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).
    8787
    88 The implementation steps are:
     88The '''implementation steps''' are:
    89891. Include the observation-specific routine `init_dim_obs_l_TYPE` from the observation-module with 'use'
    90901. Add a call to the observation-specific routine init_dim_obs_l_TYPE
    9191
    92 As an example, in `tutorial/online_2D_serialmodel_omi/` we have
     92As an '''example''', in `tutorial/online_2D_serialmodel_omi/` we have
    9393{{{
    9494SUBROUTINE init_dim_obs_l_pdafomi(domain_p, step, dim_obs, dim_obs_l)
     
    105105}}}
    106106
    107 Notes:
     107'''Notes:'''
    108108 - 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.
    109109
     
    112112In this routine one calls `localize_covar_TYPE` for each observation type. The routine is only required for the localized EnKF and performs covariance localization.
    113113
    114 The implementation steps are:
     114The '''implementation steps''' are:
    1151151. Include the observation-specific routine `localize_covar_TYPE` from the observation-module with 'use'
    1161161. Initialize the array `coords` which holds the coordinates of all elements of the state vector for the current process domain
    1171171. Add a call to the observation-specific routine localize_covar_TYPE
    118118
    119 As an example, in `tutorial/online_2D_serialmodel_omi/` we have
     119As an '''example''', in `tutorial/online_2D_serialmodel_omi/` we have
    120120{{{
    121121SUBROUTINE localize_covar_pdafomi(dim_p, dim_obs, HP_p, HPH)
     
    132132  coords_p = ...                     ! Initialize coords_p
    133133
    134 
    135134  CALL localize_covar_A(dim_p, dim_obs, HP_p, HPH, coords_p)
    136135  CALL localize_covar_B(dim_p, dim_obs, HP_p, HPH, coords_p)
     
    140139}}}
    141140
    142 Notes:
     141'''Notes:'''
    143142 - 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`.
    144143 - 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.
     
    148147The 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.
    149148
    150 The implementation steps are:
     149The '''implementation steps''' are:
    1511501. Include the observation-specific type `thisobs` from the observation-module with 'use' apply a name conversion like `obs_TYPE => thisobs`
    1521511. add a call to `PDAFomi_deallocate_obs` giving the observation-specific `obs_TYPE` as argument.
    1531521. To perform the deallocation, insert a call to deallocate_obs_pdafomi at the end of the routine `prepoststep_pdaf`.
    154153
    155 As an example, in `tutorial/online_2D_serialmodel_omi/` we have
     154As an '''example''', in `tutorial/online_2D_serialmodel_omi/` we have
    156155{{{
    157156SUBROUTINE deallocate_obs_pdafomi(step)