One can run the same component models simultaneously or sequentially
by defining the appropriate LAG and SEQ indices. In the example
illustrated on figure 4.9, the models perform their
prism_put_proto and prism_get_proto calls exactly as
in the first lag example above (see 1. of 4.8.1): model A receives and then sends
; its timestep length is 4. During a coupling timestep, model B
receives
and then sends
; its timestep length is 6.
and
coupling periods are both 12. By defining a LAG index of -8
for
, the models will now run sequentially.
As the LAG for is positive (6), a reading of
in its
coupling restart file is automatically performed by OASIS3 to fulfill the initial
prism_get_proto. As the LAG for
is negative (-8), no
reading from file is performed initially and model B waits; at time 8,
a sending action is effectively performed below model A
prism_put_proto (as 8 + LAG (-8) = 0 which is the first coupling
timestep) and matches the initial model B
prism_get_proto. Below the last model A
prism_put_proto of the run at time 116, a sending action is
effectively performed, as
is a coupling period
(as the LAG is negative, the field is not written to its coupling
restart file). Below the last model B
prism_put_proto of
the run at time 114, a writing of
to its restart file is
performed, as
is a coupling period and as the LAG
is positive.
If the coupling fields are transformed through OASIS3 executable, it
is important to indicate a sequence index. In fact, at each OASIS3
coupling timestep, must be necessarily treated after
. Therefore,
and
.