Changeset 12719 for NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/mpp_nfd_generic.h90
- Timestamp:
- 2020-04-08T17:45:31+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/mpp_nfd_generic.h90
r12586 r12719 48 48 SUBROUTINE ROUTINE_NFD( ptab, cd_nat, psgn, kfld ) 49 49 !!---------------------------------------------------------------------- 50 ARRAY_TYPE( 1-nn_hls+1:,1-nn_hls+1:,:,:,:) ! array or pointer of arrays on which the boundary condition is applied50 ARRAY_TYPE(:,:,:,:,:) ! array or pointer of arrays on which the boundary condition is applied 51 51 CHARACTER(len=1) , INTENT(in ) :: NAT_IN(:) ! nature of array grid-points 52 52 REAL(wp) , INTENT(in ) :: SGN_IN(:) ! sign used across the north fold boundary … … 80 80 ALLOCATE(ipj_s(ipf)) 81 81 82 ijpj = 2 + nn_hls -1 ! Max 2nd dimension of message transfers (last two j-line only)83 ipj_s(:) = 1 + nn_hls - 82 ijpj = 2 + nn_hls -1 ! Max 2nd dimension of message transfers (last two j-line only) 83 ipj_s(:) = 1 + nn_hls -1 ! Real 2nd dimension of message transfers (depending on perf requirement) 84 84 ! by default, only one line is exchanged 85 85 … … 98 98 IF ( l_full_nf_update .OR. & ! if coupling fields 99 99 ( ncom_stp == nit000 .AND. .NOT. ln_rstart ) ) & ! at first time step, if not restart 100 ipj_s(:) = 2 + nn_hls - 1100 ipj_s(:) = 2 + nn_hls -1 101 101 102 102 ! Index of modifying lines in input … … 110 110 ! 111 111 CASE ( 'T' , 'W' ,'U' ) ! T-, U-, W-point 112 113 114 112 DO ji = 1, nn_hls+1 113 jj_s(jf,ji) = nlcj - 2*nn_hls +ji -1 114 ENDDO 115 115 CASE ( 'V' , 'F' ) ! V-, F-point 116 117 118 116 DO ji = 1, nn_hls+1 117 jj_s(jf,ji) = nlcj - 2*nn_hls +ji - 2 118 ENDDO 119 119 END SELECT 120 120 ! … … 123 123 ! 124 124 CASE ( 'T' , 'W' ,'U' ) ! T-, U-, W-point 125 126 jj_s(jf,ji) = nlcj - 2*nn_hls + ji 127 128 125 DO ji = 1, nn_hls 126 jj_s(jf,ji) = nlcj - 2*nn_hls + ji 127 ENDDO 128 ipj_s(jf) = nn_hls ! need only one line anyway 129 129 CASE ( 'V' , 'F' ) ! V-, F-point 130 131 132 130 DO ji = 1, nn_hls+1 131 jj_s(jf,ji) = nlcj - 2*nn_hls +ji -1 132 ENDDO 133 133 END SELECT 134 134 ! … … 139 139 ipf_j = sum (ipj_s(:)) ! Total number of lines to be exchanged 140 140 ! 141 ALLOCATE( znorthloc( 1-nn_hls+1:jpimax,ipf_j,ipk,ipl,1) )141 ALLOCATE( znorthloc(jpimax,ipf_j,ipk,ipl,1) ) 142 142 ! 143 143 js = 0 … … 147 147 DO jl = 1, ipl 148 148 DO jk = 1, ipk 149 znorthloc(1 -nn_hls+1:jpi,js,jk,jl,1) = ARRAY_IN(1-nn_hls+1:jpi,jj_s(jf,jj),jk,jl,jf)149 znorthloc(1:jpi,js,jk,jl,1) = ARRAY_IN(1:jpi,jj_s(jf,jj),jk,jl,jf) 150 150 END DO 151 151 END DO … … 153 153 END DO 154 154 ! 155 ibuffsize = (jpimax + nn_hls -1)* ipf_j * ipk * ipl156 ! 157 ALLOCATE( zfoldwk( 1-nn_hls+1:jpimax,ipf_j,ipk,ipl,1) )158 ALLOCATE( ztabr( 1-nn_hls+1:(jpi+nn_hls-1)*jpmaxngh-nn_hls+1,ijpj,ipk,ipl,ipf) )155 ibuffsize = jpimax * ipf_j * ipk * ipl 156 ! 157 ALLOCATE( zfoldwk(jpimax,ipf_j,ipk,ipl,1) ) 158 ALLOCATE( ztabr(jpimax*jpmaxngh,ijpj,ipk,ipl,ipf) ) 159 159 ! when some processors of the north fold are suppressed, 160 160 ! values of ztab* arrays corresponding to these suppressed domain won't be defined … … 177 177 iilb = nimppt(iproc+1) 178 178 ilci = nlcit (iproc+1) 179 ildi = nldit (iproc+1) 180 ilei = nleit (iproc+1) 181 IF( iilb == 1 ) ildi = 1! e-w boundary already done -> force to take 1st column182 IF( iilb + ilci - 1 == jpiglo ) ilei = ilci! e-w boundary already done -> force to take last column179 ildi = nldit (iproc+1) + nn_hls-1 180 ilei = nleit (iproc+1) + nn_hls-1 181 IF( iilb == 1 ) ildi = nn_hls ! e-w boundary already done -> force to take 1st column 182 IF( iilb + ilci - 1 == jpiglo ) ilei = nlei+1 ! e-w boundary already done -> force to take last column 183 183 iilb = nfiimpp(isendto(jr),jpnj) - nfiimpp(isendto(1),jpnj) 184 184 ENDIF … … 191 191 DO jk = 1, ipk 192 192 DO ji = ildi, ilei 193 ztabr(iilb +ji,jj,jk,jl,jf) = zfoldwk(ji,js,jk,jl,1)193 ztabr(iilb-nn_hls+1+ji,jj,jk,jl,jf) = zfoldwk(ji,js,jk,jl,1) 194 194 END DO 195 195 END DO … … 201 201 DO jk = 1, ipk 202 202 DO ji = ildi, ilei 203 ztabr(iilb +ji,jj,jk,jl,jf) = ARRAY_IN(ji,jj_s(jf,jj),jk,jl,jf)203 ztabr(iilb-nn_hls+1+ji,jj,jk,jl,jf) = ARRAY_IN(ji,jj_s(jf,jj),jk,jl,jf) 204 204 END DO 205 205 END DO
Note: See TracChangeset
for help on using the changeset viewer.