| 1 | = cvt_ens_pdaf = |
| 2 | |
| 3 | The page document the user-supplied call-back routine `cvt_ens_pdaf`. |
| 4 | |
| 5 | The routine `cvt_ens_pdaf` (`U_cvt_ens` inside PDAF) is a call-back routine that has to be provided by the user. In the simplified interface the predefined name of the routine is `cvt_ens_pdaf`, but in the full interface, the user can choose the name of the routine. |
| 6 | |
| 7 | The routine is used with the 3D Ensemble Var and hybrid 3D-Var methods. |
| 8 | |
| 9 | The routine is called during the iterative optimization. It has to perform the control vector transform (preconditioning) which is usually a multiplication with the square-root of the background covariance matrix '''B'''. The routine is provided with a control vector and has to return a state vector. The routine allows a user to implement the control vector transform in oeprational form and it gives the user access to the state ensemble. |
| 10 | |
| 11 | The interface is the following: |
| 12 | {{{ |
| 13 | SUBROUTINE cvt_ens_pdaf(iter, dim_p, dim_ens, dim_cv_ens_p, ens_p, cv_p, Vcv_p) |
| 14 | |
| 15 | INTEGER, INTENT(in) :: iter ! Iteration of optimization |
| 16 | INTEGER, INTENT(in) :: dim_p ! PE-local observation dimension |
| 17 | INTEGER, INTENT(in) :: dim_ens ! Ensemble size |
| 18 | INTEGER, INTENT(in) :: dim_cv_ens_p ! Dimension of control vector |
| 19 | REAL, INTENT(in) :: ens_p(dim_p, dim_ens) ! PE-local ensemble |
| 20 | REAL, INTENT(in) :: cv_p(dim_cv_ens_p) ! PE-local control vector |
| 21 | REAL, INTENT(inout) :: Vcv_p(dim_p) ! PE-local state increment |
| 22 | }}} |
| 23 | |
| 24 | |
| 25 | Hints |
| 26 | * 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. |