Changes between Version 4 and Version 5 of ImplementAnalysisletkf
- Timestamp:
- Sep 15, 2011, 3:34:06 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ImplementAnalysisletkf
v4 v5 52 52 }}} 53 53 with the following arguments: 54 * [#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]55 * [#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 vector56 * [#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 vector57 * [#U_init_obs_fullinit_obs_full .F90 U_init_obs_full]: The name of the user-supplied routine that initializes the full vector of observations58 * [#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 domain59 * [#U_prepoststepprepoststep_seik .F90 U_prepoststep]: The name of the pre/poststep routine as in `PDAF_get_state`60 * [#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.61 * [#U_init_n_domainsinit_n_domains .F90 U_init_n_domains]: The name of the routine that provides the number of local analysis domains62 * [#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 domain63 * [#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 domain64 * [#U_global2local_stateglobal2local_state .F90 U_global2local_state]: The name of the routine that initializes a local state vector from the global state vector65 * [#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 vector66 * [#U_global2local_obsglobal2local_obs .F90 U_global2local_obs]: The name of the routine that initializes a local observation vector from a full observation vector67 * [#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)68 * [#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)54 * [#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] 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 59 * [#U_prepoststepprepoststep_seik_pdaf.F90 U_prepoststep]: The name of the pre/poststep routine as in `PDAF_get_state` 60 * [#U_prodRinvA_localprodrinva_local_pdaf.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. 61 * [#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 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 67 * [#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) 68 * [#U_init_obsvar_localinit_obsvar_local_pdaf.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) 69 69 * `status`: The integer status flag. It is zero, if `PDAF_put_state_letkf` is exited without errors. 70 70 … … 76 76 Here, all user-supplied routines are described that are required in the call to `PDAF_put_state_letkf`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration]. 77 77 78 To indicate user-supplied routines we use the prefix `U_`. In the template directory `templates/` these routines are provided in files with the routine's name without this prefix. In the example implementation in `testsuite/src/dummymodel_1D`, the routines exist without the prefix, but with the extension `_ dummy_D.F90`. In the section titles below we provide the name of the template file in parentheses.78 To indicate user-supplied routines we use the prefix `U_`. In the template directory `templates/` these routines are provided in files with the routine's name without this prefix. In the example implementation in `testsuite/src/dummymodel_1D`, the routines exist without the prefix, but with the extension `_pdaf.F90`. In the section titles below we provide the name of the template file in parentheses. 79 79 80 80 In the subroutine interfaces some variables appear with the suffix `_p` (short for 'process'). This suffix indicates that the variable is particular to a model sub-domain, if a domain decomposed model is used. Thus, the value(s) in the variable will be different for different model sub-domains. In addition, there will be variables with the suffix `_f` (for 'full') and with the suffix `_l` (for 'local'). 81 81 82 === `U_collect_state` (collect_state .F90) ===82 === `U_collect_state` (collect_state_pdaf.F90) === 83 83 84 84 This routine is independent from the filter algorithm used. 85 See the mape on [ModifyModelforEnsembleIntegration#U_collect_statecollect_state .F90 modifying the model code for the ensemble integration] for the description of this routine.86 87 88 === `U_init_dim_obs_full` (init_dim_obs_full .F90) ===85 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. 86 87 88 === `U_init_dim_obs_full` (init_dim_obs_full_pdaf.F90) === 89 89 90 90 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. … … 104 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 105 106 === `U_obs_op_full` (obs_op_full .F90) ===106 === `U_obs_op_full` (obs_op_full_pdaf.F90) === 107 107 108 108 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. … … 112 112 SUBROUTINE obs_op_full(step, dim_p, dim_obs_f, state_p, m_state_f) 113 113 114 INTEGER, INTENT(in) :: step ! Curr rent time step114 INTEGER, INTENT(in) :: step ! Current time step 115 115 INTEGER, INTENT(in) :: dim_p ! PE-local dimension of state 116 116 INTEGER, INTENT(in) :: dim_obs_f ! Dimension of the full observed state … … 124 124 * The routine is similar to `init_dim_obs` used for the global filters. However, with a domain-decomposed model `m_state_f` will contain parts of the state vector from neighboring model sub-domains. To make these parts accessible, some parallel communication will be necessary (The state information for a neighboring model sub-domain, will be in the memory of the process that handles that sub-domain). The example implementation in `testsuite/dummymodel_1d` uses the function `MPI_AllGatherV` for this communication. 125 125 126 === `U_init_obs_full` (init_obs_full .F90) ===126 === `U_init_obs_full` (init_obs_full_pdaf.F90) === 127 127 128 128 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. … … 145 145 146 146 147 === `U_init_obs_local` (init_obs_local .F90) ===147 === `U_init_obs_local` (init_obs_local_pdaf.F90) === 148 148 149 149 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. … … 167 167 168 168 169 === `U_prepoststep` (prepoststep_seik .F90) ===169 === `U_prepoststep` (prepoststep_seik_pdaf.F90) === 170 170 171 171 This routine can generally be identical to that used for the global SEIK filter, which has already been described on the [ModifyModelforEnsembleIntegration#U_prepoststepprepoststep_seik.F90 page on modifying the model code for the ensemble integration]. For completeness, the description is repeated: … … 203 203 204 204 205 === `U_prodRinvA_local` (prodrinva_local .F90) ===205 === `U_prodRinvA_local` (prodrinva_local_pdaf.F90) === 206 206 207 207 This routine is used by the local filters (LSEIK and LETKF). There is a slight difference between LSEIK and LETKF for this routine, which is described below. … … 231 231 232 232 233 === `U_init_n_domains` (init_n_domains .F90) ===233 === `U_init_n_domains` (init_n_domains_pdaf.F90) === 234 234 235 235 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. … … 250 250 251 251 252 === `U_init_dim_local` (init_dim_local .F90) ===252 === `U_init_dim_local` (init_dim_local_pdaf.F90) === 253 253 254 254 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. … … 270 270 271 271 272 === `U_init_dim_obs_local` (init_dim_obs_local .F90) ===272 === `U_init_dim_obs_local` (init_dim_obs_local_pdaf.F90) === 273 273 274 274 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. … … 293 293 294 294 295 === `U_global2local_state` (global2local_state .F90) ===295 === `U_global2local_state` (global2local_state_pdaf.F90) === 296 296 297 297 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. … … 315 315 316 316 317 === `U_local2global_state` (local2global_state .F90) ===317 === `U_local2global_state` (local2global_state_pdaf.F90) === 318 318 319 319 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. … … 337 337 338 338 339 === `U_global2local_obs` (global2local_obs .F90) ===339 === `U_global2local_obs` (global2local_obs_pdaf.F90) === 340 340 341 341 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. … … 360 360 361 361 362 === `U_init_obsvar` (init_obsvar .F90) ===362 === `U_init_obsvar` (init_obsvar_pdaf.F90) === 363 363 364 364 This routine is used by the global filter algorithms SEIK and ETKF as well as the local filters LSEIK and LETKF. The routine is only called if the adaptive forgetting factor is used (`type_forget=1` in the example implementation). The difference in this routine between global and local filters is that the global filters use 'global' while the local filters use 'full' quantities. … … 384 384 385 385 386 === `U_init_obsvar_local` (init_obsvar_local .F90) ===386 === `U_init_obsvar_local` (init_obsvar_local_pdaf.F90) === 387 387 388 388 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm. The routine is only called if the local adaptive forgetting factor is used (`type_forget=2` in the example implementation). … … 409 409 410 410 Before the analysis step is called the following is executed: 411 1. [#U_collect_statecollect_state .F90 U_collect_state] (called once for each ensemble member)411 1. [#U_collect_statecollect_state_pdaf.F90 U_collect_state] (called once for each ensemble member) 412 412 413 413 When the ensemble integration of the forecast is completed, the analysis step is executed. Before the loop over all local analysis domains, the following routines are executed: 414 1. [#U_prepoststepprepoststep_seik .F90 U_prepoststep] (Call to act on the forecast ensemble, called with negative value of the time step)415 1. [#U_init_n_domainsinit_n_domains .F90 U_init_n_domains]416 1. [#U_init_dim_obs_fullinit_dim_obs_full .F90 U_init_dim_obs_full]417 1. [#U_obs_op_fullobs_op_full .F90 U_obs_op_full] (Called `dim_ens` times; once for each ensemble member)418 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))419 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))414 1. [#U_prepoststepprepoststep_seik_pdaf.F90 U_prepoststep] (Call to act on the forecast ensemble, called with negative value of the time step) 415 1. [#U_init_n_domainsinit_n_domains_pdaf.F90 U_init_n_domains] 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)) 419 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)) 420 420 421 421 In the loop over all local analysis domains, it is executed for each local analysis domain: 422 1. [#U_init_dim_localinit_dim_local .F90 U_init_dim_local]423 1. [#U_init_dim_obs_localinit_dim_obs_local .F90 U_init_dim_obs_local]424 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)425 1. [#U_global2local_obsglobal2local_obs .F90 U_global2local_obs] (A single call to localize the mean observed state)426 1. [#U_init_obs_localinit_obs_local .F90 U_init_obs_local]427 1. [#U_global2local_obsglobal2local_obs .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 .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 .F90 U_prodRinvA_local]430 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)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) 431 431 432 432 After the loop over all local analysis domains, it is executed: 433 1. [#U_prepoststepprepoststep_seik .F90 U_prepoststep] (Call to act on the analysis ensemble, called with (positive) value of the time step)434 435 436 433 1. [#U_prepoststepprepoststep_seik_pdaf.F90 U_prepoststep] (Call to act on the analysis ensemble, called with (positive) value of the time step) 434 435 436