The first section of namcouple uses some predefined keywords prefixed by the $ sign to locate the related information. The $ sign must be in the second column. The first ten keywords are described hereafter:
To use the CLIM/MPI2 communication technique, the lines below $CHANNEL are, e.g. for 3 models:
$CHANNEL MPI2 NOBSEND 1 1 arg1 3 1 arg2 3 1 arg3where MPI2 is the message passing used in CLIM and PSMILe, and NOBSEND indicates that standard basic send MPI_Send should be used in place of the default buffered MPI_BSend to send the coupling fields. The standard basic send MPI_Send can be used only if the coupling fields are sent and received in the same order by the different component models, i.e. the order into which they are listed in the namcouple, or on platforms for which MPI_Send is implemented with a sufficiently large mailbox. The less efficient default buffered send MPI_BSend should be used on platforms for which MPI_Send is not implemented with a mailbox7 if the coupling fields are not sent and received in the order into which they are listed in the namcouple8.
The following lines (one line per model listed on the $NBMODEL line) indicate for each model the total number of processes, the number of processes implied in the coupling, and possibly launching arguments9. Here the first model runs on one process which is of course implied in the coupling and the argument passed to the model is "arg1"; the second and third models run on 3 processes but only one process is implied in the coupling (i.e. exchanging information with OASIS3 main process), and the argument passed to the models are respectively ``arg2" and ``arg3''.
To use the CLIM/MPI1 communication technique, the $CHANNEL lines are as for MPI2 except that MPI2 is replaced by MPI1 and there is no launching arguments. With MPI1, models have to be started by the user in a pseudo-MPMD mode in the order they are introduced in the namcouple. The way to do this depends on the computing platform. With MPI1, OASIS3 main process and the component models automatically share the same MPI_COMM_WORLD communicator; in this communicator OASIS3 main process is assumed to have rank 0 and the other component models are assumed to have ranks in the order of which they are introduced in namcouple. If this is not the case, a deadlock may occur.
In some cases, an additional number has to be specified on the same line after the total number of fields exchanged. This number, corresponding to the maximum number of prism_def_var_proto called by ANY component model in the coupled system, is mandatory if it is greater than twice the number of fields listed in the namcouple; this may be the case if OASIS3 is used in IPSL parallel mode (see section 8.2.1) or if fields declared with prism_def_var_proto call in the component code are not activated in the namcouple (in this case, the corresponding sending and receiving calls in the component code simply return without any action performed).
Then the user may indicate the maximum Fortran unit number used by the models. In the example, Fortran units above 55, 70, and 99 are free for respectively the ocean, atmosphere, and atmospheric chemistry models. If no maximum unit numbers are indicated, OASIS3 PSMILe will suppose that units above 1024 are free. If $CHANNEL is NONE, $NBMODEL has to be 0 and there should be no model name and no unit number.