To exchange the coupling fields going through OASIS3 main process
(i.e. with status EXPORTED, AU-
XILARY, or EXPOUT, see section 5), in a given order at each coupling timestep, a sequence index SEQ must be defined for each of them. This is not required for I/O fields or for coupling fields exchanged directly between the component models, i.e. with status IGNOUT, INPUT or OUTPUT. SEQ gives the position of the coupling field in the sequence.
A coupling algorithm, showing the SEQ concept, is illustrated on figure 4.6. All coupling field produced by the source model at the coupling timestep can be ``consumed'' by the target model at the same timestep without causing any deadlock situation; therefore, LAG = 0 for all coupling fields. However, at each coupling timestep, a particular order of exchange must be respected; must be received by model A before it can send , which in turn must be received by model B before it can send . Therefore, SEQ = 1, 2, 3 must be defined respectively for , and . As all fields can be consumed at the time they are produced (LAG=0 for all fields), there no reading/writing from/to coupling restart files.
An appropriate use of the SEQ index can optimise a coupled run when one of the component model is much slower than the other. This is illustrated on figure 4.7 and figure 4.8.
In figure 4.7 , a coupled run with no use of the SEQ index is illustrated. When the fast model reaches a coupling period, it sends its output coupling fields to OASIS that receives them and then waits until the slow model has also reaches the coupling period. Once OASIS3 has received the fields from both the fast and the slow components, it transforms them and send them respectively to the slow and the fast components. Only then the fast and the slow components are able to go on. The total elapse time for a coupling period is the sum of the slow model running time and the OASIS3 working time.
In the figure 4.8, an index SEQ = 1 is assigned to the coupling fields going from the fast to the slow component and an index SEQ = 2 is assigned to the coupling fields going from the slow to the fast component. When the fast model reaches a coupling period, it sends its output coupling fields to OASIS3 that receives them, treats them and sends them to the slow model. As soon as the slow model also reaches the coupling period, it sends its output coupling fields to OASIS, receives its input coupling fields right after, and is then able to go on without any delay. Concurrently, OASIS3 treats the slow model output component fields and sends them to the fast model that is then able to go on. Here the total elapse time for a coupling period is very close to the slow model running time only. One can see that using the SEQ index in this way results in ``hiding'' OASIS3 working time behind the slow model running time. Note that in this case, the default buffered send must be used (i.e the NOBSEND option cannot be specified in the namcouple, see section 5.2).