19 | | ! ---- Mandatory variables to be set in init_dim_obs_f ---- |
20 | | INTEGER :: doassim ! Whether to assimilate this observation type |
21 | | INTEGER :: disttype ! Type of distance computation to use for localization |
22 | | ! (0) Cartesian, (1) Cartesian periodic |
23 | | ! (2) simplified geographic, (3) geographic haversine function |
24 | | INTEGER :: ncoord ! Number of coordinates use for distance computation |
25 | | INTEGER, ALLOCATABLE :: id_obs_p(:,:) ! Indices of observed field in state vector (process-local) |
| 24 | TYPE obs_f |
| 25 | ! ---- Mandatory variables to be set in INIT_DIM_OBS ---- |
| 26 | INTEGER :: doassim=0 !< Whether to assimilate this observation type |
| 27 | INTEGER :: disttype !< Type of distance computation to use for localization |
| 28 | ! (0) Cartesian, (1) Cartesian periodic |
| 29 | ! (2) simplified geographic, (3) geographic haversine function |
| 30 | INTEGER :: ncoord !< Number of coordinates use for distance computation |
| 31 | INTEGER, ALLOCATABLE :: id_obs_p(:,:) !< Indices of process-local observed field in state vector |
| 32 | ... |
| 33 | END TYPE obs_f |
| 44 | ! ---- Variables with predefined values - they can be changed in INIT_DIM_OBS ---- |
| 45 | INTEGER :: obs_err_type=0 !< Type of observation error: (0) Gauss, (1) Laplace |
| 46 | INTEGER :: use_global_obs=1 !< Whether to use (1) global full obs. |
| 47 | !< or (0) obs. restricted to those relevant for a process domain |
| 48 | ... |
| 49 | END TYPE obs_f |
| 50 | }}} |
| 51 | |
| 52 | Apart from these variables, there is a number of variables that are set internally when the routine `PDAFomi_gather_obs` is called. |
| 53 | |
| 54 | |
| 55 | Next to the derived data type `obs_f`, there is a derived type `obs_l` for localization. This is only used internally. It will be filled in init_dim_obs_l when calling PDAFomi_init_dim_obs_l. |
| 56 | |
| 57 | == init_dim_obs_TYPE == |
| 58 | |
| 59 | |
| 60 | |
| 61 | == obs_op_TYPE == |
| 62 | |
| 63 | This routine applies the observation operator to a state vector. It returns the observed state vector to PDAF. The routine is used by all filters. |
| 64 | |
| 65 | PDAF-OMI provides several observation operators. For example the observation operator for observations that are grid point values is called as: |
| 66 | {{{ |
| 67 | CALL PDAFomi_obs_op_gridpoint(thisobs, state_p, ostate) |
| 68 | }}} |
| 69 | |
| 70 | Here, `state_p` is the state vector and `ostate` is the observed state vector. |
| 71 | |
| 72 | For more information on the available observation operator and on how to implement your own observation operator see the [wiki:OMI_Observation_Operators documentation of observation operators for OMI]. |
| 73 | |
| 74 | |
| 75 | == init_dim_obs_l_TYPE == |
| 76 | |
| 77 | This routine initializes local observation information. The routine is only used by the domain-localized filters (LESTKF, LETKF, LSEIK, LNETF). |
| 78 | |
| 79 | For the initialization the following routine is called: |
| 80 | {{{ |
| 81 | CALL PDAFomi_init_dim_obs_l(thisobs_l, thisobs, coords_l, & |
| 82 | locweight, local_range, srange, dim_obs_l) |
| 83 | }}} |
| 84 | |
| 85 | Here, `thisobs` and `thisobs_l` are the data-type variables `obs_f` and `obs_l`. `dim_obs_l`, the local size of the observation vector, is the direct output of the routine. |
| 86 | |
| 87 | ''Implementation steps:'' |
| 88 | - Ensure that `coords_l` is filled in `init_dim_l_pdaf` |
| 89 | - Specify the localization variables (These variables are usually set in `init_pdaf` and included with `use mod_assimilation`) |
| 90 | - `locweight`: Type of localization (see init_pdaf) |
| 91 | - `local_range`: The localization weight radius |
| 92 | - `srange`: The support radius of the localization |
| 93 | |
| 94 | |
| 95 | |
| 96 | == localize_covar_TYPE == |
| 97 | |
| 98 | This routine initializes local observation information. The routine is only used by the local EnKF (LEnKF). |
| 99 | |
| 100 | For the initialization the following routine is called: |
| 101 | {{{ |
| 102 | CALL PDAFomi_localize_covar(thisobs, dim_p, locweight, local_range, srange, & |
| 103 | coords_p, HP_p, HPH) |
| 104 | }}} |
| 105 | |
| 106 | Here, `thisobs` is the data-type variable `obs_f`. `HP_p` and `HPH` are the covariance matrices projected onto the observations. The localization will be applied to these variables. |
| 107 | |
| 108 | ''Implementation steps:'' |
| 109 | - Ensure that `coords_p` is filled in `localize_covar_pdafomi` |
| 110 | - Specify the localization variables (These variables are usually set in `init_pdaf` and included with `use mod_assimilation`) |
| 111 | - `locweight`: Type of localization (see init_pdaf) |
| 112 | - `local_range`: The localization weight radius |
| 113 | - `srange`: The support radius of the localization |