Changes between Version 1 and Version 2 of ImplementAnalysis_Hyb3DVar_classical


Ignore:
Timestamp:
Dec 9, 2021, 1:06:01 PM (2 years ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ImplementAnalysis_Hyb3DVar_classical

    v1 v2  
    148148=== `PDAF_put_state_hyb3dvar_estkf` ===
    149149
    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 user-supplied routines `U_distribute_state` and `U_next_observation` are missing.
     150The 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 user-supplied routines `U_distribute_state` and `U_next_observation` are missing.
    151151
    152152The interface when using one of the global filters is the following:
     
    160160== User-supplied routines ==
    161161
    162 Here all user-supplied 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].
     162Here all user-supplied 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].
    163163
    164164To indicate user-supplied 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.
     
    184184=== `U_init_dim_obs` (init_dim_obs_pdaf.F90) ===
    185185
    186 This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF).
     186This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF, NETF, PF) and the 3D-Var methods.
    187187
    188188The interface for this routine is:
     
    202202=== `U_obs_op` (obs_op_pdaf.F90) ===
    203203
    204 This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF).
     204This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF, NETF, PF) and the 3D-Var methods.
    205205
    206206The interface for this routine is:
     
    225225=== `U_init_obs` (init_obs_pdaf.F90) ===
    226226
    227 This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF).
     227This routine is used by all global filter algorithms (SEEK, SEIK, EnKF, ETKF, NETF, PF) and the 3D-Var methods.
    228228
    229229The interface for this routine is:
     
    266266 * The routine does not require that the product is implemented as a real matrix-matrix 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.
    267267 * 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.)
    269269
    270270
     
    286286
    287287The 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 square-root of the background error covariance matrix '''B'''. For the 3D Ensemble Var, this square root is usually expressed through the ensemble.
     288It 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 square-root of the background error covariance matrix '''B'''. For the hybrid 3D-Var, a part of this square root is usually expressed through the ensemble.
    289289
    290290If 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 domain-decomposed state vector.
     
    307307
    308308The 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 square-root of the background error covariance matrix '''B'''. or the 3D Ensemble Var, this square root is usually expressed through the ensemble.
     309It 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 square-root of the background error covariance matrix '''B'''. For the hybrid 3D-Var, a part of this square root is usually expressed through the ensemble.
    310310
    311311If 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.
     
    402402=== `U_init_dim_obs_f` (init_dim_obs_f_pdaf.F90) ===
    403403
    404 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     404This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF, LESTKF, LNETF) and is independent of the particular algorithm.
    405405
    406406The interface for this routine is:
     
    420420=== `U_obs_op_f` (obs_op_f_pdaf.F90) ===
    421421
    422 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     422This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF, LESTKF, LNETF) and is independent of the particular algorithm.
    423423
    424424The interface for this routine is:
     
    440440=== `U_init_obs_f` (init_obs_f_pdaf.F90) ===
    441441
    442 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     442This routine is used by all filter algorithms with domain-localization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm.
    443443The 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)
    444444
     
    461461=== `U_init_obs_l` (init_obs_l_pdaf.F90) ===
    462462
    463 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     463This routine is used by all filter algorithms with domain-localization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm.
    464464
    465465The interface for this routine is:
     
    485485=== `U_prodRinvA_l` (prodrinva_l_pdaf.F90) ===
    486486
    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.
     487This 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.
    488488
    489489The interface for this routine is:
     
    500500}}}
    501501
    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 SEIK 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`.
     502The 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`.
    503503
    504504This 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.
     
    508508 * The routine does not require that the product is implemented as a real matrix-matrix 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.
    509509 * 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 the SEIK 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.)
    511511
    512512
    513513=== `U_init_n_domains` (init_n_domains_pdaf.F90) ===
    514514
    515 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     515This routine is used by all filter algorithms with domain-localization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm.
    516516
    517517The interface for this routine is:
     
    532532=== `U_init_dim_l` (init_dim_l_pdaf.F90) ===
    533533
    534 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     534This routine is used by all filter algorithms with domain-localization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm.
    535535
    536536The interface for this routine is:
     
    552552=== `U_init_dim_obs_l` (init_dim_obs_l_pdaf.F90) ===
    553553
    554 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     554This routine is used by all filter algorithms with domain-localization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm.
    555555
    556556The interface for this routine is:
     
    575575=== `U_g2l_state` (g2l_state_pdaf.F90) ===
    576576
    577 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     577This routine is used by all filter algorithms with domain-localization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm.
    578578
    579579The interface for this routine is:
     
    597597=== `U_l2g_state` (l2g_state_pdaf.F90) ===
    598598
    599 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     599This routine is used by all filter algorithms with domain-localization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm.
    600600
    601601The interface for this routine is:
     
    619619=== `U_g2l_obs` (g2l_obs_pdaf.F90) ===
    620620
    621 This routine is used by all filter algorithms with domain-localization (LSEIK, LETKF) and is independent of the particular algorithm.
     621This routine is used by all filter algorithms with domain-localization (LSEIK, LESTKF, LETKF, LNETF) and is independent of the particular algorithm.
    622622
    623623The interface for this routine is:
     
    642642=== `U_init_obsvar` (init_obsvar_pdaf.F90) ===
    643643
    644 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.
     644This 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.
    645645
    646646The interface for this routine is:
     
    666666=== `U_init_obsvar_l` (init_obsvar_l_pdaf.F90) ===
    667667
    668 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).
     668This routine is used by all filter algorithms with domain-localization (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).
    669669
    670670The interface for this routine is:
     
    713713Inside the analysis step the interative optimization is computed. This involves the repeated call of the routines:
    714714 1. [#U_cvtcvt_pdaf.F90 U_cvt]
     715 1. [#U_cvt_enscvt_ens_pdaf.F90 U_cvt_ens]
    715716 1. [#U_obs_op_linobs_op_lin_pdaf.F90 U_obs_op_lin]
    716717 1. [#U_prodRinvAprodrinva_pdaf.F90 U_prodRinvA]
    717718 1. [#U_obs_op_adjobs_op_adj_pdaf.F90 U_obs_op_adj]
    718719 1. [#U_cvt_adjcvt_adj_pdaf.F90 U_cvt_adj]
     720 1. [#U_cvt_adj_enscvt_adj_ens_pdaf.F90 U_cvt_adj_ens]
    719721
    720722After 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 eensemble-part of the control vector transform to compute the final state vector increment)
    722725 1. [#U_prepoststepprepoststep_ens_pdaf.F90 U_prepoststep] (Call to act on the analysis ensemble, called with (positive) value of the time step)
    723726