| 1 | = init_dim_l_pdaf = |

| 2 | |

| 3 | The page document the user-supplied call-back routine `init_dim_l_pdaf`. |

| 4 | |

| 5 | The routine `init_dim_l_pdaf` (called `U_init_dim_l` inside the PDAF core routines) is a call-back routine that has to be provided by the user. |

| 6 | The routine is used with all filter algorithms using domain-localization (LSEIK, LETKF, LESTKF) and is independent of the particular algorithm. |

| 7 | The routine is called during the loop over the local analysis domains in the analysis step. It has to provide the dimension of the sub-state vector for the specified local analysis domain. |

| 8 | |

| 9 | The interface is the following: |

| 10 | {{{ |

| 11 | SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) |

| 12 | }}} |

| 13 | with |

| 14 | * `step` : `integer, intent(in)`[[BR]] Current time step |

| 15 | * `domain_p` : `integer, intent(in)`[[BR]] Index of current local analysis domain |

| 16 | * `dim_l` :: `integer, intent(out)`[[BR]] Dimension of state vector in local analysis domain |

| 17 | |

| 18 | Hints: |

| 19 | * If a local analysis domain is a single grid point, the dimension of the local state vector is the number of model fields at this grid point. |

| 20 | * If a local analysis domain is a single vertical column of the model grid, the size of the state in the local analysis domain will be just the number of vertical grid points at this location times the number of 3-dimensional fields, plus the number of 2D fields. |