- Timestamp:
- 2019-06-27T16:51:16+02:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/IOM/iom.F90
r11192 r11194 1979 1979 ! Cell vertices on boundries 1980 1980 DO jn = 1, 4 1981 CALL lbc_lnk( 'iom', z_bnds(jn,:,:,1), cdgrd, 1., p val=999._wp )1982 CALL lbc_lnk( 'iom', z_bnds(jn,:,:,2), cdgrd, 1., p val=999._wp )1981 CALL lbc_lnk( 'iom', z_bnds(jn,:,:,1), cdgrd, 1., pfillval=999._wp ) 1982 CALL lbc_lnk( 'iom', z_bnds(jn,:,:,2), cdgrd, 1., pfillval=999._wp ) 1983 1983 END DO 1984 1984 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/lbclnk.F90
r11192 r11194 67 67 !$AGRIF_END_DO_NOT_TREAT 68 68 #endif 69 70 INTEGER, PUBLIC, PARAMETER :: jpfillnothing = 1 71 INTEGER, PUBLIC, PARAMETER :: jpfillcst = 2 72 INTEGER, PUBLIC, PARAMETER :: jpfillcopy = 3 73 INTEGER, PUBLIC, PARAMETER :: jpfillperio = 4 74 INTEGER, PUBLIC, PARAMETER :: jpfillmpi = 5 75 69 76 !!---------------------------------------------------------------------- 70 77 !! NEMO/OCE 4.0 , NEMO Consortium (2018) … … 144 151 !! 145 152 !! * Argument : dummy argument use in mpp_lnk_... routines 146 !! ptab : array or pointer of arrays on which the boundary condition is applied147 !! cd_nat : nature of array grid-points148 !! psgn : sign used across the north fold boundary149 !! kfld : optional, number of pt3d arrays150 !! cd_mpp : optional, fill the overlap area only151 !! p val : optional, background value (used at closed boundaries)153 !! ptab : array or pointer of arrays on which the boundary condition is applied 154 !! cd_nat : nature of array grid-points 155 !! psgn : sign used across the north fold boundary 156 !! kfld : optional, number of pt3d arrays 157 !! kfillmode : optional, method to be use to fill the halos (see jpfill* variables) 158 !! pfillval : optional, background value (used with jpfillcopy) 152 159 !!---------------------------------------------------------------------- 153 160 ! … … 195 202 !! 196 203 !! * Argument : dummy argument use in mpp_nfd_... routines 197 !! ptab : array or pointer of arrays on which the boundary condition is applied198 !! cd_nat : nature of array grid-points199 !! psgn : sign used across the north fold boundary200 !! kfld : optional, number of pt3d arrays201 !! cd_mpp : optional, fill the overlap area only202 !! p val : optional, background value (used at closed boundaries)204 !! ptab : array or pointer of arrays on which the boundary condition is applied 205 !! cd_nat : nature of array grid-points 206 !! psgn : sign used across the north fold boundary 207 !! kfld : optional, number of pt3d arrays 208 !! kfillmode : optional, method to be use to fill the halos (see jpfill* variables) 209 !! pfillval : optional, background value (used with jpfillcopy) 203 210 !!---------------------------------------------------------------------- 204 211 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/lib_mpp.F90
r11192 r11194 172 172 LOGICAL, PUBLIC :: ln_nnogather !: namelist control of northfold comms 173 173 LOGICAL, PUBLIC :: l_north_nogather = .FALSE. !: internal control of northfold comms 174 175 INTEGER, PUBLIC, PARAMETER :: jpfillnothing = 1176 INTEGER, PUBLIC, PARAMETER :: jpfillcst = 2177 INTEGER, PUBLIC, PARAMETER :: jpfillcopy = 3178 INTEGER, PUBLIC, PARAMETER :: jpfillperio = 4179 INTEGER, PUBLIC, PARAMETER :: jpfillmpi = 5180 174 181 175 !!---------------------------------------------------------------------- -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/LBC/mpp_lnk_generic.h90
r11192 r11194 100 100 ! 101 101 IF( llcom_ea ) THEN ; ifill_ea = jpfillmpi 102 ELSE ; ifill_ea = ifill_we 102 ELSEIF( l_Iperio ) THEN ; ifill_ea = jpfillperio 103 ELSEIF( PRESENT(kfillmode) ) THEN ; ifill_ea = kfillmode 104 ELSE ; ifill_ea = jpfillcst 103 105 END IF 104 106 ! … … 110 112 ! 111 113 IF( llcom_no ) THEN ; ifill_no = jpfillmpi 112 ELSE ; ifill_no = ifill_so ! warning will be potentially changed if lldo_nfd = T 114 ELSEIF( l_Jperio ) THEN ; ifill_no = jpfillperio 115 ELSEIF( PRESENT(kfillmode) ) THEN ; ifill_no = kfillmode 116 ELSE ; ifill_no = jpfillcst 113 117 END IF 114 118 ! … … 125 129 ! -------------------------------------------------- ! 126 130 ! 127 ! these echanges are made for jj = nn_hls+1 to jpj-nn_hls128 isize = nn_hls * ( jpj - 2*nn_hls )* ipk * ipl * ipf131 ! Must exchange the whole column (from 1 to jpj) to get the corners if we have no south/north neighbourg 132 isize = nn_hls * jpj * ipk * ipl * ipf 129 133 130 134 ! Allocate local temporary arrays to be sent/received. Fill arrays to be sent 131 135 IF( ifill_we == jpfillmpi ) THEN ! copy western side of the inner mpi domain in local temporary array to be sent by MPI 132 136 ! 133 ALLOCATE( zsnd_we(nn_hls,jpj -2*nn_hls,ipk,ipl,ipf), zrcv_we(nn_hls,jpj-2*nn_hls,ipk,ipl,ipf) )137 ALLOCATE( zsnd_we(nn_hls,jpj,ipk,ipl,ipf), zrcv_we(nn_hls,jpj,ipk,ipl,ipf) ) 134 138 ishift = nn_hls 135 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = nn_hls+1, jpj-nn_hls; DO ji = 1, nn_hls136 zsnd_we(ji,jj -nn_hls,jk,jl,jf) = ARRAY_IN(ishift+ji,jj,jk,jl,jf) ! nn_hls + 1 -> 2*nn_hls139 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 140 zsnd_we(ji,jj,jk,jl,jf) = ARRAY_IN(ishift+ji,jj,jk,jl,jf) ! nn_hls + 1 -> 2*nn_hls 137 141 END DO ; END DO ; END DO ; END DO ; END DO 138 142 ENDIF … … 140 144 IF( ifill_ea == jpfillmpi ) THEN ! copy eastern side of the inner mpi domain in local temporary array to be sent by MPI 141 145 ! 142 ALLOCATE( zsnd_ea(nn_hls,jpj -2*nn_hls,ipk,ipl,ipf), zrcv_ea(nn_hls,jpj-2*nn_hls,ipk,ipl,ipf) )146 ALLOCATE( zsnd_ea(nn_hls,jpj,ipk,ipl,ipf), zrcv_ea(nn_hls,jpj,ipk,ipl,ipf) ) 143 147 ishift = jpi - 2 * nn_hls 144 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = nn_hls+1, jpj-nn_hls; DO ji = 1, nn_hls145 zsnd_ea(ji,jj -nn_hls,jk,jl,jf) = ARRAY_IN(ishift+ji,jj,jk,jl,jf) ! jpi - 2*nn_hls + 1 -> jpi - nn_hls148 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 149 zsnd_ea(ji,jj,jk,jl,jf) = ARRAY_IN(ishift+ji,jj,jk,jl,jf) ! jpi - 2*nn_hls + 1 -> jpi - nn_hls 146 150 END DO ; END DO ; END DO ; END DO ; END DO 147 151 ENDIF … … 169 173 CASE ( jpfillnothing ) ! no filling 170 174 CASE ( jpfillmpi ) ! use data received by MPI 171 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = nn_hls+1, jpj-nn_hls; DO ji = 1, nn_hls172 ARRAY_IN(ji,jj,jk,jl,jf) = zrcv_we(ji,jj -nn_hls,jk,jl,jf) ! 1 -> nn_hls175 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 176 ARRAY_IN(ji,jj,jk,jl,jf) = zrcv_we(ji,jj,jk,jl,jf) ! 1 -> nn_hls 173 177 END DO; END DO ; END DO ; END DO ; END DO 174 178 CASE ( jpfillperio ) ! use east-weast periodicity 175 179 ishift2 = jpi - 2 * nn_hls 176 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = nn_hls+1, jpj-nn_hls; DO ji = 1, nn_hls180 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 177 181 ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(ishift2+ji,jj,jk,jl,jf) 178 182 END DO; END DO ; END DO ; END DO ; END DO … … 180 184 DO jf = 1, ipf ! number of arrays to be treated 181 185 IF( .NOT. NAT_IN(jf) == 'F' ) THEN ! do nothing for F point 182 DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = nn_hls+1, jpj-nn_hls; DO ji = 1, nn_hls186 DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 183 187 ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(nn_hls+1,jj,jk,jl,jf) 184 188 END DO ; END DO ; END DO ; END DO … … 188 192 DO jf = 1, ipf ! number of arrays to be treated 189 193 IF( .NOT. NAT_IN(jf) == 'F' ) THEN ! do nothing for F point 190 DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = nn_hls+1, jpj-nn_hls; DO ji = 1, nn_hls194 DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 191 195 ARRAY_IN(ji,jj,jk,jl,jf) = zland 192 196 END DO; END DO ; END DO ; END DO … … 201 205 CASE ( jpfillnothing ) ! no filling 202 206 CASE ( jpfillmpi ) ! use data received by MPI 203 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = nn_hls+1, jpj-nn_hls; DO ji = 1, nn_hls204 ARRAY_IN(ishift+ji,jj,jk,jl,jf) = zrcv_ea(ji,jj -nn_hls,jk,jl,jf) ! jpi - nn_hls + 1 -> jpi207 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 208 ARRAY_IN(ishift+ji,jj,jk,jl,jf) = zrcv_ea(ji,jj,jk,jl,jf) ! jpi - nn_hls + 1 -> jpi 205 209 END DO ; END DO ; END DO ; END DO ; END DO 206 210 CASE ( jpfillperio ) ! use east-weast periodicity 207 211 ishift2 = nn_hls 208 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = nn_hls+1, jpj-nn_hls; DO ji = 1, nn_hls212 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 209 213 ARRAY_IN(ishift+ji,jj,jk,jl,jf) = ARRAY_IN(ishift2+ji,jj,jk,jl,jf) 210 214 END DO ; END DO ; END DO ; END DO ; END DO 211 215 CASE ( jpfillcopy ) ! filling with inner domain values 212 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = nn_hls+1, jpj-nn_hls; DO ji = 1, nn_hls216 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 213 217 ARRAY_IN(ishift+ji,jj,jk,jl,jf) = ARRAY_IN(ishift,jj,jk,jl,jf) 214 218 END DO ; END DO ; END DO ; END DO ; END DO 215 219 CASE ( jpfillcst ) ! filling with constant value 216 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = nn_hls+1, jpj-nn_hls; DO ji = 1, nn_hls220 DO jf = 1, ipf ; DO jl = 1, ipl ; DO jk = 1, ipk ; DO jj = 1, jpj ; DO ji = 1, nn_hls 217 221 ARRAY_IN(ishift+ji,jj,jk,jl,jf) = zland 218 222 END DO; END DO ; END DO ; END DO ; END DO
Note: See TracChangeset
for help on using the changeset viewer.