47 | | SUBROUTINE PDAF_put_state_letkf(U_collect_state, U_init_dim_obs_full, U_obs_op_full, U_init_obs_full, & |
48 | | U_init_obs_local, U_prepoststep, U_prodRinvA_local, U_init_n_domains, & |
49 | | U_init_dim_local, U_init_dim_obs_local, & |
50 | | U_global2local_state, U_local2glocal_state, U_glocal2local_obs, & |
51 | | U_init_obsvar, U_init_obsvar_local, status) |
| 47 | SUBROUTINE PDAF_put_state_letkf(U_collect_state, U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, & |
| 48 | U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains, & |
| 49 | U_init_dim_l, U_init_dim_obs_l, & |
| 50 | U_g2l_state, U_l2g_state, U_g2l_obs, & |
| 51 | U_init_obsvar, U_init_obsvar_l, status) |
55 | | * [#U_init_dim_obs_fullinit_dim_obs_full_pdaf.F90 U_init_dim_obs_full]: The name of the user-supplied routine that provides the size of the full observation vector |
56 | | * [#U_obs_op_fullobs_op_full_pdaf.F90 U_obs_op_full]: The name of the user-supplied routine that acts as the full observation operator on some state vector |
57 | | * [#U_init_obs_fullinit_obs_full_pdaf.F90 U_init_obs_full]: The name of the user-supplied routine that initializes the full vector of observations |
58 | | * [#U_init_obs_localinit_obs_local_pdaf.F90 U_init_obs_local]: The name of the user-supplied routine that initializes the vector of observations for a local analysis domain |
| 55 | * [#U_init_dim_obs_finit_dim_obs_f_pdaf.F90 U_init_dim_obs_f]: The name of the user-supplied routine that provides the size of the full observation vector |
| 56 | * [#U_obs_op_fobs_op_f_pdaf.F90 U_obs_op_f]: The name of the user-supplied routine that acts as the full observation operator on some state vector |
| 57 | * [#U_init_obs_finit_obs_f_pdaf.F90 U_init_obs_f]: The name of the user-supplied routine that initializes the full vector of observations |
| 58 | * [#U_init_obs_linit_obs_l_pdaf.F90 U_init_obs_l]: The name of the user-supplied routine that initializes the vector of observations for a local analysis domain |
62 | | * [#U_init_dim_localinit_dim_local_pdaf.F90 U_init_dim_local]: The name of the routine that provides the state dimension for a local analysis domain |
63 | | * [#U_init_dim_obs_localinit_dim_obs_local_pdaf.F90 U_init_dim_obs_local]: The name of the routine that initializes the size of the observation vector for a local analysis domain |
64 | | * [#U_global2local_stateglobal2local_state_pdaf.F90 U_global2local_state]: The name of the routine that initializes a local state vector from the global state vector |
65 | | * [#U_local2global_statelocal2global_state_pdaf.F90 U_local2global_state]: The name of the routine that initializes the corresponding part of the global state vector from the the provided local state vector |
66 | | * [#U_global2local_obsglobal2local_obs_pdaf.F90 U_global2local_obs]: The name of the routine that initializes a local observation vector from a full observation vector |
| 62 | * [#U_init_dim_linit_dim_l_pdaf.F90 U_init_dim_l]: The name of the routine that provides the state dimension for a local analysis domain |
| 63 | * [#U_init_dim_obs_linit_dim_obs_l_pdaf.F90 U_init_dim_obs_l]: The name of the routine that initializes the size of the observation vector for a local analysis domain |
| 64 | * [#U_g2l_stateg2l_state_pdaf.F90 U_g2l_state]: The name of the routine that initializes a local state vector from the global state vector |
| 65 | * [#U_l2g_statel2g_state_pdaf.F90 U_l2g_state]: The name of the routine that initializes the corresponding part of the global state vector from the the provided local state vector |
| 66 | * [#U_g2l_obsg2l_obs_pdaf.F90 U_g2l_obs]: The name of the routine that initializes a local observation vector from a full observation vector |
88 | | === `U_init_dim_obs_full` (init_dim_obs_full_pdaf.F90) === |
89 | | |
90 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
91 | | |
92 | | The interface for this routine is: |
93 | | {{{ |
94 | | SUBROUTINE init_dim_obs_full(step, dim_obs_f) |
| 88 | === `U_init_dim_obs_f` (init_dim_obs_f_pdaf.F90) === |
| 89 | |
| 90 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 91 | |
| 92 | The interface for this routine is: |
| 93 | {{{ |
| 94 | SUBROUTINE init_dim_obs_f(step, dim_obs_f) |
104 | | * The routine is similar to `init_dim_obs` used in the global filters. However, if the global filter is used with a domain-decomposed model, it only initializes the size of the observation vector for the local model sub-domain. This is different for the local filters, as the local analysis also requires observational data from neighboring model sub-domains. Nonetheless, one can base on an implemented routine `init_dim_obs` to implement `init_dim_obs_full`. |
105 | | |
106 | | === `U_obs_op_full` (obs_op_full_pdaf.F90) === |
107 | | |
108 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
109 | | |
110 | | The interface for this routine is: |
111 | | {{{ |
112 | | SUBROUTINE obs_op_full(step, dim_p, dim_obs_f, state_p, m_state_f) |
| 104 | * The routine is similar to `init_dim_obs` used in the global filters. However, if the global filter is used with a domain-decomposed model, it only initializes the size of the observation vector for the local model sub-domain. This is different for the local filters, as the local analysis also requires observational data from neighboring model sub-domains. Nonetheless, one can base on an implemented routine `init_dim_obs` to implement `init_dim_obs_f`. |
| 105 | |
| 106 | === `U_obs_op_f` (obs_op_f_pdaf.F90) === |
| 107 | |
| 108 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 109 | |
| 110 | The interface for this routine is: |
| 111 | {{{ |
| 112 | SUBROUTINE obs_op_f(step, dim_p, dim_obs_f, state_p, m_state_f) |
147 | | === `U_init_obs_local` (init_obs_local_pdaf.F90) === |
148 | | |
149 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
150 | | |
151 | | The interface for this routine is: |
152 | | {{{ |
153 | | SUBROUTINE init_obs_local(domain_p, step, dim_obs_l, observation_l) |
| 147 | === `U_init_obs_l` (init_obs_l_pdaf.F90) === |
| 148 | |
| 149 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 150 | |
| 151 | The interface for this routine is: |
| 152 | {{{ |
| 153 | SUBROUTINE init_obs_l(domain_p, step, dim_obs_l, observation_l) |
165 | | * For parallel efficiency, the LETKF algorithm is implemented in a way that first the full vectors are initialized. These are then restricted to the local analysis domain during the loop over all local analysis domains. Thus, if the full vector of observations has been initialized before `U_init_obs_local` is executed (e.g. by `U_init_dim_obs_full`), the operations performed in this routine will be to select the part of the full observation vector that is relevant for the current local analysis domain. |
166 | | * The routine `U_init_dim_obs_local` is executed before this routine. Thus, if that routine already prepares the information which elements of `observation_f` are needed for `observation_l`, this information can be used efficiently here. |
| 165 | * For parallel efficiency, the LETKF algorithm is implemented in a way that first the full vectors are initialized. These are then restricted to the local analysis domain during the loop over all local analysis domains. Thus, if the full vector of observations has been initialized before `U_init_obs_l` is executed (e.g. by `U_init_dim_obs_f`), the operations performed in this routine will be to select the part of the full observation vector that is relevant for the current local analysis domain. |
| 166 | * The routine `U_init_dim_obs_l` is executed before this routine. Thus, if that routine already prepares the information which elements of `observation_f` are needed for `observation_l`, this information can be used efficiently here. |
252 | | === `U_init_dim_local` (init_dim_local_pdaf.F90) === |
253 | | |
254 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
255 | | |
256 | | The interface for this routine is: |
257 | | {{{ |
258 | | SUBROUTINE init_dim_local(step, domain_p, dim_l) |
| 252 | === `U_init_dim_l` (init_dim_l_pdaf.F90) === |
| 253 | |
| 254 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 255 | |
| 256 | The interface for this routine is: |
| 257 | {{{ |
| 258 | SUBROUTINE init_dim_l(step, domain_p, dim_l) |
272 | | === `U_init_dim_obs_local` (init_dim_obs_local_pdaf.F90) === |
273 | | |
274 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
275 | | |
276 | | The interface for this routine is: |
277 | | {{{ |
278 | | SUBROUTINE init_dim_obs_local(domain_p, step, dim_obs_f, dim_obs_l) |
| 272 | === `U_init_dim_obs_l` (init_dim_obs_l_pdaf.F90) === |
| 273 | |
| 274 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 275 | |
| 276 | The interface for this routine is: |
| 277 | {{{ |
| 278 | SUBROUTINE init_dim_obs_l(domain_p, step, dim_obs_f, dim_obs_l) |
291 | | * In the loop over the local analysis domains, the routine is always called before `U_init_obs_local` is executed. Thus, as `U_init_dim_obs_local` has to check which observations should be used for the local analysis domain, one can already initialize an integer array that stores the index of observations to be considered. This index should be the position of the observation in the array `observation_f`. With this, the initialization of the local observation vector in `U_init_obs_local` can be sped up. |
292 | | * For PDAF, we could not join the routines `U_init_dim_obs_local` and `U_init_obs_local`, because the array for the local observations is allocated internally to PDAF after its size has been determined in `U_init_dim_obs_local`. |
| 291 | * In the loop over the local analysis domains, the routine is always called before `U_init_obs_l` is executed. Thus, as `U_init_dim_obs_local` has to check which observations should be used for the local analysis domain, one can already initialize an integer array that stores the index of observations to be considered. This index should be the position of the observation in the array `observation_f`. With this, the initialization of the local observation vector in `U_init_obs_l` can be sped up. |
| 292 | * For PDAF, we could not join the routines `U_init_dim_obs_l` and `U_init_obs_l`, because the array for the local observations is allocated internally to PDAF after its size has been determined in `U_init_dim_obs_l`. |
317 | | === `U_local2global_state` (local2global_state_pdaf.F90) === |
318 | | |
319 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
320 | | |
321 | | The interface for this routine is: |
322 | | {{{ |
323 | | SUBROUTINE local2global_state(step, domain_p, dim_l, state_l, dim_p, state_p) |
| 317 | === `U_l2g_state` (l2g_state_pdaf.F90) === |
| 318 | |
| 319 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 320 | |
| 321 | The interface for this routine is: |
| 322 | {{{ |
| 323 | SUBROUTINE l2g_state(step, domain_p, dim_l, state_l, dim_p, state_p) |
339 | | === `U_global2local_obs` (global2local_obs_pdaf.F90) === |
340 | | |
341 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
342 | | |
343 | | The interface for this routine is: |
344 | | {{{ |
345 | | SUBROUTINE global2local_obs(domain_p, step, dim_obs_f, dim_obs_l, mstate_f, mstate_l) |
| 339 | === `U_g2l_obs` (g2l_obs_pdaf.F90) === |
| 340 | |
| 341 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 342 | |
| 343 | The interface for this routine is: |
| 344 | {{{ |
| 345 | SUBROUTINE g2l_obs(domain_p, step, dim_obs_f, dim_obs_l, mstate_f, mstate_l) |
416 | | 1. [#U_init_dim_obs_fullinit_dim_obs_full_pdaf.F90 U_init_dim_obs_full] |
417 | | 1. [#U_obs_op_fullobs_op_full_pdaf.F90 U_obs_op_full] (Called `dim_ens` times; once for each ensemble member) |
418 | | 1. [#U_init_obs_fullinit_obs_full_pdaf.F90 U_init_obs_full] (Only executed, if the global adaptive forgetting factor is used (`type_forget=1` in the example implemention)) |
| 416 | 1. [#U_init_dim_obs_finit_dim_obs_f_pdaf.F90 U_init_dim_obs_f] |
| 417 | 1. [#U_obs_op_fobs_op_f_pdaf.F90 U_obs_op_f] (Called `dim_ens` times; once for each ensemble member) |
| 418 | 1. [#U_init_obs_finit_obs_f_pdaf.F90 U_init_obs_f] (Only executed, if the global adaptive forgetting factor is used (`type_forget=1` in the example implemention)) |
422 | | 1. [#U_init_dim_localinit_dim_local_pdaf.F90 U_init_dim_local] |
423 | | 1. [#U_init_dim_obs_localinit_dim_obs_local_pdaf.F90 U_init_dim_obs_local] |
424 | | 1. [#U_global2local_stateglobal2local_state_pdaf.F90 U_global2local_state] (Called `dim_ens+1` times: Once for each ensemble member and once for the mean state estimate) |
425 | | 1. [#U_global2local_obsglobal2local_obs_pdaf.F90 U_global2local_obs] (A single call to localize the mean observed state) |
426 | | 1. [#U_init_obs_localinit_obs_local_pdaf.F90 U_init_obs_local] |
427 | | 1. [#U_global2local_obsglobal2local_obs_pdaf.F90 U_global2local_obs] (`dim_ens` calls: one call to localize the observed part of each ensemble member) |
428 | | 1. [#U_init_obsvar_localinit_obsvar_local_pdaf.F90 U_init_obsvar_local] (Only called, if the local adaptive forgetting factor is used (`type_forget=2` in the example implementation)) |
429 | | 1. [#U_prodRinvA_localprodrinva_local_pdaf.F90 U_prodRinvA_local] |
430 | | 1. [#U_local2global_statelocal2global_state_pdaf.F90 U_local2global_state] (Called `dim_ens+1` times: Once for each ensemble member and once for the mean state estimate) |
| 422 | 1. [#U_init_dim_linit_dim_l_pdaf.F90 U_init_dim_l] |
| 423 | 1. [#U_init_dim_obs_linit_dim_obs_l_pdaf.F90 U_init_dim_obs_l] |
| 424 | 1. [#U_g2l_stateg2l_state_pdaf.F90 U_g2l_state] (Called `dim_ens+1` times: Once for each ensemble member and once for the mean state estimate) |
| 425 | 1. [#U_g2l_obsg2l_obs_pdaf.F90 U_g2l_obs] (A single call to localize the mean observed state) |
| 426 | 1. [#U_init_obs_linit_obs_l_pdaf.F90 U_init_obs_l] |
| 427 | 1. [#U_g2l_obsg2l_obs_pdaf.F90 U_g2l_obs] (`dim_ens` calls: one call to localize the observed part of each ensemble member) |
| 428 | 1. [#U_init_obsvar_linit_obsvar_l_pdaf.F90 U_init_obsvar_l] (Only called, if the local adaptive forgetting factor is used (`type_forget=2` in the example implementation)) |
| 429 | 1. [#U_prodRinvA_lprodrinva_l_pdaf.F90 U_prodRinvA_l] |
| 430 | 1. [#U_l2g_statel2g_state_pdaf.F90 U_l2g_state] (Called `dim_ens+1` times: Once for each ensemble member and once for the mean state estimate) |