70 | | By default, the observation diagnostics are activated. However, as this functionality increases the required alloced memory it might be desirable to deactivate this functionality. The routine is used deactivate the observation diagnostics. It is also possible to re-activate the observation diagnostics at a later time. |
71 | | |
72 | | The routine can be called by all processes, but it is sufficient to call it for those processes that handle observations, which usually are the filter processes. A common place is to call the routine in `init_pdaf` afer the initialization of PDAF in `PDAF_init`. |
| 73 | By default, the observation diagnostics are active. However, as this functionality increases the required memory, it might be desirable to deactivate this functionality. This routine is used deactivate the observation diagnostics. It is also possible to re-activate the observation diagnostics at a later time. |
| 74 | |
| 75 | The routine can be called by all processes, but it is sufficient to call it for those processes that handle observations, which are usually the filter processes. A common place is to call the routine in `init_pdaf` subsequently to the initialization of PDAF in `PDAF_init`. |
128 | | * In Fortran user code the pointer should be declared in the form[[BR]] `REAL, POINTER :: obsstats_ptr(:)`[[BR]] It does not need to be allocated. The target array has the size `(6, nobs)`. |
129 | | * If the observation diagnostics have not be activated by using `PDAFomi_set_obs_diag` the pointer array will not be set and `nobs=0` is. One can check this value before assessing the pointer array |
| 131 | * In Fortran user code, the pointer should be declared in the form[[BR]] `REAL, POINTER :: obsstats_ptr(:)`.[[BR]] It does not need to be allocated. The target array has the size `(6, nobs)`. |
| 132 | * If the observation diagnostics have been deactivated by using `PDAFomi_set_obs_diag`, the pointer array will not be set and `nobs=0` is. One can check this value before assessing the pointer array |
162 | | * In Fortran user code the pointer should be declared in the form[[BR]] `INTEGER, POINTER :: dim_obs_ptr(:)`[[BR]] It does not need to be allocated. |
163 | | * If the observation diagnostics have not be activated by using [wiki:PDAFomi_set_obs_diag]. the pointer array will have length 1 and the observation dimension is returned as 0. |
164 | | |
165 | | |
166 | | |
167 | | == Acces to observation arrays == |
168 | | |
169 | | The routine that provide access to observation arrays all work for a single observation type, which has to be specified as the first argument. TO process all observation types one can implement a loop `DO iobs = 1, nobstypes` where `nobstype` can be obtained with `PDAFomi_diag_nobstypes` which was described before. |
| 165 | * In Fortran user code, the pointer should be declared in the form[[BR]] `INTEGER, POINTER :: dim_obs_ptr(:)`[[BR]] It does not need to be allocated. |
| 166 | * If the observation diagnostics have been deactivated by using [wiki:PDAFomi_set_obs_diag], the pointer array will have length 1 and the observation dimension is returned as 0. |
| 167 | |
| 168 | |
| 169 | |
| 170 | == Access to observation arrays == |
| 171 | |
| 172 | The routines that provide access to observation arrays all work for a single observation type, which is specified as the first argument. To process all observation types, one can implement a loop `DO iobs = 1, nobstypes` where `nobstype` can be obtained with `PDAFomi_diag_nobstypes`, which was described before. |
188 | | * In case of a parallelized model, the vector `obs_p_prt` and the array `ocoord_p_prt` contain the values for the process-sub-domain of the calling processor. |
189 | | * In Fortran user code the pointer to the observation vector should be declared in the form[[BR]] `REAL, POINTER :: obs_p_ptr(:)`[[BR]] It does not need to be allocated. The target vector has the length `dim_obs_p_diag`. |
190 | | * In Fortran user code the pointer to the observation coordinates should be declared in the form[[BR]] `REAL, POINTER :: ocoord_p_ptr(:,:)`[[BR]] It does not need to be allocated. The target array has the size `(ncoord, dim_obs_p_diag)`. |
191 | | * If the observation diagnostics have not been activated by using `PDAFomi_set_obs_diag`, the pointers will not be set and `dim_obs_p_diag=0` and `ncoord=0` will be returned. These values can be checked before assessing the pointer arrays |
| 191 | * In case of a parallelized model, the vector `obs_p_prt` and the array `ocoord_p_prt` contain the values for the process sub-domain of the calling process. |
| 192 | * In Fortran user code, the pointer to the observation vector should be declared in the form[[BR]] `REAL, POINTER :: obs_p_ptr(:)`.[[BR]] It does not need to be allocated. The target vector has the length `dim_obs_p_diag`. |
| 193 | * In Fortran user code, the pointer to the observation coordinates should be declared in the form[[BR]] `REAL, POINTER :: ocoord_p_ptr(:,:)`.[[BR]] It does not need to be allocated. The target array has the size `(ncoord, dim_obs_p_diag)`. |
| 194 | * If the observation diagnostics have been deactivated by using `PDAFomi_set_obs_diag`, the pointers will not be set and `dim_obs_p_diag=0` and `ncoord=0` will be returned. These values can be checked before assessing the pointer arrays |
213 | | * In case of a parallelized model, the vector `HXmean_p_prt` contains the observed ensemble mean for the process-sub-domain |
214 | | * In Fortran user code the pointer to the observed ensemble mean should be declared in the form[[BR]] `REAL, POINTER :: HXmean_p_ptr(:)`[[BR]] It does not need to be allocated. The target vector has the length `dim_obs_p_diag`. |
215 | | * If the observation diagnostics have not be activated by using `PDAFomi_set_obs_diag`, the pointer will not be set and `dim_obs_diag=0` will be returned. This value can be checked before assessing the pointer array. |
| 216 | * In case of a parallelized model, the vector `HXmean_p_prt` contains the observed ensemble mean for the process sub-domain |
| 217 | * In Fortran user code, the pointer to the observed ensemble mean should be declared in the form: [[BR]] `REAL, POINTER :: HXmean_p_ptr(:)`[[BR]] It does not need to be allocated. The target vector has the length `dim_obs_p_diag`. |
| 218 | * If the observation diagnostics have been deactivated by using `PDAFomi_set_obs_diag`, the pointer will not be set and `dim_obs_diag=0` will be returned. This value can be checked before assessing the pointer array. |
233 | | * In case of a parallelized model, the array `HX_p_prt` contains the observed ensemble for the process-sub-domain |
234 | | * In Fortran user code the pointer to the observed ensemble should be declared in the form[[BR]] `REAL, POINTER :: HX_p_ptr(:,:)`[[BR]] It does not need to be allocated. The target array has the size `(dim_obs_p_diag, dim_ens)` |
235 | | * If the observation diagnostics have not be activated by using `PDAFomi_set_obs_diag`, the pointer will not be set and `dim_obs_diag=0` will be returned. This value can be checked before assessing the pointer array. |
| 236 | * In case of a parallelized model, the array `HX_p_prt` contains the observed ensemble for the process sub-domain. |
| 237 | * In Fortran user code, the pointer to the observed ensemble should be declared in the form:[[BR]] `REAL, POINTER :: HX_p_ptr(:,:)`[[BR]] It does not need to be allocated. The target array has the size `(dim_obs_p_diag, dim_ens)` |
| 238 | * If the observation diagnostics have been deactivated by using `PDAFomi_set_obs_diag`, the pointer will not be set and `dim_obs_diag=0` will be returned. This value can be checked before assessing the pointer array. |
253 | | * In case of a parallelized model, the vector `ivar_p_prt` contains the observed ensemble mean for the process-sub-domain |
254 | | * In Fortran user code the pointer to the vector of inverse observation variances should be declared in the form[[BR]] `REAL, POINTER :: ivar_p_ptr(:)`[[BR]] It does not need to be allocated. The target vector has the length `dim_obs_p_diag`. |
255 | | * If the observation diagnostics have not be activated by using `PDAFomi_set_obs_diag` the pointer will not be set and `dim_obs_diag=0` will be returned. This value can be checked before assessing the pointer array. |
| 256 | * In case of a parallelized model, the vector `ivar_p_prt` contains the observed ensemble mean for the process sub-domain. |
| 257 | * In Fortran user code, the pointer to the vector of inverse observation variances should be declared in the form[[BR]] `REAL, POINTER :: ivar_p_ptr(:)`[[BR]] It does not need to be allocated. The target vector has the length `dim_obs_p_diag`. |
| 258 | * If the observation diagnostics have been deactivated by using `PDAFomi_set_obs_diag`, the pointer will not be set and `dim_obs_diag=0` will be returned. This value can be checked before assessing the pointer array. |