New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
lbclnk.F90 in NEMO/trunk/src/OCE/LBC – NEMO

source: NEMO/trunk/src/OCE/LBC/lbclnk.F90 @ 14229

Last change on this file since 14229 was 14229, checked in by smasson, 3 years ago

trunk: replace key_mpp_mpi by the opposite key key_mpi_off

  • Property svn:keywords set to Id
File size: 20.9 KB
Line 
1MODULE lbclnk
2   !!======================================================================
3   !!                       ***  MODULE  lbclnk  ***
4   !! NEMO        : lateral boundary conditions
5   !!=====================================================================
6   !! History :  OPA  ! 1997-06  (G. Madec)  Original code
7   !!   NEMO     1.0  ! 2002-09  (G. Madec)  F90: Free form and module
8   !!            3.2  ! 2009-03  (R. Benshila)  External north fold treatment
9   !!            3.5  ! 2012     (S.Mocavero, I. Epicoco)  optimization of BDY comm. via lbc_bdy_lnk and lbc_obc_lnk
10   !!            3.4  ! 2012-12  (R. Bourdalle-Badie, G. Reffray)  add a C1D case
11   !!            3.6  ! 2015-06  (O. Tintó and M. Castrillo)  add lbc_lnk_multi
12   !!            4.0  ! 2017-03  (G. Madec) automatique allocation of array size (use with any 3rd dim size)
13   !!             -   ! 2017-04  (G. Madec) remove duplicated routines (lbc_lnk_2d_9, lbc_lnk_2d_multiple, lbc_lnk_3d_gather)
14   !!             -   ! 2017-05  (G. Madec) create generic.h90 files to generate all lbc and north fold routines
15   !!----------------------------------------------------------------------
16   !!           define the generic interfaces of lib_mpp routines
17   !!----------------------------------------------------------------------
18   !!   lbc_lnk       : generic interface for mpp_lnk_3d and mpp_lnk_2d routines defined in lib_mpp
19   !!   lbc_bdy_lnk   : generic interface for mpp_lnk_bdy_2d and mpp_lnk_bdy_3d routines defined in lib_mpp
20   !!----------------------------------------------------------------------
21   USE dom_oce        ! ocean space and time domain
22   USE lib_mpp        ! distributed memory computing library
23   USE lbcnfd         ! north fold
24   USE in_out_manager ! I/O manager
25
26   IMPLICIT NONE
27   PRIVATE
28
29   INTERFACE lbc_lnk
30      MODULE PROCEDURE   mpp_lnk_2d_sp   , mpp_lnk_3d_sp   , mpp_lnk_4d_sp
31      MODULE PROCEDURE   mpp_lnk_2d_dp   , mpp_lnk_3d_dp   , mpp_lnk_4d_dp
32   END INTERFACE
33   INTERFACE lbc_lnk_ptr
34      MODULE PROCEDURE   mpp_lnk_2d_ptr_sp , mpp_lnk_3d_ptr_sp , mpp_lnk_4d_ptr_sp
35      MODULE PROCEDURE   mpp_lnk_2d_ptr_dp , mpp_lnk_3d_ptr_dp , mpp_lnk_4d_ptr_dp
36   END INTERFACE
37   INTERFACE lbc_lnk_multi
38      MODULE PROCEDURE   lbc_lnk_2d_multi_sp , lbc_lnk_3d_multi_sp, lbc_lnk_4d_multi_sp
39      MODULE PROCEDURE   lbc_lnk_2d_multi_dp , lbc_lnk_3d_multi_dp, lbc_lnk_4d_multi_dp
40   END INTERFACE
41   INTERFACE lbc_lnk_nc_multi
42      MODULE PROCEDURE   lbc_lnk_nc_2d_sp, lbc_lnk_nc_3d_sp, lbc_lnk_nc_4d_sp
43      MODULE PROCEDURE   lbc_lnk_nc_2d_dp, lbc_lnk_nc_3d_dp, lbc_lnk_nc_4d_dp
44   END INTERFACE
45   INTERFACE lbc_lnk_nc
46      MODULE PROCEDURE   mpp_lnk_nc_2d_sp, mpp_lnk_nc_3d_sp, mpp_lnk_nc_4d_sp
47      MODULE PROCEDURE   mpp_lnk_nc_2d_dp, mpp_lnk_nc_3d_dp, mpp_lnk_nc_4d_dp
48   END INTERFACE
49   !
50   INTERFACE lbc_lnk_icb
51      MODULE PROCEDURE mpp_lnk_2d_icb_dp, mpp_lnk_2d_icb_sp
52   END INTERFACE
53
54   INTERFACE mpp_nfd
55      MODULE PROCEDURE   mpp_nfd_2d_sp    , mpp_nfd_3d_sp    , mpp_nfd_4d_sp
56      MODULE PROCEDURE   mpp_nfd_2d_dp    , mpp_nfd_3d_dp    , mpp_nfd_4d_dp
57      MODULE PROCEDURE   mpp_nfd_2d_ptr_sp, mpp_nfd_3d_ptr_sp, mpp_nfd_4d_ptr_sp
58      MODULE PROCEDURE   mpp_nfd_2d_ptr_dp, mpp_nfd_3d_ptr_dp, mpp_nfd_4d_ptr_dp
59
60   END INTERFACE
61
62   PUBLIC   lbc_lnk            ! ocean/ice lateral boundary conditions
63   PUBLIC   lbc_lnk_multi      ! modified ocean/ice lateral boundary conditions
64   PUBLIC   lbc_lnk_icb        ! iceberg lateral boundary conditions
65   PUBLIC   lbc_lnk_nc         ! ocean/ice lateral boundary conditions (MPI3 version)
66   PUBLIC   lbc_lnk_nc_multi   ! modified ocean/ice lateral boundary conditions (MPI3 version)
67
68#if ! defined key_mpi_off
69!$AGRIF_DO_NOT_TREAT
70   INCLUDE 'mpif.h'
71!$AGRIF_END_DO_NOT_TREAT
72#endif
73
74   INTEGER, PUBLIC, PARAMETER ::   jpfillnothing = 1
75   INTEGER, PUBLIC, PARAMETER ::   jpfillcst     = 2
76   INTEGER, PUBLIC, PARAMETER ::   jpfillcopy    = 3
77   INTEGER, PUBLIC, PARAMETER ::   jpfillperio   = 4
78   INTEGER, PUBLIC, PARAMETER ::   jpfillmpi     = 5
79
80   !! * Substitutions
81#  include "do_loop_substitute.h90"
82   !!----------------------------------------------------------------------
83   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
84   !! $Id$
85   !! Software governed by the CeCILL license (see ./LICENSE)
86   !!----------------------------------------------------------------------
87CONTAINS
88
89   !!----------------------------------------------------------------------
90   !!                   ***   load_ptr_(2,3,4)d   ***
91   !!
92   !!   * Dummy Argument :
93   !!       in    ==>   ptab       ! array to be loaded (2D, 3D or 4D)
94   !!                   cd_nat     ! nature of pt2d array grid-points
95   !!                   psgn       ! sign used across the north fold boundary
96   !!       inout <=>   ptab_ptr   ! array of 2D, 3D or 4D pointers
97   !!                   cdna_ptr   ! nature of ptab array grid-points
98   !!                   psgn_ptr   ! sign used across the north fold boundary
99   !!                   kfld       ! number of elements that has been attributed
100   !!----------------------------------------------------------------------
101
102   !!----------------------------------------------------------------------
103   !!                  ***   lbc_lnk_(2,3,4)d_multi   ***
104   !!                     ***   load_ptr_(2,3,4)d   ***
105   !!
106   !!   * Argument : dummy argument use in lbc_lnk_multi_... routines
107   !!
108   !!----------------------------------------------------------------------
109
110   !!
111   !!   ----   SINGLE PRECISION VERSIONS
112   !!
113#  define SINGLE_PRECISION
114#  define DIM_2d
115#     define ROUTINE_LOAD           load_ptr_2d_sp
116#     define ROUTINE_MULTI          lbc_lnk_2d_multi_sp
117#     include "lbc_lnk_multi_generic.h90"
118#     undef ROUTINE_MULTI
119#     undef ROUTINE_LOAD
120#  undef DIM_2d
121
122#  define DIM_3d
123#     define ROUTINE_LOAD           load_ptr_3d_sp
124#     define ROUTINE_MULTI          lbc_lnk_3d_multi_sp
125#     include "lbc_lnk_multi_generic.h90"
126#     undef ROUTINE_MULTI
127#     undef ROUTINE_LOAD
128#  undef DIM_3d
129
130#  define DIM_4d
131#     define ROUTINE_LOAD           load_ptr_4d_sp
132#     define ROUTINE_MULTI          lbc_lnk_4d_multi_sp
133#     include "lbc_lnk_multi_generic.h90"
134#     undef ROUTINE_MULTI
135#     undef ROUTINE_LOAD
136#  undef DIM_4d
137#  undef SINGLE_PRECISION
138   !!
139   !!   ----   DOUBLE PRECISION VERSIONS
140   !!
141
142#  define DIM_2d
143#     define ROUTINE_LOAD           load_ptr_2d_dp
144#     define ROUTINE_MULTI          lbc_lnk_2d_multi_dp
145#     include "lbc_lnk_multi_generic.h90"
146#     undef ROUTINE_MULTI
147#     undef ROUTINE_LOAD
148#  undef DIM_2d
149
150#  define DIM_3d
151#     define ROUTINE_LOAD           load_ptr_3d_dp
152#     define ROUTINE_MULTI          lbc_lnk_3d_multi_dp
153#     include "lbc_lnk_multi_generic.h90"
154#     undef ROUTINE_MULTI
155#     undef ROUTINE_LOAD
156#  undef DIM_3d
157
158#  define DIM_4d
159#     define ROUTINE_LOAD           load_ptr_4d_dp
160#     define ROUTINE_MULTI          lbc_lnk_4d_multi_dp
161#     include "lbc_lnk_multi_generic.h90"
162#     undef ROUTINE_MULTI
163#     undef ROUTINE_LOAD
164#  undef DIM_4d
165
166   !!----------------------------------------------------------------------
167   !!                   ***  routine mpp_lnk_(2,3,4)d  ***
168   !!
169   !!   * Argument : dummy argument use in mpp_lnk_... routines
170   !!                ptab      :   array or pointer of arrays on which the boundary condition is applied
171   !!                cd_nat    :   nature of array grid-points
172   !!                psgn      :   sign used across the north fold boundary
173   !!                kfld      :   optional, number of pt3d arrays
174   !!                kfillmode :   optional, method to be use to fill the halos (see jpfill* variables)
175   !!                pfillval  :   optional, background value (used with jpfillcopy)
176   !!----------------------------------------------------------------------
177   !
178   !                       !==  2D array and array of 2D pointer  ==!
179   !
180   !!
181   !!   ----   SINGLE PRECISION VERSIONS
182   !!
183# define SINGLE_PRECISION
184#  define DIM_2d
185#     define ROUTINE_LNK           mpp_lnk_2d_sp
186#     include "mpp_lnk_generic.h90"
187#     undef ROUTINE_LNK
188#     define MULTI
189#     define ROUTINE_LNK           mpp_lnk_2d_ptr_sp
190#     include "mpp_lnk_generic.h90"
191#     undef ROUTINE_LNK
192#     undef MULTI
193#  undef DIM_2d
194   !
195   !                       !==  3D array and array of 3D pointer  ==!
196   !
197#  define DIM_3d
198#     define ROUTINE_LNK           mpp_lnk_3d_sp
199#     include "mpp_lnk_generic.h90"
200#     undef ROUTINE_LNK
201#     define MULTI
202#     define ROUTINE_LNK           mpp_lnk_3d_ptr_sp
203#     include "mpp_lnk_generic.h90"
204#     undef ROUTINE_LNK
205#     undef MULTI
206#  undef DIM_3d
207   !
208   !                       !==  4D array and array of 4D pointer  ==!
209   !
210#  define DIM_4d
211#     define ROUTINE_LNK           mpp_lnk_4d_sp
212#     include "mpp_lnk_generic.h90"
213#     undef ROUTINE_LNK
214#     define MULTI
215#     define ROUTINE_LNK           mpp_lnk_4d_ptr_sp
216#     include "mpp_lnk_generic.h90"
217#     undef ROUTINE_LNK
218#     undef MULTI
219#  undef DIM_4d
220# undef SINGLE_PRECISION
221
222   !!
223   !!   ----   DOUBLE PRECISION VERSIONS
224   !!
225#  define DIM_2d
226#     define ROUTINE_LNK           mpp_lnk_2d_dp
227#     include "mpp_lnk_generic.h90"
228#     undef ROUTINE_LNK
229#     define MULTI
230#     define ROUTINE_LNK           mpp_lnk_2d_ptr_dp
231#     include "mpp_lnk_generic.h90"
232#     undef ROUTINE_LNK
233#     undef MULTI
234#  undef DIM_2d
235   !
236   !                       !==  3D array and array of 3D pointer  ==!
237   !
238#  define DIM_3d
239#     define ROUTINE_LNK           mpp_lnk_3d_dp
240#     include "mpp_lnk_generic.h90"
241#     undef ROUTINE_LNK
242#     define MULTI
243#     define ROUTINE_LNK           mpp_lnk_3d_ptr_dp
244#     include "mpp_lnk_generic.h90"
245#     undef ROUTINE_LNK
246#     undef MULTI
247#  undef DIM_3d
248   !
249   !                       !==  4D array and array of 4D pointer  ==!
250   !
251#  define DIM_4d
252#     define ROUTINE_LNK           mpp_lnk_4d_dp
253#     include "mpp_lnk_generic.h90"
254#     undef ROUTINE_LNK
255#     define MULTI
256#     define ROUTINE_LNK           mpp_lnk_4d_ptr_dp
257#     include "mpp_lnk_generic.h90"
258#     undef ROUTINE_LNK
259#     undef MULTI
260#  undef DIM_4d
261
262   !!----------------------------------------------------------------------
263   !!                   ***   load_ptr_(2,3,4)d   ***
264   !!
265   !!   * Dummy Argument :
266   !!       in    ==>   ptab       ! array to be loaded (2D, 3D or 4D)
267   !!                   cd_nat     ! nature of pt2d array grid-points
268   !!                   psgn       ! sign used across the north fold boundary
269   !!       inout <=>   ptab_ptr   ! array of 2D, 3D or 4D pointers
270   !!                   cdna_ptr   ! nature of ptab array grid-points
271   !!                   psgn_ptr   ! sign used across the north fold boundary
272   !!                   kfld       ! number of elements that has been attributed
273   !!----------------------------------------------------------------------
274
275   !!----------------------------------------------------------------------
276   !!                  ***   lbc_lnk_nc(2,3,4)d_multi   ***
277   !!                     ***   load_ptr_(2,3,4)d   ***
278   !!
279   !!   * Argument : dummy argument use in lbc_lnk_nc_multi_... routines
280   !!
281   !!----------------------------------------------------------------------
282
283   !!
284   !!   ----   SINGLE PRECISION VERSIONS
285   !!
286#  define SINGLE_PRECISION
287#  define DIM_2d
288#     define ROUTINE_NC_LOAD           load_ptr_nc_2d_sp
289#     define ROUTINE_MULTI_NC          lbc_lnk_nc_2d_sp
290#     include "lbc_lnk_nc_generic.h90"
291#     undef ROUTINE_MULTI_NC
292#     undef ROUTINE_NC_LOAD
293#  undef DIM_2d
294
295#  define DIM_3d
296#     define ROUTINE_NC_LOAD           load_ptr_nc_3d_sp
297#     define ROUTINE_MULTI_NC          lbc_lnk_nc_3d_sp
298#     include "lbc_lnk_nc_generic.h90"
299#     undef ROUTINE_MULTI_NC
300#     undef ROUTINE_NC_LOAD
301#  undef DIM_3d
302
303#  define DIM_4d
304#     define ROUTINE_NC_LOAD           load_ptr_nc_4d_sp
305#     define ROUTINE_MULTI_NC          lbc_lnk_nc_4d_sp
306#     include "lbc_lnk_nc_generic.h90"
307#     undef ROUTINE_MULTI_NC
308#     undef ROUTINE_NC_LOAD
309#  undef DIM_4d
310#  undef SINGLE_PRECISION
311   !!
312   !!   ----   DOUBLE PRECISION VERSIONS
313   !!
314
315#  define DIM_2d
316#     define ROUTINE_NC_LOAD           load_ptr_nc_2d_dp
317#     define ROUTINE_MULTI_NC          lbc_lnk_nc_2d_dp
318#     include "lbc_lnk_nc_generic.h90"
319#     undef ROUTINE_MULTI_NC
320#     undef ROUTINE_NC_LOAD
321#  undef DIM_2d
322
323#  define DIM_3d
324#     define ROUTINE_NC_LOAD           load_ptr_nc_3d_dp
325#     define ROUTINE_MULTI_NC          lbc_lnk_nc_3d_dp
326#     include "lbc_lnk_nc_generic.h90"
327#     undef ROUTINE_MULTI_NC
328#     undef ROUTINE_NC_LOAD
329#  undef DIM_3d
330
331#  define DIM_4d
332#     define ROUTINE_NC_LOAD           load_ptr_nc_4d_dp
333#     define ROUTINE_MULTI_NC          lbc_lnk_nc_4d_dp
334#     include "lbc_lnk_nc_generic.h90"
335#     undef ROUTINE_MULTI_NC
336#     undef ROUTINE_NC_LOAD
337#  undef DIM_4d
338
339   !!----------------------------------------------------------------------
340   !!                   ***  routine mpp_lnk_nc_(2,3,4)d  ***
341   !!
342   !!   * Argument : dummy argument use in mpp_lnk_... routines
343   !!                ptab      :   array or pointer of arrays on which the boundary condition is applied
344   !!                cd_nat    :   nature of array grid-points
345   !!                psgn      :   sign used across the north fold boundary
346   !!                kfld      :   optional, number of pt3d arrays
347   !!                kfillmode :   optional, method to be use to fill the halos (see jpfill* variables)
348   !!                pfillval  :   optional, background value (used with jpfillcopy)
349   !!----------------------------------------------------------------------
350   !
351   !                       !==  2D array and array of 2D pointer  ==!
352   !
353   !!
354   !!   ----   SINGLE PRECISION VERSIONS
355   !!
356# define SINGLE_PRECISION
357#  define DIM_2d
358#     define ROUTINE_NC           mpp_lnk_nc_2d_sp
359#     include "mpp_nc_generic.h90"
360#     undef ROUTINE_NC
361#  undef DIM_2d
362   !
363   !                       !==  3D array and array of 3D pointer  ==!
364   !
365#  define DIM_3d
366#     define ROUTINE_NC           mpp_lnk_nc_3d_sp
367#     include "mpp_nc_generic.h90"
368#     undef ROUTINE_NC
369#  undef DIM_3d
370   !
371   !                       !==  4D array and array of 4D pointer  ==!
372   !
373#  define DIM_4d
374#     define ROUTINE_NC           mpp_lnk_nc_4d_sp
375#     include "mpp_nc_generic.h90"
376#     undef ROUTINE_NC
377#  undef DIM_4d
378# undef SINGLE_PRECISION
379
380   !!
381   !!   ----   DOUBLE PRECISION VERSIONS
382   !!
383#  define DIM_2d
384#     define ROUTINE_NC           mpp_lnk_nc_2d_dp
385#     include "mpp_nc_generic.h90"
386#     undef ROUTINE_NC
387#  undef DIM_2d
388   !
389   !                       !==  3D array and array of 3D pointer  ==!
390   !
391#  define DIM_3d
392#     define ROUTINE_NC           mpp_lnk_nc_3d_dp
393#     include "mpp_nc_generic.h90"
394#     undef ROUTINE_NC
395#  undef DIM_3d
396   !
397   !                       !==  4D array and array of 4D pointer  ==!
398   !
399#  define DIM_4d
400#     define ROUTINE_NC           mpp_lnk_nc_4d_dp
401#     include "mpp_nc_generic.h90"
402#     undef ROUTINE_NC
403#  undef DIM_4d
404
405   !!----------------------------------------------------------------------
406   !!                   ***  routine mpp_nfd_(2,3,4)d  ***
407   !!
408   !!   * Argument : dummy argument use in mpp_nfd_... routines
409   !!                ptab      :   array or pointer of arrays on which the boundary condition is applied
410   !!                cd_nat    :   nature of array grid-points
411   !!                psgn      :   sign used across the north fold boundary
412   !!                kfld      :   optional, number of pt3d arrays
413   !!                kfillmode :   optional, method to be use to fill the halos (see jpfill* variables)
414   !!                pfillval  :   optional, background value (used with jpfillcopy)
415   !!----------------------------------------------------------------------
416   !
417   !                       !==  2D array and array of 2D pointer  ==!
418   !
419   !!
420   !!   ----   SINGLE PRECISION VERSIONS
421   !!
422#  define SINGLE_PRECISION
423#  define DIM_2d
424#     define ROUTINE_NFD           mpp_nfd_2d_sp
425#     include "mpp_nfd_generic.h90"
426#     undef ROUTINE_NFD
427#     define MULTI
428#     define ROUTINE_NFD           mpp_nfd_2d_ptr_sp
429#     include "mpp_nfd_generic.h90"
430#     undef ROUTINE_NFD
431#     undef MULTI
432#  undef DIM_2d
433   !
434   !                       !==  3D array and array of 3D pointer  ==!
435   !
436#  define DIM_3d
437#     define ROUTINE_NFD           mpp_nfd_3d_sp
438#     include "mpp_nfd_generic.h90"
439#     undef ROUTINE_NFD
440#     define MULTI
441#     define ROUTINE_NFD           mpp_nfd_3d_ptr_sp
442#     include "mpp_nfd_generic.h90"
443#     undef ROUTINE_NFD
444#     undef MULTI
445#  undef DIM_3d
446   !
447   !                       !==  4D array and array of 4D pointer  ==!
448   !
449#  define DIM_4d
450#     define ROUTINE_NFD           mpp_nfd_4d_sp
451#     include "mpp_nfd_generic.h90"
452#     undef ROUTINE_NFD
453#     define MULTI
454#     define ROUTINE_NFD           mpp_nfd_4d_ptr_sp
455#     include "mpp_nfd_generic.h90"
456#     undef ROUTINE_NFD
457#     undef MULTI
458#  undef DIM_4d
459#  undef SINGLE_PRECISION
460
461   !!
462   !!   ----   DOUBLE PRECISION VERSIONS
463   !!
464#  define DIM_2d
465#     define ROUTINE_NFD           mpp_nfd_2d_dp
466#     include "mpp_nfd_generic.h90"
467#     undef ROUTINE_NFD
468#     define MULTI
469#     define ROUTINE_NFD           mpp_nfd_2d_ptr_dp
470#     include "mpp_nfd_generic.h90"
471#     undef ROUTINE_NFD
472#     undef MULTI
473#  undef DIM_2d
474   !
475   !                       !==  3D array and array of 3D pointer  ==!
476   !
477#  define DIM_3d
478#     define ROUTINE_NFD           mpp_nfd_3d_dp
479#     include "mpp_nfd_generic.h90"
480#     undef ROUTINE_NFD
481#     define MULTI
482#     define ROUTINE_NFD           mpp_nfd_3d_ptr_dp
483#     include "mpp_nfd_generic.h90"
484#     undef ROUTINE_NFD
485#     undef MULTI
486#  undef DIM_3d
487   !
488   !                       !==  4D array and array of 4D pointer  ==!
489   !
490#  define DIM_4d
491#     define ROUTINE_NFD           mpp_nfd_4d_dp
492#     include "mpp_nfd_generic.h90"
493#     undef ROUTINE_NFD
494#     define MULTI
495#     define ROUTINE_NFD           mpp_nfd_4d_ptr_dp
496#     include "mpp_nfd_generic.h90"
497#     undef ROUTINE_NFD
498#     undef MULTI
499#  undef DIM_4d
500
501   !!======================================================================
502
503
504   !!======================================================================
505     !!---------------------------------------------------------------------
506      !!                   ***  routine mpp_lbc_north_icb  ***
507      !!
508      !! ** Purpose :   Ensure proper north fold horizontal bondary condition
509      !!              in mpp configuration in case of jpn1 > 1 and for 2d
510      !!              array with outer extra halo
511      !!
512      !! ** Method  :   North fold condition and mpp with more than one proc
513      !!              in i-direction require a specific treatment. We gather
514      !!              the 4+kextj northern lines of the global domain on 1
515      !!              processor and apply lbc north-fold on this sub array.
516      !!              Then we scatter the north fold array back to the processors.
517      !!              This routine accounts for an extra halo with icebergs
518      !!              and assumes ghost rows and columns have been suppressed.
519      !!
520      !!----------------------------------------------------------------------
521#     define SINGLE_PRECISION
522#     define ROUTINE_LNK           mpp_lbc_north_icb_sp
523#     include "mpp_lbc_north_icb_generic.h90"
524#     undef ROUTINE_LNK
525#     undef SINGLE_PRECISION
526#     define ROUTINE_LNK           mpp_lbc_north_icb_dp
527#     include "mpp_lbc_north_icb_generic.h90"
528#     undef ROUTINE_LNK
529
530
531      !!----------------------------------------------------------------------
532      !!                  ***  routine mpp_lnk_2d_icb  ***
533      !!
534      !! ** Purpose :   Message passing management for 2d array (with extra halo for icebergs)
535      !!                This routine receives a (1-kexti:jpi+kexti,1-kexti:jpj+kextj)
536      !!                array (usually (0:jpi+1, 0:jpj+1)) from lbc_lnk_icb calls.
537      !!
538      !! ** Method  :   Use mppsend and mpprecv function for passing mask
539      !!      between processors following neighboring subdomains.
540      !!            domain parameters
541      !!                    jpi    : first dimension of the local subdomain
542      !!                    jpj    : second dimension of the local subdomain
543      !!                    kexti  : number of columns for extra outer halo
544      !!                    kextj  : number of rows for extra outer halo
545      !!                    nbondi : mark for "east-west local boundary"
546      !!                    nbondj : mark for "north-south local boundary"
547      !!                    noea   : number for local neighboring processors
548      !!                    nowe   : number for local neighboring processors
549      !!                    noso   : number for local neighboring processors
550      !!                    nono   : number for local neighboring processors
551      !!----------------------------------------------------------------------
552
553#     define SINGLE_PRECISION
554#     define ROUTINE_LNK           mpp_lnk_2d_icb_sp
555#     include "mpp_lnk_icb_generic.h90"
556#     undef ROUTINE_LNK
557#     undef SINGLE_PRECISION
558#     define ROUTINE_LNK           mpp_lnk_2d_icb_dp
559#     include "mpp_lnk_icb_generic.h90"
560#     undef ROUTINE_LNK
561
562END MODULE lbclnk
Note: See TracBrowser for help on using the repository browser.