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.
lbcnfd.F90 in NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC – NEMO

source: NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/lbcnfd.F90 @ 11719

Last change on this file since 11719 was 11719, checked in by francesca, 4 years ago

add extra halo support- ticket #2009

  • Property svn:keywords set to Id
File size: 6.4 KB
RevLine 
[1344]1MODULE lbcnfd
2   !!======================================================================
3   !!                       ***  MODULE  lbcnfd  ***
4   !! Ocean        : north fold  boundary conditions
5   !!======================================================================
[2413]6   !! History :  3.2  ! 2009-03  (R. Benshila)  Original code
[9019]7   !!            3.5  ! 2013-07  (I. Epicoco, S. Mocavero - CMCC) MPP optimization
8   !!            4.0  ! 2017-04  (G. Madec) automatique allocation of array argument (use any 3rd dimension)
[1344]9   !!----------------------------------------------------------------------
10
[2413]11   !!----------------------------------------------------------------------
12   !!   lbc_nfd       : generic interface for lbc_nfd_3d and lbc_nfd_2d routines
13   !!   lbc_nfd_3d    : lateral boundary condition: North fold treatment for a 3D arrays   (lbc_nfd)
14   !!   lbc_nfd_2d    : lateral boundary condition: North fold treatment for a 2D arrays   (lbc_nfd)
[9019]15   !!   lbc_nfd_nogather       : generic interface for lbc_nfd_nogather_3d and
16   !!                            lbc_nfd_nogather_2d routines (designed for use
17   !!                            with ln_nnogather to avoid global width arrays
18   !!                            mpi all gather operations)
[2413]19   !!----------------------------------------------------------------------
20   USE dom_oce        ! ocean space and time domain
21   USE in_out_manager ! I/O manager
[11692]22   USE lib_mpp        ! MPP library
[2413]23
[1344]24   IMPLICIT NONE
25   PRIVATE
26
27   INTERFACE lbc_nfd
[9019]28      MODULE PROCEDURE   lbc_nfd_2d    , lbc_nfd_3d    , lbc_nfd_4d
29      MODULE PROCEDURE   lbc_nfd_2d_ptr, lbc_nfd_3d_ptr, lbc_nfd_4d_ptr
30      MODULE PROCEDURE   lbc_nfd_2d_ext
[1344]31   END INTERFACE
[6140]32   !
[9019]33   INTERFACE lbc_nfd_nogather
34!                        ! Currently only 4d array version is needed
[10425]35     MODULE PROCEDURE   lbc_nfd_nogather_2d    , lbc_nfd_nogather_3d
36     MODULE PROCEDURE   lbc_nfd_nogather_4d
37     MODULE PROCEDURE   lbc_nfd_nogather_2d_ptr, lbc_nfd_nogather_3d_ptr
[9019]38!     MODULE PROCEDURE   lbc_nfd_nogather_4d_ptr
[4230]39   END INTERFACE
[2287]40
[9019]41   TYPE, PUBLIC ::   PTR_2D   !: array of 2D pointers (also used in lib_mpp)
42      REAL(wp), DIMENSION (:,:)    , POINTER ::   pt2d
43   END TYPE PTR_2D
44   TYPE, PUBLIC ::   PTR_3D   !: array of 3D pointers (also used in lib_mpp)
45      REAL(wp), DIMENSION (:,:,:)  , POINTER ::   pt3d
46   END TYPE PTR_3D
47   TYPE, PUBLIC ::   PTR_4D   !: array of 4D pointers (also used in lib_mpp)
48      REAL(wp), DIMENSION (:,:,:,:), POINTER ::   pt4d
49   END TYPE PTR_4D
[4230]50
[9019]51   PUBLIC   lbc_nfd            ! north fold conditions
52   PUBLIC   lbc_nfd_nogather   ! north fold conditions (no allgather case)
53
[6140]54   INTEGER, PUBLIC, PARAMETER            ::   jpmaxngh = 3               !:
[11719]55   INTEGER, PUBLIC                       ::   nsndto                     !:
[6140]56   INTEGER, PUBLIC, DIMENSION (jpmaxngh) ::   isendto                    !: processes to which communicate
[11719]57   INTEGER, PUBLIC                       ::   ijpj             
[4230]58
[1344]59   !!----------------------------------------------------------------------
[9598]60   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
[2287]61   !! $Id$
[10068]62   !! Software governed by the CeCILL license (see ./LICENSE)
[2287]63   !!----------------------------------------------------------------------
[1344]64CONTAINS
65
[9019]66   !!----------------------------------------------------------------------
67   !!                   ***  routine lbc_nfd_(2,3,4)d  ***
68   !!----------------------------------------------------------------------
69   !!
70   !! ** Purpose :   lateral boundary condition
71   !!                North fold treatment without processor exchanges.
72   !!
73   !! ** Method  :   
74   !!
75   !! ** Action  :   ptab with updated values along the north fold
76   !!----------------------------------------------------------------------
77   !
78   !                       !==  2D array and array of 2D pointer  ==!
79   !
80#  define DIM_2d
81#     define ROUTINE_NFD           lbc_nfd_2d
82#     include "lbc_nfd_generic.h90"
83#     undef ROUTINE_NFD
84#     define MULTI
85#     define ROUTINE_NFD           lbc_nfd_2d_ptr
86#     include "lbc_nfd_generic.h90"
87#     undef ROUTINE_NFD
88#     undef MULTI
89#  undef DIM_2d
90   !
91   !                       !==  2D array with extra haloes  ==!
92   !
93#  define DIM_2d
94#     define ROUTINE_NFD           lbc_nfd_2d_ext
95#     include "lbc_nfd_ext_generic.h90"
96#     undef ROUTINE_NFD
97#  undef DIM_2d
98   !
99   !                       !==  3D array and array of 3D pointer  ==!
100   !
101#  define DIM_3d
102#     define ROUTINE_NFD           lbc_nfd_3d
103#     include "lbc_nfd_generic.h90"
104#     undef ROUTINE_NFD
105#     define MULTI
106#     define ROUTINE_NFD           lbc_nfd_3d_ptr
107#     include "lbc_nfd_generic.h90"
108#     undef ROUTINE_NFD
109#     undef MULTI
110#  undef DIM_3d
111   !
112   !                       !==  4D array and array of 4D pointer  ==!
113   !
114#  define DIM_4d
115#     define ROUTINE_NFD           lbc_nfd_4d
116#     include "lbc_nfd_generic.h90"
117#     undef ROUTINE_NFD
118#     define MULTI
119#     define ROUTINE_NFD           lbc_nfd_4d_ptr
120#     include "lbc_nfd_generic.h90"
121#     undef ROUTINE_NFD
122#     undef MULTI
123#  undef DIM_4d
124   !
125   !  lbc_nfd_nogather routines
126   !
127   !                       !==  2D array and array of 2D pointer  ==!
128   !
[10425]129#  define DIM_2d
130#     define ROUTINE_NFD           lbc_nfd_nogather_2d
131#     include "lbc_nfd_nogather_generic.h90"
132#     undef ROUTINE_NFD
133#     define MULTI
134#     define ROUTINE_NFD           lbc_nfd_nogather_2d_ptr
135#     include "lbc_nfd_nogather_generic.h90"
136#     undef ROUTINE_NFD
137#     undef MULTI
138#  undef DIM_2d
[9019]139   !
140   !                       !==  3D array and array of 3D pointer  ==!
141   !
[10425]142#  define DIM_3d
143#     define ROUTINE_NFD           lbc_nfd_nogather_3d
144#     include "lbc_nfd_nogather_generic.h90"
145#     undef ROUTINE_NFD
146#     define MULTI
147#     define ROUTINE_NFD           lbc_nfd_nogather_3d_ptr
148#     include "lbc_nfd_nogather_generic.h90"
149#     undef ROUTINE_NFD
150#     undef MULTI
151#  undef DIM_3d
[9019]152   !
153   !                       !==  4D array and array of 4D pointer  ==!
154   !
155#  define DIM_4d
156#     define ROUTINE_NFD           lbc_nfd_nogather_4d
157#     include "lbc_nfd_nogather_generic.h90"
158#     undef ROUTINE_NFD
159!#     define MULTI
160!#     define ROUTINE_NFD           lbc_nfd_nogather_4d_ptr
161!#     include "lbc_nfd_nogather_generic.h90"
162!#     undef ROUTINE_NFD
163!#     undef MULTI
164#  undef DIM_4d
[1344]165
[9019]166   !!----------------------------------------------------------------------
[1344]167
168
[6140]169   !!======================================================================
[1344]170END MODULE lbcnfd
Note: See TracBrowser for help on using the repository browser.