1 | MODULE lbcnfd |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE lbcnfd *** |
---|
4 | !! Ocean : north fold boundary conditions |
---|
5 | !!====================================================================== |
---|
6 | !! History : 3.2 ! 2009-03 (R. Benshila) Original code |
---|
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) |
---|
9 | !!---------------------------------------------------------------------- |
---|
10 | |
---|
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) |
---|
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) |
---|
19 | !!---------------------------------------------------------------------- |
---|
20 | USE dom_oce ! ocean space and time domain |
---|
21 | USE in_out_manager ! I/O manager |
---|
22 | USE lib_mpp ! MPP library |
---|
23 | #if ! defined key_mpi_off |
---|
24 | USE MPI |
---|
25 | #endif |
---|
26 | |
---|
27 | IMPLICIT NONE |
---|
28 | PRIVATE |
---|
29 | |
---|
30 | INTERFACE lbc_nfd ! called by mpp_nfd, lbc_lnk_pt2pt or lbc_lnk_neicoll |
---|
31 | MODULE PROCEDURE lbc_nfd_sp, lbc_nfd_ext_sp |
---|
32 | MODULE PROCEDURE lbc_nfd_dp, lbc_nfd_ext_dp |
---|
33 | END INTERFACE |
---|
34 | |
---|
35 | INTERFACE mpp_nfd ! called by lbc_lnk_pt2pt or lbc_lnk_neicoll |
---|
36 | MODULE PROCEDURE mpp_nfd_sp, mpp_nfd_dp |
---|
37 | END INTERFACE |
---|
38 | |
---|
39 | INTERFACE lbc_nfd_nogather ! called by mpp_nfd |
---|
40 | MODULE PROCEDURE lbc_nfd_nogather_sp, lbc_nfd_nogather_dp |
---|
41 | END INTERFACE |
---|
42 | |
---|
43 | PUBLIC mpp_nfd ! mpi north fold conditions |
---|
44 | PUBLIC lbc_nfd ! north fold conditions |
---|
45 | PUBLIC lbc_nfd_nogather ! north fold conditions (no allgather case) |
---|
46 | |
---|
47 | INTEGER, PUBLIC, PARAMETER :: jpmaxngh = 3 !: |
---|
48 | INTEGER, PUBLIC :: nsndto !: |
---|
49 | INTEGER, PUBLIC, DIMENSION (jpmaxngh) :: isendto !: processes to which communicate |
---|
50 | INTEGER, PUBLIC :: ijpj |
---|
51 | |
---|
52 | !!---------------------------------------------------------------------- |
---|
53 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
54 | !! $Id$ |
---|
55 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
56 | !!---------------------------------------------------------------------- |
---|
57 | CONTAINS |
---|
58 | |
---|
59 | !!---------------------------------------------------------------------- |
---|
60 | !! *** routine lbc_nfd_[sd]p *** |
---|
61 | !! *** routine lbc_nfd_nogather_[sd]p *** |
---|
62 | !! *** routine lbc_nfd_ext_[sd]p *** |
---|
63 | !!---------------------------------------------------------------------- |
---|
64 | !! |
---|
65 | !! ** Purpose : lateral boundary condition |
---|
66 | !! North fold treatment without processor exchanges. |
---|
67 | !! |
---|
68 | !! ** Method : |
---|
69 | !! |
---|
70 | !! ** Action : ptab with updated values along the north fold |
---|
71 | !!---------------------------------------------------------------------- |
---|
72 | ! |
---|
73 | ! !== SINGLE PRECISION VERSIONS |
---|
74 | ! |
---|
75 | #define PRECISION sp |
---|
76 | # include "lbc_nfd_generic.h90" |
---|
77 | # include "lbc_nfd_nogather_generic.h90" |
---|
78 | # include "lbc_nfd_ext_generic.h90" |
---|
79 | #undef PRECISION |
---|
80 | ! |
---|
81 | ! !== DOUBLE PRECISION VERSIONS |
---|
82 | ! |
---|
83 | #define PRECISION dp |
---|
84 | # include "lbc_nfd_generic.h90" |
---|
85 | # include "lbc_nfd_nogather_generic.h90" |
---|
86 | # include "lbc_nfd_ext_generic.h90" |
---|
87 | #undef PRECISION |
---|
88 | |
---|
89 | !!====================================================================== |
---|
90 | ! |
---|
91 | !!---------------------------------------------------------------------- |
---|
92 | !! *** routine mpp_nfd_[sd]p *** |
---|
93 | !! |
---|
94 | !! * Argument : dummy argument use in mpp_nfd_... routines |
---|
95 | !! ptab : pointer of arrays on which the boundary condition is applied |
---|
96 | !! cd_nat : nature of array grid-points |
---|
97 | !! psgn : sign used across the north fold boundary |
---|
98 | !! kfld : optional, number of pt3d arrays |
---|
99 | !! kfillmode : optional, method to be use to fill the halos (see jpfill* variables) |
---|
100 | !! pfillval : optional, background value (used with jpfillcopy) |
---|
101 | !!---------------------------------------------------------------------- |
---|
102 | !! |
---|
103 | !! ---- SINGLE PRECISION VERSIONS |
---|
104 | !! |
---|
105 | #define PRECISION sp |
---|
106 | # define MPI_TYPE MPI_REAL |
---|
107 | # include "mpp_nfd_generic.h90" |
---|
108 | # undef MPI_TYPE |
---|
109 | #undef PRECISION |
---|
110 | !! |
---|
111 | !! ---- DOUBLE PRECISION VERSIONS |
---|
112 | !! |
---|
113 | #define PRECISION dp |
---|
114 | # define MPI_TYPE MPI_DOUBLE_PRECISION |
---|
115 | # include "mpp_nfd_generic.h90" |
---|
116 | # undef MPI_TYPE |
---|
117 | #undef PRECISION |
---|
118 | |
---|
119 | !!====================================================================== |
---|
120 | END MODULE lbcnfd |
---|