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_sp and lbc_nfd_dp routines that is doing the north fold in a non-mpi case |
---|
13 | !! mpp_nfd : generic interface for mpp_nfd_sp and mpp_nfd_dp routines that will use lbc_nfd directly or indirectly |
---|
14 | !!---------------------------------------------------------------------- |
---|
15 | USE dom_oce ! ocean space and time domain |
---|
16 | USE in_out_manager ! I/O manager |
---|
17 | USE lib_mpp ! MPP library |
---|
18 | #if ! defined key_mpi_off |
---|
19 | USE MPI |
---|
20 | #endif |
---|
21 | |
---|
22 | IMPLICIT NONE |
---|
23 | PRIVATE |
---|
24 | |
---|
25 | INTERFACE lbc_nfd ! called by mpp_nfd, lbc_lnk_pt2pt or lbc_lnk_neicoll |
---|
26 | MODULE PROCEDURE lbc_nfd_sp, lbc_nfd_ext_sp |
---|
27 | MODULE PROCEDURE lbc_nfd_dp, lbc_nfd_ext_dp |
---|
28 | END INTERFACE |
---|
29 | |
---|
30 | INTERFACE mpp_nfd ! called by lbc_lnk_pt2pt or lbc_lnk_neicoll |
---|
31 | MODULE PROCEDURE mpp_nfd_sp, mpp_nfd_dp |
---|
32 | END INTERFACE |
---|
33 | |
---|
34 | PUBLIC mpp_nfd ! mpi north fold conditions |
---|
35 | PUBLIC lbc_nfd ! north fold conditions |
---|
36 | |
---|
37 | INTEGER, PUBLIC :: nfd_nbnei |
---|
38 | INTEGER, PUBLIC, ALLOCATABLE, DIMENSION (: ) :: nfd_rknei |
---|
39 | INTEGER, PUBLIC, ALLOCATABLE, DIMENSION (:,:) :: nfd_rksnd |
---|
40 | INTEGER, PUBLIC, ALLOCATABLE, DIMENSION (:,:) :: nfd_jisnd |
---|
41 | |
---|
42 | !!---------------------------------------------------------------------- |
---|
43 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
44 | !! $Id$ |
---|
45 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
46 | !!---------------------------------------------------------------------- |
---|
47 | CONTAINS |
---|
48 | |
---|
49 | !!---------------------------------------------------------------------- |
---|
50 | !! *** routine lbc_nfd_[sd]p *** |
---|
51 | !! *** routine lbc_nfd_ext_[sd]p *** |
---|
52 | !!---------------------------------------------------------------------- |
---|
53 | !! |
---|
54 | !! ** Purpose : lateral boundary condition |
---|
55 | !! North fold treatment without processor exchanges. |
---|
56 | !! |
---|
57 | !! ** Method : |
---|
58 | !! |
---|
59 | !! ** Action : ptab with updated values along the north fold |
---|
60 | !!---------------------------------------------------------------------- |
---|
61 | ! |
---|
62 | ! !== SINGLE PRECISION VERSIONS |
---|
63 | ! |
---|
64 | #define PRECISION sp |
---|
65 | # include "lbc_nfd_generic.h90" |
---|
66 | # include "lbc_nfd_ext_generic.h90" |
---|
67 | #undef PRECISION |
---|
68 | ! |
---|
69 | ! !== DOUBLE PRECISION VERSIONS |
---|
70 | ! |
---|
71 | #define PRECISION dp |
---|
72 | # include "lbc_nfd_generic.h90" |
---|
73 | # include "lbc_nfd_ext_generic.h90" |
---|
74 | #undef PRECISION |
---|
75 | |
---|
76 | !!====================================================================== |
---|
77 | ! |
---|
78 | !!---------------------------------------------------------------------- |
---|
79 | !! *** routine mpp_nfd_[sd]p *** |
---|
80 | !! |
---|
81 | !! * Argument : dummy argument use in mpp_nfd_... routines |
---|
82 | !! ptab : pointer of arrays on which the boundary condition is applied |
---|
83 | !! cd_nat : nature of array grid-points |
---|
84 | !! psgn : sign used across the north fold boundary |
---|
85 | !! kfld : optional, number of pt3d arrays |
---|
86 | !! kfillmode : optional, method to be use to fill the halos (see jpfill* variables) |
---|
87 | !! pfillval : optional, background value (used with jpfillcopy) |
---|
88 | !!---------------------------------------------------------------------- |
---|
89 | !! |
---|
90 | !! ---- SINGLE PRECISION VERSIONS |
---|
91 | !! |
---|
92 | #define PRECISION sp |
---|
93 | # define MPI_TYPE MPI_REAL |
---|
94 | # include "mpp_nfd_generic.h90" |
---|
95 | # undef MPI_TYPE |
---|
96 | #undef PRECISION |
---|
97 | !! |
---|
98 | !! ---- DOUBLE PRECISION VERSIONS |
---|
99 | !! |
---|
100 | #define PRECISION dp |
---|
101 | # define MPI_TYPE MPI_DOUBLE_PRECISION |
---|
102 | # include "mpp_nfd_generic.h90" |
---|
103 | # undef MPI_TYPE |
---|
104 | #undef PRECISION |
---|
105 | |
---|
106 | !!====================================================================== |
---|
107 | END MODULE lbcnfd |
---|