Changes between Initial Version and Version 1 of U_collect_state

Jan 21, 2015, 11:52:40 AM (6 years ago)



  • U_collect_state

    v1 v1  
     1= U_collect_state =
     3The page document the user-supplied call-back routine `U_collect_state`.
     5The routine `U_collect_state` is a call-back routine that has to be provided by the user. In the simplified interface the predefined name of the routine is `collect_state_pdaf`, but in the full interface, the user can choose the name of the routine.
     6`U_collect_state` is called by `PDAF_put_state_X` or `PDAF_assimilate_X` with 'X' being the name of a filter method. The routine is called at the end of a forecast once for each ensemble member and as many times as there are states to be integrated by a model task. The purpose of the routine is to write the information from the model fields into the state vector that is used by PDAF to compute the analysis step.
     8The interface is the following:
     10SUBROUTINE U_collect_state(dim_p, state_p)
     13 * `dim_p` : `integer, intent(in)`[[BR]] Size of the provided state vector
     14 * `state_p`: `real, intent(inout), dimension(dim_p)`[[BR]] State vector for process-local model sub-domain
     17 * When the routine is called a state vector `state_p` and its size `dim_p` are provided. As the user has defined how the model fields are stored in the state vector, one can fill state vector from the model fields.
     18 * If the model is not parallelized, `state_p` will contain a full state vector. If the model is parallelized using domain decomposition, `state_p` will contain the part of the state vector that corresponds to the model sub-domain for the calling process.
     19 * The operations performed in `U_distribute_state` and `U_collect_state` are the inverse operations of each other.
     20 * The routine is executed by all processes that belong to model tasks.
     22Some hints:
     23 * If the state vector does not include all model fields, it can be useful to keep a separate array to store those additional fields. This array has to be kept separate from PDAF, but can be defined using a module like `mod_assimilation`.