| 59 | {{{ |
| 60 | SUBROUTINE init_obs(step, dim_obs_p, observation_p) |
| 61 | |
| 62 | INTEGER, INTENT(in) :: step ! Current time step |
| 63 | INTEGER, INTENT(in) :: dim_obs_p ! PE-local dimension of obs. vector |
| 64 | REAL, INTENT(out) :: observation_p(dim_obs_p) ! PE-local observation vector |
| 65 | }}} |
| 66 | |
| 67 | ! User-supplied routine for PDAF (SEEK/SEIK/EnKF/ETKF): |
| 68 | ! |
| 69 | ! The routine is called during the analysis step. |
| 70 | ! It has to provide the PE-local observation vector |
| 71 | ! for the current time step. |
| 72 | |
| 73 | |
| 76 | {{{ |
| 77 | SUBROUTINE prodRinvA(step, dim_obs_p, rank, obs_p, A_p, C_p) |
| 78 | |
| 79 | INTEGER, INTENT(in) :: step ! Current time step |
| 80 | INTEGER, INTENT(in) :: dim_obs_p ! PE-local dimension of obs. vector |
| 81 | INTEGER, INTENT(in) :: rank ! Rank of initial covariance matrix |
| 82 | REAL, INTENT(in) :: obs_p(dim_obs_p) ! PE-local vector of observations |
| 83 | REAL, INTENT(in) :: A_p(dim_obs_p,rank) ! Input matrix from analysis routine |
| 84 | REAL, INTENT(out) :: C_p(dim_obs_p,rank) ! Output matrix |
| 85 | }}} |
| 86 | |
| 87 | ! The routine is called during the analysis step. |
| 88 | ! It has to compute the product of the inverse of |
| 89 | ! the observation error covariance matrix with |
| 90 | ! the matrix of observed EOF modes (SEEK) or |
| 91 | ! observed ensemble perturbations (SEIK/ETKF). |
| 92 | |
| 93 | |
| 94 | |
| 96 | |
| 97 | {{{ |
| 98 | SUBROUTINE init_obsvar(step, dim_obs_p, obs_p, meanvar) |
| 99 | |
| 100 | INTEGER, INTENT(in) :: step ! Current time step |
| 101 | INTEGER, INTENT(in) :: dim_obs_p ! PE-local dimension of observation vector |
| 102 | REAL, INTENT(in) :: obs_p(dim_obs_p) ! PE-local observation vector |
| 103 | REAL, INTENT(out) :: meanvar ! Mean observation error variance |
| 104 | }}} |
| 105 | |
| 106 | ! User-supplied routine for PDAF (SEIK/LSEIK/ETKF/LETKF) |
| 107 | ! with adaptive forgetting factor. This routine will |
| 108 | ! only be called, if the adaptive forgetting factor |
| 109 | ! feature is used. Please note that this is an |
| 110 | ! experimental feature. |
| 111 | ! |
| 112 | ! The routine is called in SEIK during the analysis or |
| 113 | ! in LSEIK before the loop over local analysis domains |
| 114 | ! by the routine PDAF\_set\_forget that estimates an |
| 115 | ! adaptive forgetting factor. The routine has to |
| 116 | ! initialize the mean observation error variance. |
| 117 | ! For SEIK this should be the global mean, while for |
| 118 | ! LSEIK it should be the mean for the PE-local |
| 119 | ! sub-domain. (See init\_obsvar\_local() for a |
| 120 | ! localized variant for LSEIK.) |