MODULE lbcnfd !!====================================================================== !! *** MODULE lbcnfd *** !! Ocean : north fold boundary conditions !!====================================================================== !! History : 3.2 ! 2009-03 (R. Benshila) Original code !! 3.5 ! 2013-07 (I. Epicoco, S. Mocavero - CMCC) MPP optimization !! 4.0 ! 2017-04 (G. Madec) automatique allocation of array argument (use any 3rd dimension) !!---------------------------------------------------------------------- !!---------------------------------------------------------------------- !! lbc_nfd : generic interface for lbc_nfd_3d and lbc_nfd_2d routines !! lbc_nfd_3d : lateral boundary condition: North fold treatment for a 3D arrays (lbc_nfd) !! lbc_nfd_2d : lateral boundary condition: North fold treatment for a 2D arrays (lbc_nfd) !! lbc_nfd_nogather : generic interface for lbc_nfd_nogather_3d and !! lbc_nfd_nogather_2d routines (designed for use !! with ln_nnogather to avoid global width arrays !! mpi all gather operations) !!---------------------------------------------------------------------- USE dom_oce ! ocean space and time domain USE in_out_manager ! I/O manager USE lib_mpp ! MPP library #if ! defined key_mpi_off USE MPI #endif IMPLICIT NONE PRIVATE INTERFACE lbc_nfd ! called by mpp_nfd, lbc_lnk_pt2pt or lbc_lnk_neicoll MODULE PROCEDURE lbc_nfd_sp, lbc_nfd_ext_sp MODULE PROCEDURE lbc_nfd_dp, lbc_nfd_ext_dp END INTERFACE INTERFACE mpp_nfd ! called by lbc_lnk_pt2pt or lbc_lnk_neicoll MODULE PROCEDURE mpp_nfd_sp, mpp_nfd_dp END INTERFACE INTERFACE lbc_nfd_nogather ! called by mpp_nfd MODULE PROCEDURE lbc_nfd_nogather_sp, lbc_nfd_nogather_dp END INTERFACE PUBLIC mpp_nfd ! mpi north fold conditions PUBLIC lbc_nfd ! north fold conditions PUBLIC lbc_nfd_nogather ! north fold conditions (no allgather case) INTEGER, PUBLIC, PARAMETER :: jpmaxngh = 3 !: INTEGER, PUBLIC :: nsndto !: INTEGER, PUBLIC, DIMENSION (jpmaxngh) :: isendto !: processes to which communicate INTEGER, PUBLIC :: ijpj !!---------------------------------------------------------------------- !! NEMO/OCE 4.0 , NEMO Consortium (2018) !! $Id$ !! Software governed by the CeCILL license (see ./LICENSE) !!---------------------------------------------------------------------- CONTAINS !!---------------------------------------------------------------------- !! *** routine lbc_nfd_[sd]p *** !! *** routine lbc_nfd_nogather_[sd]p *** !! *** routine lbc_nfd_ext_[sd]p *** !!---------------------------------------------------------------------- !! !! ** Purpose : lateral boundary condition !! North fold treatment without processor exchanges. !! !! ** Method : !! !! ** Action : ptab with updated values along the north fold !!---------------------------------------------------------------------- ! ! !== SINGLE PRECISION VERSIONS ! #define PRECISION sp # include "lbc_nfd_generic.h90" # include "lbc_nfd_nogather_generic.h90" # include "lbc_nfd_ext_generic.h90" #undef PRECISION ! ! !== DOUBLE PRECISION VERSIONS ! #define PRECISION dp # include "lbc_nfd_generic.h90" # include "lbc_nfd_nogather_generic.h90" # include "lbc_nfd_ext_generic.h90" #undef PRECISION !!====================================================================== ! !!---------------------------------------------------------------------- !! *** routine mpp_nfd_[sd]p *** !! !! * Argument : dummy argument use in mpp_nfd_... routines !! ptab : pointer of arrays on which the boundary condition is applied !! cd_nat : nature of array grid-points !! psgn : sign used across the north fold boundary !! kfld : optional, number of pt3d arrays !! kfillmode : optional, method to be use to fill the halos (see jpfill* variables) !! pfillval : optional, background value (used with jpfillcopy) !!---------------------------------------------------------------------- !! !! ---- SINGLE PRECISION VERSIONS !! #define PRECISION sp # define MPI_TYPE MPI_REAL # include "mpp_nfd_generic.h90" # undef MPI_TYPE #undef PRECISION !! !! ---- DOUBLE PRECISION VERSIONS !! #define PRECISION dp # define MPI_TYPE MPI_DOUBLE_PRECISION # include "mpp_nfd_generic.h90" # undef MPI_TYPE #undef PRECISION !!====================================================================== END MODULE lbcnfd