48 | | SUBROUTINE PDAF_put_state_lseik(U_collect_state, U_init_dim_obs_full, U_obs_op_full, U_init_obs_full, & |
49 | | U_init_obs_local, U_prepoststep, U_prodRinvA_local, U_init_n_domains, & |
50 | | U_init_dim_local, U_init_dim_obs_local, & |
51 | | U_global2local_state, U_local2glocal_state, U_glocal2local_obs, & |
52 | | U_init_obsvar, U_init_obsvar_local, status) |
| 48 | SUBROUTINE PDAF_put_state_lseik(U_collect_state, U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, & |
| 49 | U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains, & |
| 50 | U_init_dim_l, U_init_dim_obs_l, & |
| 51 | U_g2l_state, U_l2g_state, U_g2l_obs, & |
| 52 | U_init_obsvar, U_init_obsvar_l, status) |
55 | | * [#U_collect_statecollect_state.F90 U_collect_state]: The name of the user-supplied routine that initializes a state vector from the array holding the ensemble of model states from the model fields. This is basically the inverse operation to `U_distribute_state` used in [ModifyModelforEnsembleIntegration#PDAF_get_state PDAF_get_state] |
56 | | * [#U_init_dim_obs_fullinit_dim_obs_full.F90 U_init_dim_obs_full]: The name of the user-supplied routine that provides the size of the full observation vector |
57 | | * [#U_obs_op_fullobs_op_full.F90 U_obs_op_full]: The name of the user-supplied routine that acts as the full observation operator on some state vector |
58 | | * [#U_init_obs_fullinit_obs_full.F90 U_init_obs_full]: The name of the user-supplied routine that initializes the full vector of observations |
59 | | * [#U_init_obs_localinit_obs_local.F90 U_init_obs_local]: The name of the user-supplied routine that initializes the vector of observations for a local analysis domain |
60 | | * [#U_prepoststepprepoststep_seik.F90 U_prepoststep]: The name of the pre/poststep routine as in `PDAF_get_state` |
61 | | * [#U_prodRinvA_localprodrinva_local.F90 U_prodRinvA_local]: The name of the user-supplied routine that computes the product of the inverse of the observation error covariance matrix with some matrix provided to the routine by PDAF. |
62 | | * [#U_init_n_domainsinit_n_domains.F90 U_init_n_domains]: The name of the routine that provides the number of local analysis domains |
63 | | * [#U_init_dim_localinit_dim_local.F90 U_init_dim_local]: The name of the routine that provides the state dimension for a local analysis domain |
64 | | * [#U_init_dim_obs_localinit_dim_obs_local.F90 U_init_dim_obs_local]: The name of the routine that initializes the size of the observation vector for a local analysis domain |
65 | | * [#U_global2local_stateglobal2local_state.F90 U_global2local_state]: The name of the routine that initializes a local state vector from the global state vector |
66 | | * [#U_local2global_statelocal2global_state.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 |
67 | | * [#U_global2local_obsglobal2local_obs.F90 U_global2local_obs]: The name of the routine that initializes a local observation vector from a full observation vector |
68 | | * [#U_init_obsvarinit_obsvar.F90 U_init_obsvar]: The name of the user-supplied routine that provides a global mean observation error variance (This routine will only be executed, if an adaptive forgetting factor is used) |
69 | | * [#U_init_obsvar_localinit_obsvar_local.F90 U_init_obsvar_local]: The name of the user-supplied routine that provides a mean observation error variance for the local analysis domain (This routine will only be executed, if a local adaptive forgetting factor is used) |
| 55 | * [#U_collect_statecollect_state_pdaf.F90 U_collect_state]: The name of the user-supplied routine that initializes a state vector from the array holding the ensemble of model states from the model fields. This is basically the inverse operation to `U_distribute_state` used in [ModifyModelforEnsembleIntegration#PDAF_get_state PDAF_get_state] |
| 56 | * [#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 |
| 57 | * [#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 |
| 58 | * [#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 |
| 59 | * [#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 |
| 60 | * [#U_prepoststepprepoststep_seik_pdaf.F90 U_prepoststep]: The name of the pre/poststep routine as in `PDAF_get_state` |
| 61 | * [#U_prodRinvA_lprodrinva_l_pdaf.F90 U_prodRinvA_l]: The name of the user-supplied routine that computes the product of the inverse of the observation error covariance matrix with some matrix provided to the routine by PDAF. |
| 62 | * [#U_init_n_domainsinit_n_domains_pdaf.F90 U_init_n_domains]: The name of the routine that provides the number of local analysis domains |
| 63 | * [#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 |
| 64 | * [#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 |
| 65 | * [#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 |
| 66 | * [#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 |
| 67 | * [#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 |
| 68 | * [#U_init_obsvarinit_obsvar_pdaf.F90 U_init_obsvar]: The name of the user-supplied routine that provides a global mean observation error variance (This routine will only be executed, if an adaptive forgetting factor is used) |
| 69 | * [#U_init_obsvar_linit_obsvar_l_pdaf.F90 U_init_obsvar_l]: The name of the user-supplied routine that provides a mean observation error variance for the local analysis domain (This routine will only be executed, if a local adaptive forgetting factor is used) |
86 | | See the mape on [ModifyModelforEnsembleIntegration#U_collect_statecollect_state.F90 modifying the model code for the ensemble integration] for the description of this routine. |
87 | | |
88 | | |
89 | | === `U_init_dim_obs_full` (init_dim_obs_full.F90) === |
90 | | |
91 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
92 | | |
93 | | The interface for this routine is: |
94 | | {{{ |
95 | | SUBROUTINE init_dim_obs_full(step, dim_obs_f) |
| 86 | See the mape on [ModifyModelforEnsembleIntegration#U_collect_statecollect_state_pdaf.F90 modifying the model code for the ensemble integration] for the description of this routine. |
| 87 | |
| 88 | |
| 89 | === `U_init_dim_obs_f` (init_dim_obs_f_pdaf.F90) === |
| 90 | |
| 91 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 92 | |
| 93 | The interface for this routine is: |
| 94 | {{{ |
| 95 | SUBROUTINE init_dim_obs_f(step, dim_obs_f) |
105 | | * 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`. |
106 | | |
107 | | === `U_obs_op_full` (obs_op_full.F90) === |
108 | | |
109 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
110 | | |
111 | | The interface for this routine is: |
112 | | {{{ |
113 | | SUBROUTINE obs_op_full(step, dim_p, dim_obs_f, state_p, m_state_f) |
| 105 | * 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`. |
| 106 | |
| 107 | === `U_obs_op_f` (obs_op_f_pdaf.F90) === |
| 108 | |
| 109 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 110 | |
| 111 | The interface for this routine is: |
| 112 | {{{ |
| 113 | SUBROUTINE obs_op_f(step, dim_p, dim_obs_f, state_p, m_state_f) |
148 | | === `U_init_obs_local` (init_obs_local.F90) === |
149 | | |
150 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
151 | | |
152 | | The interface for this routine is: |
153 | | {{{ |
154 | | SUBROUTINE init_obs_local(domain_p, step, dim_obs_l, observation_l) |
| 148 | === `U_init_obs_l` (init_obs_l_pdaf.F90) === |
| 149 | |
| 150 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 151 | |
| 152 | The interface for this routine is: |
| 153 | {{{ |
| 154 | SUBROUTINE init_obs_l(domain_p, step, dim_obs_l, observation_l) |
166 | | * For parallel efficiency, the LSEIK 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. |
167 | | * 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. |
168 | | |
169 | | |
170 | | === `U_prepoststep` (prepoststep_seik.F90) === |
| 166 | * For parallel efficiency, the LSEIK 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. |
| 167 | * 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. |
| 168 | |
| 169 | |
| 170 | === `U_prepoststep` (prepoststep_seik_pdaf.F90) === |
253 | | === `U_init_dim_local` (init_dim_local.F90) === |
254 | | |
255 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
256 | | |
257 | | The interface for this routine is: |
258 | | {{{ |
259 | | SUBROUTINE init_dim_local(step, domain_p, dim_l) |
| 253 | === `U_init_dim_l` (init_dim_l_pdaf.F90) === |
| 254 | |
| 255 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 256 | |
| 257 | The interface for this routine is: |
| 258 | {{{ |
| 259 | SUBROUTINE init_dim_l(step, domain_p, dim_l) |
273 | | === `U_init_dim_obs_local` (init_dim_obs_local.F90) === |
274 | | |
275 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
276 | | |
277 | | The interface for this routine is: |
278 | | {{{ |
279 | | SUBROUTINE init_dim_obs_local(domain_p, step, dim_obs_f, dim_obs_l) |
| 273 | === `U_init_dim_obs_l` (init_dim_obs_l_pdaf.F90) === |
| 274 | |
| 275 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 276 | |
| 277 | The interface for this routine is: |
| 278 | {{{ |
| 279 | SUBROUTINE init_dim_obs_l(domain_p, step, dim_obs_f, dim_obs_l) |
292 | | * 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. |
293 | | * 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`. |
294 | | |
295 | | |
296 | | === `U_global2local_state` (global2local_state.F90) === |
297 | | |
298 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
299 | | |
300 | | The interface for this routine is: |
301 | | {{{ |
302 | | SUBROUTINE global2local_state(step, domain_p, dim_p, state_p, dim_l, state_l) |
| 292 | * 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_l` 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. |
| 293 | * 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`. |
| 294 | |
| 295 | |
| 296 | === `U_g2l_state` (g2l_state_pdaf.F90) === |
| 297 | |
| 298 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 299 | |
| 300 | The interface for this routine is: |
| 301 | {{{ |
| 302 | SUBROUTINE g2l_state(step, domain_p, dim_p, state_p, dim_l, state_l) |
318 | | === `U_local2global_state` (local2global_state.F90) === |
319 | | |
320 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
321 | | |
322 | | The interface for this routine is: |
323 | | {{{ |
324 | | SUBROUTINE local2global_state(step, domain_p, dim_l, state_l, dim_p, state_p) |
| 318 | === `U_l2g_state` (l2g_state_pdaf.F90) === |
| 319 | |
| 320 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 321 | |
| 322 | The interface for this routine is: |
| 323 | {{{ |
| 324 | SUBROUTINE l2g_state(step, domain_p, dim_l, state_l, dim_p, state_p) |
340 | | === `U_global2local_obs` (global2local_obs.F90) === |
341 | | |
342 | | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
343 | | |
344 | | The interface for this routine is: |
345 | | {{{ |
346 | | SUBROUTINE global2local_obs(domain_p, step, dim_obs_f, dim_obs_l, mstate_f, mstate_l) |
| 340 | === `U_g2l_obs` (g2l_obs_pdaf.F90) === |
| 341 | |
| 342 | This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. |
| 343 | |
| 344 | The interface for this routine is: |
| 345 | {{{ |
| 346 | SUBROUTINE g2l_obs(domain_p, step, dim_obs_f, dim_obs_l, mstate_f, mstate_l) |
359 | | * The vector `mstate_f` that is provided to the routine is one of the observed state vectors that are produced by `U_obs_op_full`. |
360 | | * Some operations performed here are analogous to those required to initialize a local vector of observations in `U_init_obs_l`. If that routine reads first a full vector of observations (e.g. in `U_init_dim_obs_full`), this vector has to be restricted to the relevant observations for the current local analysis domain. For this operation, one can for example initialize an index array when `U_init_dim_obs_local` is executed. (Which happens before `U_global2local_obs`) |
361 | | |
362 | | |
363 | | === `U_init_obsvar` (init_obsvar.F90) === |
| 359 | * The vector `mstate_f` that is provided to the routine is one of the observed state vectors that are produced by `U_obs_op_f`. |
| 360 | * Some operations performed here are analogous to those required to initialize a local vector of observations in `U_init_obs_l`. If that routine reads first a full vector of observations (e.g. in `U_init_dim_obs_f`), this vector has to be restricted to the relevant observations for the current local analysis domain. For this operation, one can for example initialize an index array when `U_init_dim_obs_l` is executed. (Which happens before `U_g2l_obs`) |
| 361 | |
| 362 | |
| 363 | === `U_init_obsvar` (init_obsvar_pdaf.F90) === |
415 | | 1. [#U_prepoststepprepoststep_seik.F90 U_prepoststep] (Call to act on the forecast ensemble, called with negative value of the time step) |
416 | | 1. [#U_init_n_domainsinit_n_domains.F90 U_init_n_domains] |
417 | | 1. [#U_init_dim_obs_fullinit_dim_obs_full.F90 U_init_dim_obs_full] |
418 | | 1. [#U_obs_op_fullobs_op_full.F90 U_obs_op_full] (Called `dim_ens` times; once for each ensemble member) |
419 | | 1. [#U_init_obs_fullinit_obs_full.F90 U_init_obs_full] (Only executed, if the global adaptive forgetting factor is used (`type_forget=1` in the example implemention)) |
420 | | 1. [#U_init_obsvarinit_obsvar.F90 U_init_obsvar] (Only executed, if the global adaptive forgetting factor is used (`type_forget=1` in the example implemention)) |
| 415 | 1. [#U_prepoststepprepoststep_seik_pdaf.F90 U_prepoststep] (Call to act on the forecast ensemble, called with negative value of the time step) |
| 416 | 1. [#U_init_n_domainsinit_n_domains_pdaf.F90 U_init_n_domains] |
| 417 | 1. [#U_init_dim_obs_finit_dim_obs_f_pdaf.F90 U_init_dim_obs_f] |
| 418 | 1. [#U_obs_op_fobs_op_f_pdaf.F90 U_obs_op_f] (Called `dim_ens` times; once for each ensemble member) |
| 419 | 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)) |
| 420 | 1. [#U_init_obsvarinit_obsvar_pdaf.F90 U_init_obsvar] (Only executed, if the global adaptive forgetting factor is used (`type_forget=1` in the example implemention)) |
423 | | 1. [#U_init_dim_localinit_dim_local.F90 U_init_dim_local] |
424 | | 1. [#U_init_dim_obs_localinit_dim_obs_local.F90 U_init_dim_obs_local] |
425 | | 1. [#U_global2local_stateglobal2local_state.F90 U_global2local_state] (Called `dim_ens+1` times: Once for each ensemble member and once for the mean state estimate) |
426 | | 1. [#U_global2local_obsglobal2local_obs.F90 U_global2local_obs] (A single call to localize the mean observed state) |
427 | | 1. [#U_init_obs_localinit_obs_local.F90 U_init_obs_local] |
428 | | 1. [#U_global2local_obsglobal2local_obs.F90 U_global2local_obs] (`dim_ens` calls: one call to localize the observed part of each ensemble member) |
429 | | 1. [#U_init_obsvar_localinit_obsvar_local.F90 U_init_obsvar_local] (Only called, if the local adaptive forgetting factor is used (`type_forget=2` in the example implementation)) |
430 | | 1. [#U_prodRinvA_localprodrinva_local.F90 U_prodRinvA_local] |
431 | | 1. [#U_local2global_statelocal2global_state.F90 U_local2global_state] (Called `dim_ens+1` times: Once for each ensemble member and once for the mean state estimate) |
| 423 | 1. [#U_init_dim_linit_dim_l_pdaf.F90 U_init_dim_l] |
| 424 | 1. [#U_init_dim_obs_linit_dim_obs_l_pdaf.F90 U_init_dim_obs_l] |
| 425 | 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) |
| 426 | 1. [#U_g2l_obsg2l_obs_pdaf.F90 U_g2l_obs] (A single call to localize the mean observed state) |
| 427 | 1. [#U_init_obs_linit_obs_l_pdaf.F90 U_init_obs_l] |
| 428 | 1. [#U_g2l_obsg2l_obs_pdaf.F90 U_g2l_obs] (`dim_ens` calls: one call to localize the observed part of each ensemble member) |
| 429 | 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)) |
| 430 | 1. [#U_prodRinvA_lprodrinva_l_pdaf.F90 U_prodRinvA_l] |
| 431 | 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) |