Case 1 :
In examples/test_simple_options : 2 models, namcouple_1

One field sent from m1 to m2 and one field sent from m2 to m1

model1 runs on 5 procs with
DECOMP_APPLE
results for proc 0:
Laure : m,kparal             1            1            0         5278
Laure : prism_part(m)%gsmap%nsegs             1            5
Decomposition description in mod_oasis_part/oasis_part_setup for apple:
elseif (kparal(CLIM_Strategy) == CLIM_Apple) then
nsegs = 1
allocate(start(nsegs),length(nsegs))
start (1) = kparal(CLIM_Offset) + 1
length(1) = kparal(CLIM_Length)
numel = nsegs
if (length(1) == 0) numel = 0

model2 runs on 3 procs with
DECOMP_BOX
results for proc 0:
Laure : m,kparal             1            2            0           96        24           96
Laure : prism_part(m)%gsmap%nsegs             1           72
Decomposition description in mod_oasis_part/oasis_part_setup for box:
elseif (kparal(CLIM_Strategy) == CLIM_Box) then
nsegs = kparal(CLIM_SizeY)
allocate(start(nsegs),length(nsegs))
do n = 1,nsegs
start (n) = kparal(CLIM_Offset) + (n-1)*kparal(CLIM_LdX) + 1
length(n) = kparal(CLIM_SizeX)
enddo
numel = nsegs
if (kparal(CLIM_SizeY)*kparal(CLIM_SizeX) == 0) numel = 0

m is the number of grid
For model1, there are 5 procs, each with one segment of the apple decomposition: there are then 5 segments in the global structure
For model2 nsegs is the number of points in the y direction of the decomposition and for each segment there is a start(n) and length(n). This is why there are 72 nsegs globally (which is the number of lat of the LMDz grid because there is no partition in X (
CLIM_SizeX = nlon))

When only some procs of mpi_comm_local own a global grid, kparal(3)=0, numel=0 for the others (ie of the same mpi_comm_local) but the value of nsegs is broadcast to all the procs of mpi_comm_local in mct_gsmap_init (see mod_oasis_part)

Reading the remapping file: option src
debug.01.000000
debug.01.000001
debug.01.000002
debug.01.000003
debug.01.000004

debug.02.000000
debug.02.000001
debug.02.000002

Reading the remapping file: option dst
debug.01.000000
debug.01.000001
debug.01.000002
debug.01.000003
debug.01.000004

debug.02.000000
debug.02.000001
debug.02.000002

===================================================================

Case 2 : In examples/test_1bin_sequential : 1 program with 3 models (model3 is not coupled)

model 2 on g ranks 0-1 (mype=0,1)
model 1 on g ranks 2-10 & 13-14-15 (mype=0,1,2,3,4,5,6,7,8,9,10,11)
model 3 on g ranks 11-12 (not coupled)

m=1 lmd2 local ranks 0-4
m=2 lmdz local ranks 6-9
m=3 lmdz local ranks 5-7
m=4 lmdz local ranks 0-4
m=5 orca local ranks 2-8

Name of output files based on gmype and not mype
model2.out_100, model2.out_101, model1.out_102, model1.out_103, model1.out_104, model1.out_105, model1.out_106, model1.out_107, model1.out_108, model1.out_109, model1.out_110, model1.out_113, model1.out_114, model1.out_115

model1.out*
Global dimensions nlon=           44  nlat=           44
grid             1           44           44
Global dimensions nlon=           96  nlat=           72
grid             2           96           72
Global dimensions nlon=           96  nlat=           72
grid             3           96           72
Global dimensions nlon=           96  nlat=           72
grid             4           96           72
Global dimensions nlon=          182  nlat=          149
grid             5          182          149

model1.out_102: (mype=0)
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=1            1            0  387
Called def_part binseq_part01            part_id(m=1)=1
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=2            0            0  0            ! il_paral=0 but oasis_def_partition is not called for m=2 (only the procs 6-9 will call it for m=2) so part_id(m=2)=0 for this proc
Called def_part binseq_part02            part_id(m=2)=0
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=3            0            0  0       ! il_paral=0 but oasis_def_partition is called for m=3 so part_id is not 0 and part_id(m=3)=3 for this proc
Called def_part binseq_part03            part_id(m=3)=2
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=4            1            0  1382
Called def_part binseq_part04            part_id(m=4)=3
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=5            0            0  0   ! il_paral=0 but oasis_def_partition is called for m=5 so part_id is not 0 and part_id(m=5)=4 for this proc
Called def_part binseq_part05            part_id(m=5)=4

model1.out_103: (mype=1)
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=1            1          387  387
Called def_part binseq_part01            part_id(m=1)=1
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=2            0            0  0
Called def_part binseq_part02            part_id(m=2)=0
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=3            0            0  0
Called def_part binseq_part03            part_id(m=3)=2
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=4            1         1382  1382
Called def_part binseq_part04            part_id(m=4)=3
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=5            0            0  0
Called def_part binseq_part05            part_id(m=5)=4

model1.out_104: (mype=2)
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=1            1          774  387
Called def_part binseq_part01            part1
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=2            0            0  0
Called def_part binseq_part02            part_id(m=2)=0
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=3            0            0  0
Called def_part binseq_part03            part_id(m=3)=2
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=4            1         2764  1382
Called def_part binseq_part04            part_id(m=4)=3
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=5            1            0  3874
Called def_part binseq_part05            part_id(m=5)=4

model1.out_105: (mype=3)
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=1            1         1161   387
Called def_part binseq_part01            part_id(m=1)=1
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=2            0            0  0
Called def_part binseq_part02            part_id(m=2)=0
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=3            0            0  0
Called def_part binseq_part03            part_id(m=3)=2
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=4            1         4146  1382
Called def_part binseq_part04            part_id(m=4)=3
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=5            1         3874  3874
Called def_part binseq_part05            part_id(m=5)=4

model1.out_106: (mype=4)
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=1            1         1548  388
Called def_part binseq_part01            part_id(m=1)=1
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=2            0            0  0
Called def_part binseq_part02            part_id(m=2)=0
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=3            0            0  0
Called def_part binseq_part03            2
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=4            1         5528  1384
Called def_part binseq_part04            part_id(m=4)=3
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=5            1         7748  3874
Called def_part binseq_part05            part_id(m=5)=4

model1.out_107: (mype=5)
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=1            0            0  0
Called def_part binseq_part01            part_id(m=1)=1
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=2            0            0  0
Called def_part binseq_part02            part_id(m=2)=0
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=3            1            0  2304
Called def_part binseq_part03            part_id(m=3)=2
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=4            0            0  0
Called def_part binseq_part04            part_id(m=4)=3
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=5            1        11622  3874
Called def_part binseq_part05            part_id(m=5)=4

model1.out_108: (mype=6)
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=1            0            0  0
Called def_part binseq_part01            part_id(m=1)=1
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=2            1            0  1728
Called def_part binseq_part02            part_id(m=2)=2
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=3            1         2304  2304
Called def_part binseq_part03            part_id(m=3)=3
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=4            0            0  0
Called def_part binseq_part04            part_id(m=4)=4
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=5            1        15496  3874
Called def_part binseq_part05            part_id(m=5)=5

model1.out_109: (mype=7)
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=1            0            0  0
Called def_part binseq_part01            part_id(m=1)=1
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=2            1         1728  1728
Called def_part binseq_part02            part_id(m=2)=2
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=3            1         4608  2304
Called def_part binseq_part03            part_id(m=3)=3
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=4            0            0  0
Called def_part binseq_part04            part_id(m=4)=4
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=5            1        19370  3874
Called def_part binseq_part05            part_id(m=5)=5

model1.out_110: (mype=8)
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=1            0            0  0
Called def_part binseq_part01            part_id(m=1)=1
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=2            1         3456  1728
Called def_part binseq_part02            part_id(m=2)=2
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=3            0            0  0
Called def_part binseq_part03            part_id(m=3)=3
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=4            0            0  0
Called def_part binseq_part04            part_id(m=4)=4
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=5            1        23244  3874
Called def_part binseq_part05            part_id(m=5)=5

model1.out_113: (mype=9)
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=1            0            0
Called def_part binseq_part01            part_id(m=1)=1
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=2            1         5184  1728
Called def_part binseq_part02            part_id(m=2)=2
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=3            0            0  0
Called def_part binseq_part03            part_id(m=3)=3
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=4            0            0  0
Called def_part binseq_part04            part_id(m=4)=4
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=5            0            0  0
Called def_part binseq_part05            part_id(m=5)=5

model1.out_114: (mype=10)
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=1            0            0  0
Called def_part binseq_part01            part_id(m=1)=1
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=2            0            0  0
Called def_part binseq_part02            part_id(m=2)=0
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=3            0            0  0
Called def_part binseq_part03            part_id(m=3)=2
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=4            0            0  0
Called def_part binseq_part04            part_id(m=4)=3
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=5            0            0  0
Called def_part binseq_part05            part_id(m=5)=4

model1.out_115: (mype=11)
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=1            0            0  0
Called def_part binseq_part01            part_id(m=1)=1
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=2            0            0  0
Called def_part binseq_part02            part_id(m=2)=0
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=3            0            0  0
Called def_part binseq_part03            part_id(m=3)=2
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=4            0            0  0
Called def_part binseq_part04            part_id(m=4)=3
APPLE partitioning
After allocate il_paral, il_size            3
After decomp_def, il_paral =             m=5            0            0  0
Called def_part binseq_part05            part_id(m=5)=4

debug.01.000000
(oasis_coupler_setup)mapID :            5
rmp_lmd2_to_lmdz_BILINEAR.nc
(oasis_coupler_setup)mapID :            6
rmp_lmdz_to_lmd2_BILINEAR.nc
(oasis_coupler_setup)mapID :            3
rmp_lmdz_to_lmd2_BILINEAR.nc
(oasis_coupler_setup)mapID :            1
rmp_lmdz_to_lmdz_BILINEAR.nc
(oasis_coupler_setup)mapID :            4
rmp_torc_to_lmdz_BILINEAR.nc
(oasis_coupler_setup)mapID :            2
rmp_lmdz_to_torc_BILINEAR.nc

debug.01.000001
(oasis_coupler_setup)mapID :            5
rmp_lmd2_to_lmdz_BILINEAR.nc
(oasis_coupler_setup)mapID :            6
rmp_lmdz_to_lmd2_BILINEAR.nc