[1344] | 1 | MODULE 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 |
---|
[11536] | 22 | USE lib_mpp ! MPP library |
---|
[14338] | 23 | #if ! defined key_mpi_off |
---|
| 24 | USE MPI |
---|
| 25 | #endif |
---|
[2413] | 26 | |
---|
[1344] | 27 | IMPLICIT NONE |
---|
| 28 | PRIVATE |
---|
| 29 | |
---|
[14349] | 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 |
---|
[1344] | 33 | END INTERFACE |
---|
[14338] | 34 | |
---|
[14349] | 35 | INTERFACE mpp_nfd ! called by lbc_lnk_pt2pt or lbc_lnk_neicoll |
---|
| 36 | MODULE PROCEDURE mpp_nfd_sp, mpp_nfd_dp |
---|
[4230] | 37 | END INTERFACE |
---|
[2287] | 38 | |
---|
[14349] | 39 | INTERFACE lbc_nfd_nogather ! called by mpp_nfd |
---|
| 40 | MODULE PROCEDURE lbc_nfd_nogather_sp, lbc_nfd_nogather_dp |
---|
[14338] | 41 | END INTERFACE |
---|
| 42 | |
---|
| 43 | PUBLIC mpp_nfd ! mpi north fold conditions |
---|
[9019] | 44 | PUBLIC lbc_nfd ! north fold conditions |
---|
| 45 | PUBLIC lbc_nfd_nogather ! north fold conditions (no allgather case) |
---|
| 46 | |
---|
[6140] | 47 | INTEGER, PUBLIC, PARAMETER :: jpmaxngh = 3 !: |
---|
[13286] | 48 | INTEGER, PUBLIC :: nsndto !: |
---|
[6140] | 49 | INTEGER, PUBLIC, DIMENSION (jpmaxngh) :: isendto !: processes to which communicate |
---|
[13286] | 50 | INTEGER, PUBLIC :: ijpj |
---|
[4230] | 51 | |
---|
[1344] | 52 | !!---------------------------------------------------------------------- |
---|
[9598] | 53 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
[2287] | 54 | !! $Id$ |
---|
[10068] | 55 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[2287] | 56 | !!---------------------------------------------------------------------- |
---|
[1344] | 57 | CONTAINS |
---|
| 58 | |
---|
[9019] | 59 | !!---------------------------------------------------------------------- |
---|
[14349] | 60 | !! *** routine lbc_nfd_[sd]p *** |
---|
| 61 | !! *** routine lbc_nfd_nogather_[sd]p *** |
---|
| 62 | !! *** routine lbc_nfd_ext_[sd]p *** |
---|
[9019] | 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 | ! |
---|
[13226] | 73 | ! !== SINGLE PRECISION VERSIONS |
---|
| 74 | ! |
---|
[14338] | 75 | #define PRECISION sp |
---|
[14349] | 76 | # include "lbc_nfd_generic.h90" |
---|
| 77 | # include "lbc_nfd_nogather_generic.h90" |
---|
| 78 | # include "lbc_nfd_ext_generic.h90" |
---|
[14338] | 79 | #undef PRECISION |
---|
[13226] | 80 | ! |
---|
[14338] | 81 | ! !== DOUBLE PRECISION VERSIONS |
---|
[9019] | 82 | ! |
---|
[14338] | 83 | #define PRECISION dp |
---|
[14349] | 84 | # include "lbc_nfd_generic.h90" |
---|
| 85 | # include "lbc_nfd_nogather_generic.h90" |
---|
| 86 | # include "lbc_nfd_ext_generic.h90" |
---|
[14338] | 87 | #undef PRECISION |
---|
[1344] | 88 | |
---|
[14338] | 89 | !!====================================================================== |
---|
[13226] | 90 | ! |
---|
| 91 | !!---------------------------------------------------------------------- |
---|
[14349] | 92 | !! *** routine mpp_nfd_[sd]p *** |
---|
[14338] | 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 |
---|
[14349] | 106 | # define MPI_TYPE MPI_REAL |
---|
| 107 | # include "mpp_nfd_generic.h90" |
---|
| 108 | # undef MPI_TYPE |
---|
[14338] | 109 | #undef PRECISION |
---|
| 110 | !! |
---|
| 111 | !! ---- DOUBLE PRECISION VERSIONS |
---|
| 112 | !! |
---|
| 113 | #define PRECISION dp |
---|
[14349] | 114 | # define MPI_TYPE MPI_DOUBLE_PRECISION |
---|
| 115 | # include "mpp_nfd_generic.h90" |
---|
| 116 | # undef MPI_TYPE |
---|
[14338] | 117 | #undef PRECISION |
---|
[1344] | 118 | |
---|
[6140] | 119 | !!====================================================================== |
---|
[1344] | 120 | END MODULE lbcnfd |
---|