wiki:U_init_dim_obs_l

Version 1 (modified by lnerger, 8 years ago) (diff)

--

U_init_dim_obs_l

The page document the user-supplied call-back routine U_init_dim_obs_l.

The routine U_init_dim_obs_l is a call-back routine that has to be provided by the user. In the simplified interface the predefined name of the routine is init_dim_obs_l_pdaf, but in the full interface, the user can choose the name of the routine. The routine is used with all filter algorithms using domain-localization (LSEIK, LETKF, LESTKF) and is independent of the particular algorithm. The routine is called during the loop over the local analysis domains in the analysis step. It has to initialize the size of the observation vector used for the specified local analysis domain.

The interface is the following:

SUBROUTINE init_dim_obs_l(domain_p, step, dim_obs_f, dim_obs_l)

with

  • domain_p : integer, intent(in)
    Index of current local analysis domain
  • step : integer, intent(in)
    Current time step
  • dim_obs_f : integer, intent(in)
    Size of the full observation vector
  • dim_obs_l : integer, intent(out)
    Local dimension of observation vector

Some hints:

  • Usually, the observations to be considered for a local analysis are those which reside within some distance from the local analysis domain. Thus, if the local analysis domain is a single model grid point and if the model grid is a regular ij-grid, then one could use some range of i/j indices to select the observations and determine the local number of them. More generally, one can compute the physical distance of an observation from the local analysis domain and decide on this basis, if the observation has to be considered.
  • In the loop over the local analysis domains, the routine is always called before U_init_obs_l is executed. Thus, as U_init_dim_obs_l has to check which observations should be used for the local analysis domain, one can already initialize an integer array that stores the index of observations to be considered. This index should be the position of the observation in the array observation_f. With this, the initialization of the local observation vector in U_init_obs_l can be speeded up.
  • For PDAF, we could not join the routines U_init_dim_obs_l and U_init_obs_l, because the array for the local observations is allocated internally of PDAF after its size has been determined in U_init_dim_obs_l.