91 | | The main steps performed in this routine are |
92 | | 1. `thisobs%doassim`: Specify whether this observation type is assimilated |
93 | | 1. `thisobs%disttype`: Specify the type of distance computation |
94 | | 1. `thisobs%ncoord`: Specify the number of dimensions used to compute distances |
95 | | 1. `dim_obs_p`: Count the number of available observations |
96 | | 1. `obs_p`: Fill the vector of observations |
97 | | 1. `ocoord_p`: store the coordinates of the observations |
98 | | 1. `ivar_obs_p`: store the inverse error variance of each observation |
99 | | 1. `thisobs%id_obs_p`: store the indices of state vector elements that correspond to an observation (A single value for observation at grid points, or multiple values for derived quantities or interpolation) |
100 | | |
101 | | When the observation operator performs interpolation, one further needs to initialize an array of interpolation coefficients (`thisobs%icoeff_p`). For Cartesian distance computation with periodicity one also needs to set `thisobs%domainsize`. |
| 91 | The main variables that the filled in this routine are |
| 92 | 1. [wiki:OMI_observation_modules#thisobsdoassim thisobs%doassim]: Specify whether this observation type is assimilated |
| 93 | 1. [wiki:OMI_observation_modules#thisobsdisttype thisobs%disttype]: Specify the type of distance computation |
| 94 | 1. [wiki:OMI_observation_modules#thisobsncoord thisobs%ncoord]: Specify the number of dimensions used to compute distances |
| 95 | 1. [wiki:OMI_observation_modules#dim_obs_p dim_obs_p]: Count the number of available observations |
| 96 | 1. [wiki:OMI_observation_modules#obs_p obs_p]: Fill the vector of observations |
| 97 | 1. [wiki:OMI_observation_modules#ocoord_p ocoord_p]: store the coordinates of the observations |
| 98 | 1. [wiki:OMI_observation_modules#ivar_obs_p ivar_obs_p]: store the inverse error variance of each observation |
| 99 | 1. [wiki:OMI_observation_modules#thisobsid_obs_p thisobs%id_obs_p]: store the indices of state vector elements that correspond to an observation (A single value for observation at grid points, or multiple values for derived quantities or interpolation) |
| 100 | |
| 101 | When the observation operator performs interpolation, one further needs to initialize an array of interpolation coefficients ([wiki:OMI_observation_modules#thisobsicoeff_p thisobs%icoeff_p]). For Cartesian distance computation with periodicity one also needs to set [wiki:OMI_observation_modules#thisobsdomainsize thisobs%domainsize]. |
209 | | === `thisobs%domainsize` === |
210 | | |
211 | | This array has to be allocated as |
212 | | {{{ |
213 | | ALLOCATE(thisobs%domainsize(thisobs%ncoord)) |
214 | | }}} |
215 | | Here one has to specify the size of the domain in each of its thisobs%ncoord dimensions. The information is used to compute the Cartesian distance with periodicity. |
216 | | |
217 | | Setting one dimension to 0 or a negative value indicates that there is no periodicity in this direction. |
| 209 | |
| 210 | === `dim_obs_p` === |
| 211 | |
| 212 | This is a single integer value giving the number of observations. With a parallel model using domain-decomposition this will be the number of observations for the process sub-domain. For observation files holding all observations one can read these and then check which observation redice within the process sub-domain. `dim_obs_p` will be used to allocate further arrays and as input argument to `PDAFomi_gather_obs`. |
| 213 | |
| 214 | === `obs_p` === |
| 215 | |
| 216 | This should be a vector of real values. It will be used as an argument to `PDAFomi_gather_obs`. The order of the entries has to be consistent in the arrays `thisobs%id_obs_p`, `obs_p`, `ivar_obs_p`, and `ocoord_p`. |
| 217 | |
| 218 | |
| 219 | === `ocoord_p` === |
| 220 | |
| 221 | This should be a rank-2 array of real values with size (thisobs%ncoord, dim_obs_p). It will be used as an argument to `PDAFomi_gather_obs`. The order of the entries has to be consistent in the arrays `thisobs%id_obs_p`, `obs_p`, `ivar_obs_p`, and `ocoord_p`. |
| 222 | |
| 223 | The coordinates of the observation with index `k` are given by `ocoord_p(:,k)`. |
| 224 | |
| 225 | |
| 226 | === `ivar_obs_p` === |
| 227 | |
| 228 | This should be a vector of real values. It will be used as an argument to `PDAFomi_gather_obs`. The order of the entries has to be consistent in the arrays `thisobs%id_obs_p`, `obs_p`, `ivar_obs_p`, and `ocoord_p`. |