Changes between Version 1 and Version 2 of ImplementAnalysis_Hyb3DVar_classical
 Timestamp:
 Dec 9, 2021, 1:06:01 PM (2 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

ImplementAnalysis_Hyb3DVar_classical
v1 v2 148 148 === `PDAF_put_state_hyb3dvar_estkf` === 149 149 150 The interface of this routine is analogous to that of `PDAF_assimilate_ en3dvar_estkf'. Thus it is identical to this routine with the exception the specification of the usersupplied routines `U_distribute_state` and `U_next_observation` are missing.150 The interface of this routine is analogous to that of `PDAF_assimilate_hyb3dvar_estkf'. Thus it is identical to this routine with the exception the specification of the usersupplied routines `U_distribute_state` and `U_next_observation` are missing. 151 151 152 152 The interface when using one of the global filters is the following: … … 160 160 == Usersupplied routines == 161 161 162 Here all usersupplied routines are described that are required in the calls to `PDAF_assimilate_ en3dvar_*` and `PDAF_put_state_en3dvar_*`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration].162 Here all usersupplied routines are described that are required in the calls to `PDAF_assimilate_hyb3dvar_*` and `PDAF_put_state_hyb3dvar_*`. For some of the generic routines, we link to the page on [ModifyModelforEnsembleIntegration modifying the model code for the ensemble integration]. 163 163 164 164 To indicate usersupplied routines we use the prefix `U_`. In the template directory `templates/` as well as in the example implementation in `testsuite/src/dummymodel_1D` these 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. … … 184 184 === `U_init_dim_obs` (init_dim_obs_pdaf.F90) === 185 185 186 This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF ).186 This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF, NETF, PF) and the 3DVar methods. 187 187 188 188 The interface for this routine is: … … 202 202 === `U_obs_op` (obs_op_pdaf.F90) === 203 203 204 This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF ).204 This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF, NETF, PF) and the 3DVar methods. 205 205 206 206 The interface for this routine is: … … 225 225 === `U_init_obs` (init_obs_pdaf.F90) === 226 226 227 This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF ).227 This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF, NETF, PF) and the 3DVar methods. 228 228 229 229 The interface for this routine is: … … 266 266 * The routine does not require that the product is implemented as a real matrixmatrix product. Rather, the product can be implemented in its most efficient form. For example, if the observation error covariance matrix is diagonal, only the multiplication of the diagonal with matrix `A_p` has to be implemented. 267 267 * The observation vector `obs_p` is provided through the interface for cases where the observation error variance is relative to the actual value of the observations. 268 * The interface has a difference for SEIK and ETKF: For ETKF the third argument is the ensemble size (`dim_ens`), while for SEIK it is the rank of the covariance matrix (usually ensemble size minus one). In addition, the second dimension of `A_p` and `C_p` has size `dim_ens` for ETKF, while it is `rank` for the SEIK filter. (Practically, one can usually ignore this difference as the fourth argument of the interface can be named arbitrarily in the routine.)268 * The interface has a difference for ESTKF/SEIK and ETKF: For ETKF the third argument is the ensemble size (`dim_ens`), while for ESTKF and SEIK it is the rank of the covariance matrix (usually ensemble size minus one). In addition, the second dimension of `A_p` and `C_p` has size `dim_ens` for ETKF, while it is `rank` for the ESTKF and SEIK filters. (Practically, one can usually ignore this difference as the fourth argument of the interface can be named arbitrarily in the routine.) 269 269 270 270 … … 286 286 287 287 The routine is called during the analysis step during the iterative minimization of the cost function. 288 It has to apply the control vector transformation to the control vector and return the transformed result vector. Usually this transformation is the multiplication with the squareroot of the background error covariance matrix '''B'''. For the 3D Ensemble Var,this square root is usually expressed through the ensemble.288 It has to apply the control vector transformation to the control vector and return the transformed result vector. Usually this transformation is the multiplication with the squareroot of the background error covariance matrix '''B'''. For the hybrid 3DVar, a part of this square root is usually expressed through the ensemble. 289 289 290 290 If the control vector is decomposed in case of parallelization it first needs to the gathered on each processor and afterwards the transformation is computed on the potentially domaindecomposed state vector. … … 307 307 308 308 The routine is called during the analysis step during the iterative minimization of the cost function. 309 It has to apply the adjoint control vector transformation to a state vector and return the control vector. Usually this transformation is the multiplication with transpose of the squareroot of the background error covariance matrix '''B'''. or the 3D Ensemble Var,this square root is usually expressed through the ensemble.309 It has to apply the adjoint control vector transformation to a state vector and return the control vector. Usually this transformation is the multiplication with transpose of the squareroot of the background error covariance matrix '''B'''. For the hybrid 3DVar, a part of this square root is usually expressed through the ensemble. 310 310 311 311 If the state vector is decomposed in case of parallelization one needs to take care that the application of the trasformation is complete. This usually requries a comminucation with MPI_Allreduce to obtain a global sun. … … 402 402 === `U_init_dim_obs_f` (init_dim_obs_f_pdaf.F90) === 403 403 404 This routine is used by all filter algorithms with domainlocalization (LSEIK, LETKF ) and is independent of the particular algorithm.404 This routine is used by all filter algorithms with domainlocalization (LSEIK, LETKF, LESTKF, LNETF) and is independent of the particular algorithm. 405 405 406 406 The interface for this routine is: … … 420 420 === `U_obs_op_f` (obs_op_f_pdaf.F90) === 421 421 422 This routine is used by all filter algorithms with domainlocalization (LSEIK, LETKF ) and is independent of the particular algorithm.422 This routine is used by all filter algorithms with domainlocalization (LSEIK, LETKF, LESTKF, LNETF) and is independent of the particular algorithm. 423 423 424 424 The interface for this routine is: … … 440 440 === `U_init_obs_f` (init_obs_f_pdaf.F90) === 441 441 442 This routine is used by all filter algorithms with domainlocalization (LSEIK, LE TKF) and is independent of the particular algorithm.442 This routine is used by all filter algorithms with domainlocalization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm. 443 443 The routine is only called if the globally adaptive forgetting factor is used (`type_forget=1` in the example implementation). For the local filters there is also the alternative to use locally adaptive forgetting factors (`type_forget=2` in the example implementation) 444 444 … … 461 461 === `U_init_obs_l` (init_obs_l_pdaf.F90) === 462 462 463 This routine is used by all filter algorithms with domainlocalization (LSEIK, LE TKF) and is independent of the particular algorithm.463 This routine is used by all filter algorithms with domainlocalization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm. 464 464 465 465 The interface for this routine is: … … 485 485 === `U_prodRinvA_l` (prodrinva_l_pdaf.F90) === 486 486 487 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.487 This routine is used by the local filters (LSEIK, LESTKF, LETKF, LNETF). There is a slight difference between LSEIK and LETKF for this routine, which is described below. 488 488 489 489 The interface for this routine is: … … 500 500 }}} 501 501 502 The routine is called during the loop over the local analysis domains. In the algorithm, the product of the inverse of the observation error covariance matrix with some matrix has to be computed. For the SEIKfilter this matrix holds the observed part of the ensemble perturbations for the local analysis domain of index `domain_p`. The matrix is provided as `A_l`. The product has to be given as `C_l`.502 The routine is called during the loop over the local analysis domains. In the algorithm, the product of the inverse of the observation error covariance matrix with some matrix has to be computed. For the ESTKF filter this matrix holds the observed part of the ensemble perturbations for the local analysis domain of index `domain_p`. The matrix is provided as `A_l`. The product has to be given as `C_l`. 503 503 504 504 This routine is also the place to perform observation localization. To initialize a vector of weights, the routine `PDAF_local_weight` can be called. The procedure is used in the example implementation and also demonstrated in the template routine. … … 508 508 * The routine does not require that the product is implemented as a real matrixmatrix product. Rather, the product can be implemented in its most efficient form. For example, if the observation error covariance matrix is diagonal, only the multiplication of the diagonal with matrix `A_l` has to be implemented. 509 509 * The observation vector `obs_l` is provided through the interface for cases where the observation error variance is relative to the actual value of the observations. 510 * The interface has a difference for SEIK and ETKF: For ETKF the third argument is the ensemble size (`dim_ens`), while for SEIK it is the rank (`rank`) of the covariance matrix (usually ensemble size minus one). In addition, the second dimension of `A_l` and `C_l` has size `dim_ens` for ETKF, while it is `rank` for theSEIK filter. (Practically, one can usually ignore this difference as the fourth argument of the interface can be named arbitrarily in the routine.)510 * The interface has a difference for ESTKF/SEIK and ETKF: For ETKF the third argument is the ensemble size (`dim_ens`), while for ESTKF/SEIK it is the rank (`rank`) of the covariance matrix (usually ensemble size minus one). In addition, the second dimension of `A_l` and `C_l` has size `dim_ens` for ETKF, while it is `rank` for the ESTKF/SEIK filter. (Practically, one can usually ignore this difference as the fourth argument of the interface can be named arbitrarily in the routine.) 511 511 512 512 513 513 === `U_init_n_domains` (init_n_domains_pdaf.F90) === 514 514 515 This routine is used by all filter algorithms with domainlocalization (LSEIK, LE TKF) and is independent of the particular algorithm.515 This routine is used by all filter algorithms with domainlocalization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm. 516 516 517 517 The interface for this routine is: … … 532 532 === `U_init_dim_l` (init_dim_l_pdaf.F90) === 533 533 534 This routine is used by all filter algorithms with domainlocalization (LSEIK, LE TKF) and is independent of the particular algorithm.534 This routine is used by all filter algorithms with domainlocalization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm. 535 535 536 536 The interface for this routine is: … … 552 552 === `U_init_dim_obs_l` (init_dim_obs_l_pdaf.F90) === 553 553 554 This routine is used by all filter algorithms with domainlocalization (LSEIK, LE TKF) and is independent of the particular algorithm.554 This routine is used by all filter algorithms with domainlocalization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm. 555 555 556 556 The interface for this routine is: … … 575 575 === `U_g2l_state` (g2l_state_pdaf.F90) === 576 576 577 This routine is used by all filter algorithms with domainlocalization (LSEIK, LE TKF) and is independent of the particular algorithm.577 This routine is used by all filter algorithms with domainlocalization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm. 578 578 579 579 The interface for this routine is: … … 597 597 === `U_l2g_state` (l2g_state_pdaf.F90) === 598 598 599 This routine is used by all filter algorithms with domainlocalization (LSEIK, LE TKF) and is independent of the particular algorithm.599 This routine is used by all filter algorithms with domainlocalization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm. 600 600 601 601 The interface for this routine is: … … 619 619 === `U_g2l_obs` (g2l_obs_pdaf.F90) === 620 620 621 This routine is used by all filter algorithms with domainlocalization (LSEIK, LE TKF) and is independent of the particular algorithm.621 This routine is used by all filter algorithms with domainlocalization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm. 622 622 623 623 The interface for this routine is: … … 642 642 === `U_init_obsvar` (init_obsvar_pdaf.F90) === 643 643 644 This routine is used by the global filter algorithms SEIK and ETKF as well as the local filters LSEIK andLETKF. 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.644 This routine is used by the global filter algorithms SEIK, ESTKF, and ETKF as well as the local filters LESTKF, LSEIK, 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. 645 645 646 646 The interface for this routine is: … … 666 666 === `U_init_obsvar_l` (init_obsvar_l_pdaf.F90) === 667 667 668 This routine is used by all filter algorithms with domainlocalization (LSEIK, LE TKF) 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).668 This routine is used by all filter algorithms with domainlocalization (LSEIK, LESTKF, LETKF, LNETF) 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). 669 669 670 670 The interface for this routine is: … … 713 713 Inside the analysis step the interative optimization is computed. This involves the repeated call of the routines: 714 714 1. [#U_cvtcvt_pdaf.F90 U_cvt] 715 1. [#U_cvt_enscvt_ens_pdaf.F90 U_cvt_ens] 715 716 1. [#U_obs_op_linobs_op_lin_pdaf.F90 U_obs_op_lin] 716 717 1. [#U_prodRinvAprodrinva_pdaf.F90 U_prodRinvA] 717 718 1. [#U_obs_op_adjobs_op_adj_pdaf.F90 U_obs_op_adj] 718 719 1. [#U_cvt_adjcvt_adj_pdaf.F90 U_cvt_adj] 720 1. [#U_cvt_adj_enscvt_adj_ens_pdaf.F90 U_cvt_adj_ens] 719 721 720 722 After the iterative optimization the following routines are executes to complte the analysis step: 721 1. [#U_cvt_enscvt_ens_pdaf.F90 U_cvt_ens] (Call to the control vector transform to compute the final state vector increment 723 1. [#U_cvt_enscvt_pdaf.F90 U_cvt] (Call to the parameterized part of the control vector transform to compute the final state vector increment) 724 1. [#U_cvt_enscvt_ens_pdaf.F90 U_cvt_ens] (Call to the eensemblepart of the control vector transform to compute the final state vector increment) 722 725 1. [#U_prepoststepprepoststep_ens_pdaf.F90 U_prepoststep] (Call to act on the analysis ensemble, called with (positive) value of the time step) 723 726