5 Data structures

The subroutine assim requires as an argument a part of the model state for local assimilation. The way the data is distributed can be explained by the following steps:

  1. for each variable concatenate the model sub-domains (if the model domain is decomposed into sub-domains)
  2. concatenate all variables
  3. remove masked elements
  4. permute the order of the elements so that all elements belong to the same zone are continuous in memory. The elements are “sorted” using numeric labels in the partition vector (the sort is stable, i.e. if two elements have the same partition label, their order is not changed).
  5. each vector is distributed among the available processes

The actual implements avoid to form a global vector spanning the entire state vector and goes directly from the first step to the last.