Version 1 (modified by 5 years ago) (diff) | ,
---|

# init_dim_obs_l_pdaf

The page document the user-supplied call-back routine `init_dim_obs_l_pdaf`

.

The routine `init_dim_obs_l_pdaf`

(called `U_init_dim_obs_l`

inside the PDAF core routines) is a call-back routine that has to be provided by the user.
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_pdaf(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
`init_obs_l_pdaf`

is executed. Thus, as`init_dim_obs_l_pdaf`

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`init_obs_l_pdaf`

can be speeded up. - For PDAF, we could not join the routines
`init_dim_obs_l_pdaf`

and`init_obs_l_pdaf`

, because the array for the local observations is allocated internally of PDAF after its size has been determined in`init_dim_obs_l_pdaf`

.