Changes between Version 4 and Version 5 of PDAFomi_observation_diagnostics


Ignore:
Timestamp:
May 16, 2025, 6:59:22 PM (41 hours ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PDAFomi_observation_diagnostics

    v4 v5  
    3838|| PDAF-OMI observation diagnostics were introduced with PDAF V3.0 ||
    3939
    40 The PDAF-OMI observation diagnostics module provides functionality to obtain statistics about the differences between observations and the observed model state. In addition, there are routines that provide the user access to the observations and observed quantities like the observed ensemble mean state.
     40The PDAF-OMI observation diagnostics module provides functionality to obtain statistics about the differences between observations and the observed model state.
     41Additionally, there are routines that provide the user with access to observations and observed quantities, such as the observed ensemble mean state.
    4142
    4243Here, we describe the functionalities of the observation diagnostics routines.
    4344
    44 A common place to call the `PDAFomi_diag` diagnostics routines is in `prepoststep_pdaf`, which is the usual place to also analyze the ensemble. Usually, PDAF initializes the observations after `prepoststep_pdaf` was executed after the forecast. To be able to compare the observations and the forecast ensemble, one has to switch the place at which observations are initialized. This is done with
     45A common place to call the `PDAFomi_diag` diagnostics routines is in `prepoststep_pdaf`, which is the usual place to also analyze the ensemble.
     46
     47By default, PDAF initializes the observations after `prepoststep_pdaf` was executed after the forecast. To be able to compare the observations and the forecast ensemble, one has to switch the place at which observations are initialized. This is done with
    4548{{{
    4649  CALL PDAF_set_iparam(9, 0)
    4750}}}
    48 which can be called in `init_pdaf` after the initialization of PDAF with `PDAF_init`.
     51which can be called in `init_pdaf` subsequently to the initialization of PDAF with `PDAF_init`.
    4952
    5053The routines for observation diagnostics can be organized in four groups
     
    6164   * [wiki:PDAFomi_observation_diagnostics#PDAFomi_diag_get_HXmean PDAFomi_diag_get_HXmean] - access to observed ensemble mean
    6265   * [wiki:PDAFomi_observation_diagnostics#PDAFomi_diag_get_HX PDAFomi_diag_get_HX] - access to observed ensemble
    63    * [wiki:PDAFomi_observation_diagnostics#PDAFomi_diag_get_ivar PDAFomi_diag_get_ivar]- access to inverse obs. error variances
     66   * [wiki:PDAFomi_observation_diagnostics#PDAFomi_diag_get_ivar PDAFomi_diag_get_ivar]- access to inverse observation error variances
    6467
    6568
     
    6871=== PDAFomi_set_obs_diag ===
    6972
    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`.
     73By 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
     75The 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`.
    7376
    7477The interface is:
     
    99102**Note:**
    100103 * The computed RMSD is for the global model domain. Thus, in case of a parallelized model, all process sub-domains are taken into account and calling `PDAFomi_diag_obs_rmsd` will return the same value for all processes.
    101  * In Fortran user code the pointer should be declared in the form[[BR]] `REAL, POINTER :: rmsd_ptr(:)`[[BR]] It does not need to be allocated. The target vector has the length `nobs`.
    102  * 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 returned. One can check this value before assessing the pointer array.
     104 * In Fortran user code, the pointer should be declared in the form[[BR]] `REAL, POINTER :: rmsd_ptr(:)`[[BR]] It does not need to be allocated. The target vector has the length `nobs`.
     105 * If the observation diagnostics have been deactivated by using `PDAFomi_set_obs_diag`, the pointer array will not be set and `nobs=0` is returned. One can check the value of `nobs` before assessing the pointer array.
    103106 * A more extensive set of statistics can be obtained using the routine `PDAFomi_diag_stats`.
    104107
     
    126129**Note:**
    127130 * The computed statistics are for the global model domain. Thus, in case of a parallelized model, all process sub-domains are taken into account and calling `PDAFomi_diag_stats` will return the same value for all processes.
    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
    130133 * The routine returns the centered RMSD as displayed in Taylor diagrams. The non-centered RMSD can be computed using `PDAFomi_diag_obs_rmsd`.
    131134
     
    145148
    146149**Note:**
    147  * `nobstypes` is commonly used as the upper limit of a loop running over all observation types. In this way `nobstypes` can be used with the PDAFomi_diag routines that return different observation-related arrays for a single observation type.
     150 * `nobstypes` is commonly used as the upper limit of a loop running over all observation types. In this way, `nobstypes` can be used with the `PDAFomi_diag` routines that return different observation-related arrays for a single observation type.
    148151
    149152
     
    160163
    161164**Note:**
    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
     172The 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.
    170173
    171174=== PDAFomi_diag_get_obs ===
     
    186189
    187190**Notes:**
    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
    192195 * The array `ocoord_p_ptr(:,:)` is organized as in the observation modules:
    193196   * First index: index of different coordinate directions for observation specified by the second index
     
    211214
    212215**Notes:**
    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.
    216219
    217220
     
    231234
    232235**Notes:**
    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.
    236239
    237240
     
    251254
    252255**Notes:**
    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.
    256259 * If the feature `thisobs%inno_omit` is used (see the [wiki:PDAFomi_additional_functionality page Additional functionality of PDAF-OMI]), the inverse variance of the omitted observations will show the small value set by `inno_omit`. One can use this information to exclude such observations when analyzing differences between observations and observed ensemble.
    257260