Coupling field declaration
All processes of a component that send or receive a coupling field, or a part of it, needs to declare the coupling field.
Processes not implied in the
coupling do not have to call this routine at all (for backward
compatibility with OASIS3-MCT_2.0, they may still call it with any name and il_part_id).
- CALL oasis_def_var (var_id, name, il_part_id,
- CALL prism_def_var_proto(var_id, name, il_part_id,
var_nodims, kinout, var_actual_shape, var_type, ierror)
- var_id [INTEGER; OUT]: coupling field ID. Note that all
coupling fields appearing in the namcouple must be defined with
a call to oasis_def_var; not doing so would lead to an abort.
But all fields defined with a call to oasis_def_var must not necessarily
appear in the namcouple. If a field does not appear in the namcouple,
the var_id returned by the oasis_def_var will be equal to -1;
the value of the var_id should be tested and the corresponding
oasis_put and oasis_get should not be called if var_id
equals -1. These constraints are imposed to avoid that a typo in the namcouple
would lead to coupling exchanges not corresponding to what the user intends to activate.
- name [CHARACTER; IN]: field symbolic name (as in the
namcouple); maximum length of 80 characters
- il_part_id [INTEGER; IN]: partition ID returned from oasis_def_partition (see section
- var_nodims [INTEGER, DIMENSION(2); INOUT]: var_nodims(1)
is not used anymore in OASIS3-MCT so its value can be anything
but it is still part of the oasis_def_var arguments; var_nodims(2)
is the number of fields in a bundle (this will be 1 for unbundled
fields or greater than 1 for fields that are bundled; note that
if var_nodims(2)=0, it will be automatically put to 1 in the
routine, to ensure upward compatibility).
- kinout [INTEGER; IN]: OASIS_In or PRISM_In
(i.e. = 21) for fields received by the component; OASIS_Out,
PRISM_Out (i.e. = 20) for fields sent by the component
- var_actual_shape [INTEGER, DIMENSION(2*id_var_nodims(1)), IN]:
not used anymore; vector of integers of any length (for simplicity
we advise to pass a vector of length 1)
- var_type [INTEGER; IN]: type of coupling field array;
put OASIS_Real or PRISM_Real (i.e. = 4) for single
or double precision real arrays. All coupling data is treated as
double precision in the coupling layer, but conversion to or from
single precision data is supported in the interface.
- ierror [INTEGER; OUT]: returned error code.
- ... component4
- Parameters OASIS_In, PRISM_In, OASIS_Out, PRISM_Out
are defined in