Changeset 8196
- Timestamp:
- 2017-06-20T17:01:49+02:00 (7 years ago)
- Location:
- branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/LBC
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/LBC/lbcnfd.F90
r8186 r8196 13 13 !! lbc_nfd_3d : lateral boundary condition: North fold treatment for a 3D arrays (lbc_nfd) 14 14 !! lbc_nfd_2d : lateral boundary condition: North fold treatment for a 2D arrays (lbc_nfd) 15 ! !! mpp_lbc_nfd_3d: North fold treatment for a 3D arrays optimized for MPP 16 ! !! mpp_lbc_nfd_2d: North fold treatment for a 2D arrays optimized for MPP 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) 17 19 !!---------------------------------------------------------------------- 18 20 USE dom_oce ! ocean space and time domain … … 27 29 END INTERFACE 28 30 ! 29 !!gm INTERFACE mpp_lbc_nfd 30 !!gm MODULE PROCEDURE mpp_lbc_nfd_3d, mpp_lbc_nfd_2d 31 !!gm END INTERFACE 31 INTERFACE lbc_nfd_nogather 32 ! ! Currently only 4d array version is needed 33 ! MODULE PROCEDURE lbc_nfd_nogather_2d , lbc_nfd_nogather_3d 34 MODULE PROCEDURE lbc_nfd_nogather_4d 35 ! MODULE PROCEDURE lbc_nfd_nogather_2d_ptr, lbc_nfd_nogather_3d_ptr 36 ! MODULE PROCEDURE lbc_nfd_nogather_4d_ptr 37 END INTERFACE 32 38 33 39 TYPE, PUBLIC :: PTR_2D !: array of 2D pointers (also used in lib_mpp) … … 41 47 END TYPE PTR_4D 42 48 43 PUBLIC lbc_nfd ! north fold conditions44 !!gm PUBLIC mpp_lbc_nfd ! north fold conditions (parallelcase)49 PUBLIC lbc_nfd ! north fold conditions 50 PUBLIC lbc_nfd_nogather ! north fold conditions (no allgather case) 45 51 46 52 INTEGER, PUBLIC, PARAMETER :: jpmaxngh = 3 !: … … 104 110 # undef ROUTINE_NFD 105 111 # undef MULTI 112 # undef DIM_4d 113 ! 114 ! lbc_nfd_nogather routines 115 ! 116 ! !== 2D array and array of 2D pointer ==! 117 ! 118 !# define DIM_2d 119 !# define ROUTINE_NFD lbc_nfd_nogather_2d 120 !# include "lbc_nfd_nogather_generic.h90" 121 !# undef ROUTINE_NFD 122 !# define MULTI 123 !# define ROUTINE_NFD lbc_nfd_nogather_2d_ptr 124 !# include "lbc_nfd_nogather_generic.h90" 125 !# undef ROUTINE_NFD 126 !# undef MULTI 127 !# undef DIM_2d 128 ! 129 ! !== 3D array and array of 3D pointer ==! 130 ! 131 !# define DIM_3d 132 !# define ROUTINE_NFD lbc_nfd_nogather_3d 133 !# include "lbc_nfd_nogather_generic.h90" 134 !# undef ROUTINE_NFD 135 !# define MULTI 136 !# define ROUTINE_NFD lbc_nfd_nogather_3d_ptr 137 !# include "lbc_nfd_nogather_generic.h90" 138 !# undef ROUTINE_NFD 139 !# undef MULTI 140 !# undef DIM_3d 141 ! 142 ! !== 4D array and array of 4D pointer ==! 143 ! 144 # define DIM_4d 145 # define ROUTINE_NFD lbc_nfd_nogather_4d 146 # include "lbc_nfd_nogather_generic.h90" 147 # undef ROUTINE_NFD 148 !# define MULTI 149 !# define ROUTINE_NFD lbc_nfd_nogather_4d_ptr 150 !# include "lbc_nfd_nogather_generic.h90" 151 !# undef ROUTINE_NFD 152 !# undef MULTI 106 153 # undef DIM_4d 107 154 -
branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/LBC/mpp_nfd_generic.h90
r8186 r8196 73 73 ipj = 4 ! 2nd dimension of message transfers (last j-lines) 74 74 ! 75 ALLOCATE( ztab (jpiglo,4,ipk,ipl,ipf) , znorthloc (jpi ,4,ipk,ipl,ipf) ) 76 ALLOCATE( zfoldwk(jpi ,4,ipk,ipl,ipf) , znorthgloio(jpi ,4,ipk,ipl,ipf,jpni) ) 77 ALLOCATE( ztabl (jpi ,4,ipk,ipl,ipf) , ztabr (jpi*jpmaxngh,4,ipk,ipl,ipf) ) 75 ALLOCATE( znorthloc(jpi,4,ipk,ipl,ipf) ) 78 76 ! 79 77 znorthloc(:,:,:,:,:) = 0._wp 80 78 ! 81 DO jf = 1, ipf ! put in xnorthloc the last ipj j-lines of ptab79 DO jf = 1, ipf ! put in znorthloc the last ipj j-lines of ptab 82 80 DO jl = 1, ipl 83 81 DO jk = 1, ipk … … 90 88 END DO 91 89 ! 92 ! ! Build in procs of ncomm_north the znorthgloio93 90 ! 94 91 itaille = jpi * ipj * ipk * ipl * ipf 95 92 ! 96 93 IF( l_north_nogather ) THEN !== ???? ==! 94 ALLOCATE( zfoldwk(jpi,4,ipk,ipl,ipf) ) 95 ALLOCATE( ztabl(jpi ,4,ipk,ipl,ipf) , ztabr(jpi*jpmaxngh,4,ipk,ipl,ipf) ) 97 96 ! 98 97 ztabr(:,:,:,:,:) = 0._wp … … 158 157 END DO 159 158 ENDIF 160 !!gm ERROR CALL mpp_lbc_nfd( ztabl, ztabr, cd_nat, psgn ) ! North fold boundary condition 159 DO jf = 1, ipf 160 CALL lbc_nfd_nogather( ztabl(:,:,:,:,jf), ztabr(:,:,:,:,jf), cd_nat LBC_ARG, psgn LBC_ARG ) ! North fold boundary condition 161 END DO 161 162 DO jf = 1, ipf 162 163 DO jl = 1, ipl … … 172 173 END DO 173 174 ! 175 DEALLOCATE( zfoldwk ) 176 DEALLOCATE( ztabl, ztabr ) 174 177 ELSE !== ???? ==! 178 ALLOCATE( ztab (jpiglo,4,ipk,ipl,ipf ) ) 179 ALLOCATE( znorthgloio(jpi ,4,ipk,ipl,ipf,jpni) ) 175 180 ! 176 181 CALL MPI_ALLGATHER( znorthloc , itaille, MPI_DOUBLE_PRECISION, & … … 212 217 END DO 213 218 ! 219 ! 220 DEALLOCATE( ztab ) 221 DEALLOCATE( znorthgloio ) 214 222 ENDIF 215 223 ! … … 221 229 ! this domain will be identical. 222 230 ! 223 DEALLOCATE( ztab, znorthloc, zfoldwk, znorthgloio ) 224 DEALLOCATE( ztabl, ztabr ) 231 DEALLOCATE( znorthloc ) 225 232 ! 226 233 END SUBROUTINE ROUTINE_NFD
Note: See TracChangeset
for help on using the changeset viewer.