Changes between Version 5 and Version 6 of Implement3DVarAnalysisPDAF3Universal
- Timestamp:
- May 27, 2025, 1:25:53 PM (7 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Implement3DVarAnalysisPDAF3Universal
v5 v6 38 38 There are genenerally three different variants of 3D-Var provided by PDAF: parameterized 3D-Var, 3D Ensemble Var, and hybrid (parameterized + ensemble) 3D-Var. All can be called using the universal interface routines described here. 39 39 40 For the analysis step of 3D-Var we need different operations related to the observations. These operations are requested by PDAF by call-back routines supplied by the user and provided in the OMI structure. The names of the routines that are provided by the user are specified in the call to the routine `PDAF3_assimilate_3dvar_all` in the online mode of PDAF or `PDAF3_assim_offline_3dvar_all` for the offline mode. With regard to the parallelization, all these routines (except `collect_state_pdaf`, `distribute_state_pdaf`, and `next_observation_pdaf`) are executed by the filter processes (`filterpe=.true.`) only. 41 42 The universal interface has more arguments than the specific interfaces for the parameterized 3D-Var or the 3D ensemble Var methods. It is useful if one implements both the 3D-Var with parameterized covariances and rhe 3D ensemble Var. The hybrid 3D-Var using the LESTKF is always called using this unversal interface. 43 44 The different 3D-Var methods in PDAF were explained on the [wiki:Implement3DVarAnalysisOverview page providing the verview of the Analysis Step for 3D-Var Methods]. Depending the type of 3D-Var, the background covariance matrix '''B''' is represented either in a parameterized form, by an ensemble, or by a combination of both. The 3D-Var methods that use an ensemble need to transform the ensemble perturbations using an ensemble Kalman filter. PDAF uses for this the error-subspace transform filter ESTKF. There are two variants: The first uses the localized filter LESTKF, while the second uses the global filter ESTKF.45 46 For completeness we discuss here all user-supplied routines that are specified in the interface to `PDAFomi_assimilate_hyb3dvar_X`. Thus, some of the user-supplied routines that are explained on the page describing the modification of the model code for the ensemble integrationare repeated here.40 The different 3D-Var methods in PDAF were explained on the [wiki:Implement3DVarAnalysisOverviewPDAF3 page providing the verview of the Analysis Step for 3D-Var Methods]. Depending the type of 3D-Var, the background covariance matrix '''B''' is represented either in a parameterized form, by an ensemble, or by a combination of both. The 3D-Var methods that use an ensemble need to transform the ensemble perturbations using an ensemble Kalman filter. PDAF uses for this the error-subspace transform filter ESTKF. There are two variants: The first uses the localized filter LESTKF, while the second uses the global filter ESTKF. 41 42 For the [wiki:Implement3DVarAnalysisOverviewPDAF3 analysis step of 3D-Var] we need different operations related to the observations. These operations are requested by PDAF by call-back routines supplied by the user and provided in the OMI structure. The names of the routines that are provided by the user are specified in the call to the routine `PDAF3_assimilate_3dvar_all` for the online mode of PDAF or `PDAF3_assim_offline_3dvar_all` for the offline mode. 43 44 The universal interface has more arguments than the specific interfaces for the parameterized 3D-Var or the 3D Ensemble Var methods. The universal interface is useful if one implements both the 3D-Var with parameterized covariances and the 3D ensemble Var. The hybrid 3D-Var using the LESTKF is always called using this unversal interface. 45 46 For completeness we discuss here all user-supplied routines that are specified as arguments. Thus, some of the user-supplied routines, which were explained on the page describing the modification of the model code for the ensemble integration, are repeated here. 47 47 48 48 49 49 == Analysis Routines == 50 50 51 The general aspects of the filter (or solver) specific routines `PDAF_assimilate_*` have been described on the page [ ModifyModelforEnsembleIntegration Modification of the model code for the ensemble integration] and its sub-page on [InsertAnalysisStep inserting the analysis step]. The routine is used in the fully-parallel implementation variant of the data assimilation system. When the 'flexible' implementation variant is used, the routines `PDAF_put_state_*` is used as described further below. Here, we list the full interface of the routine. Subsequently, the user-supplied routines specified in the call is explained.52 53 There are two variants that either compute the transformataion of the ensemble transformation using the local LESTKF method, or the global ESTKF. 51 The general aspects of the filter (or solver) specific routines `PDAF_assimilate_*` have been described on the page [wiki:OnlineModifyModelforEnsembleIntegration_PDAF3 Modification of the model code for the ensemble integration]. The routine is used in the fully-parallel implementation variant of the data assimilation system. When the 'flexible' implementation variant is used, the routines `PDAF_put_state_*` is used as described further below. Here, we list the full interface of the routine. Subsequently, the user-supplied routines specified in the call is explained. 52 53 54 54 55 55 === `PDAF3_assimilate_3dvar_all` === 56 56 57 This routine is used both in the ''fully-parallel'' and the ''flexible'' implementation variants of the data assimilation system. (See the page [ OnlineModifyModelforEnsembleIntegration_PDAF3 Modification of the model code for the ensemble integration] for these variants)57 This routine is used both in the ''fully-parallel'' and the ''flexible'' implementation variants of the data assimilation system. (See the page [wiki:OnlineModifyModelforEnsembleIntegration_PDAF3 Modification of the model code for the ensemble integration] for these variants) 58 58 59 59 The interface is: … … 125 125 Here all user-supplied routines are described that are required in the call to the assimilation routines for hybrid 3D-Var. For some of the generic routines, we link to the page on [wiki:OnlineModifyModelforEnsembleIntegration_PDAF3 modifying the model code for the ensemble integration]. 126 126 127 The user-supplied routines we use the prefix `U_`. In the template directory `templates/` as well as in the tutorial implementations in `tutorial/` these routines exist without the prefix, but with the extension `_pdaf.F90`. The user-routines relating toOMI are collected in the file `callback_obs_pdafomi.F90`. In the section titles below we provide the name of the template file in parentheses.127 The names of the user-suppled routines routines ending on `_pdaf` relate to operations on the model state, while those ensing on `_pdafomi` handle observations using the structured appraoch guided by [wiki:PDAF_OMI_Overview PDAF-OMI]. The user-routines relating to PDAF-OMI are collected in the file `callback_obs_pdafomi.F90`. In the section titles below we provide the name of the template file in parentheses. 128 128 129 129 In the subroutine interfaces some variables appear with the suffix `_p`. 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. … … 176 176 177 177 The routine is called during the analysis step during the iterative minimization of the cost function. 178 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.178 It has to apply the control vector transformation to the control vector and return the transformed result state 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. More complex transformation, including the combination with a parameterized covariance matrix, are possible and the routine permits the flexiblity to implement any transformation. 179 179 180 180 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 domain-decomposed state vector. 181 181 182 182 183 === `cvt_adj_ pdaf` (cvt_adj_pdaf.F90) ===183 === `cvt_adj_ens_pdaf` (cvt_adj_ens_pdaf.F90) === 184 184 185 185 The interface for this routine is: … … 197 197 198 198 The routine is called during the analysis step during the iterative minimization of the cost function. 199 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.199 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'''. For the 3D Ensemble Var, this square root is usually expressed through the ensemble. More complex transformation, including the combination with a parameterized covariance matrix, are possible and the routine permits the flexiblity to implement any transformation. 200 200 201 201 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. … … 217 217 218 218 The routine is called during the analysis step during the iterative minimization of the cost function. 219 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'''.219 It has to apply the control vector transformation to the control vector and return the transformed result state vector. Usually this transformation is the multiplication with the square-root of the background error covariance matrix '''B''' in its parameterized form. 220 220 221 221 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 domain-decomposed state vector. … … 236 236 237 237 The routine is called during the analysis step during the iterative minimization of the cost function. 238 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 transposed of the square-root of the background error covariance matrix '''B''' .238 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 transposed of the square-root of the background error covariance matrix '''B''' in its parameterized form. 239 239 240 240 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.