Changeset 11071 for NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdyice.F90
- Timestamp:
- 2019-06-04T14:58:06+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/BDY/bdyice.F90
r11067 r11071 56 56 ! 57 57 INTEGER :: jbdy ! BDY set index 58 LOGICAL, DIMENSION(4) :: l send1,lrecv1 ! indicate how communications are to be carried out58 LOGICAL, DIMENSION(4) :: llsend1, llrecv1 ! indicate how communications are to be carried out 59 59 !!---------------------------------------------------------------------- 60 60 ! controls … … 76 76 ! 77 77 ! Update bdy points 78 l send1(:) = .false.79 l recv1(:) = .false.78 llsend1(:) = .false. 79 llrecv1(:) = .false. 80 80 DO jbdy = 1, nb_bdy 81 81 IF( cn_ice(jbdy) == 'frs' ) THEN 82 l send1(:) = lsend1(:) .OR. lsend_bdy(jbdy,1,:) ! to every neighbour, T points83 l recv1(:) = lrecv1(:) .OR. lrecv_bdy(jbdy,1,:) ! from every neighbour, T points82 llsend1(:) = llsend1(:) .OR. lsend_bdyint(jbdy,1,:) ! possibly every direction, T points 83 llrecv1(:) = llrecv1(:) .OR. lrecv_bdyint(jbdy,1,:) ! possibly every direction, T points 84 84 END IF 85 85 END DO 86 IF( ANY(l send1) .OR. ANY(lrecv1) ) THEN ! if need to send/recv in at least one direction86 IF( ANY(llsend1) .OR. ANY(llrecv1) ) THEN ! if need to send/recv in at least one direction 87 87 ! exchange 3d arrays 88 CALL lbc_bdy_lnk_multi( 'bdyice', l send1,lrecv1, a_i , 'T', 1., h_i , 'T', 1., h_s , 'T', 1. &89 & , oa_i, 'T', 1., a_ip, 'T', 1., v_ip, 'T', 1. &90 & , s_i , 'T', 1., t_su, 'T', 1., v_i , 'T', 1. &91 & , v_s , 'T', 1., sv_i, 'T', 1. )88 CALL lbc_bdy_lnk_multi( 'bdyice', llsend1, llrecv1, a_i , 'T', 1., h_i , 'T', 1., h_s , 'T', 1. & 89 & , oa_i, 'T', 1., a_ip, 'T', 1., v_ip, 'T', 1. & 90 & , s_i , 'T', 1., t_su, 'T', 1., v_i , 'T', 1. & 91 & , v_s , 'T', 1., sv_i, 'T', 1. ) 92 92 ! exchange 4d arrays 93 CALL lbc_bdy_lnk_multi( 'bdyice', l send1,lrecv1, t_s , 'T', 1., e_s , 'T', 1. ) ! third dimension = 194 CALL lbc_bdy_lnk_multi( 'bdyice', l send1, lrecv1, t_i , 'T', 1., e_i , 'T', 1. ) ! third dimension = 293 CALL lbc_bdy_lnk_multi( 'bdyice', llsend1, llrecv1, t_s , 'T', 1., e_s , 'T', 1. ) ! third dimension = 1 94 CALL lbc_bdy_lnk_multi( 'bdyice', llsend1, llrecv1, t_i , 'T', 1., e_i , 'T', 1. ) ! third dimension = jpk 95 95 END IF 96 96 ! … … 172 172 ! 173 173 IF( flagu == 1. ) THEN 174 IF( ji+1 > jpi 174 IF( ji+1 > jpi ) CYCLE 175 175 IF( u_ice(ji ,jj ) < 0. ) jpbound = 1 ; ib = ji+1 176 176 END IF 177 177 IF( flagu == -1. ) THEN 178 IF( ji-1 < 1 178 IF( ji-1 < 1 ) CYCLE 179 179 IF( u_ice(ji-1,jj ) < 0. ) jpbound = 1 ; ib = ji-1 180 180 END IF 181 181 IF( flagv == 1. ) THEN 182 IF( j i+1 > jpj ) CYCLE182 IF( jj+1 > jpj ) CYCLE 183 183 IF( v_ice(ji ,jj ) < 0. ) jpbound = 1 ; jb = jj+1 184 184 END IF … … 299 299 INTEGER :: jbdy ! BDY set index 300 300 REAL(wp) :: zmsk1, zmsk2, zflag 301 LOGICAL, DIMENSION(4) :: l send2, lrecv2, lsend3,lrecv3 ! indicate how communications are to be carried out301 LOGICAL, DIMENSION(4) :: llsend2, llrecv2, llsend3, llrecv3 ! indicate how communications are to be carried out 302 302 !!------------------------------------------------------------------------------ 303 303 IF( ln_timing ) CALL timing_start('bdy_ice_dyn') … … 384 384 SELECT CASE ( cd_type ) 385 385 CASE ( 'U' ) 386 l send2(:) = .false. ;lrecv2(:) = .false.386 llsend2(:) = .false. ; llrecv2(:) = .false. 387 387 DO jbdy = 1, nb_bdy 388 388 IF( cn_ice(jbdy) == 'frs' .AND. nn_ice_dta(jbdy) /= 0 ) THEN 389 lsend2(:) = lsend2(:) .OR. lsend_bdy(jbdy,2,:) ! to every bdy neighbour, U points 390 lrecv2(:) = lrecv2(:) .OR. lrecv_bdy(jbdy,2,:) ! from every bdy neighbour, U points 389 llsend2(:) = llsend2(:) .OR. lsend_bdyint(jbdy,2,:) ! possibly every direction, U points 390 llsend2(1) = llsend2(1) .OR. lsend_bdyext(jbdy,2,1) ! neighbour might search point towards bdy on its east 391 llrecv2(:) = llrecv2(:) .OR. lrecv_bdyint(jbdy,2,:) ! possibly every direction, U points 392 llrecv2(2) = llrecv2(2) .OR. lrecv_bdyext(jbdy,2,2) ! might search point towards bdy on the east 391 393 END IF 392 394 END DO 393 IF( ANY(l send2) .OR. ANY(lrecv2) ) THEN ! if need to send/recv in at least one direction394 CALL lbc_bdy_lnk( 'bdyice', l send2,lrecv2, u_ice, 'U', -1. )395 IF( ANY(llsend2) .OR. ANY(llrecv2) ) THEN ! if need to send/recv in at least one direction 396 CALL lbc_bdy_lnk( 'bdyice', llsend2, llrecv2, u_ice, 'U', -1. ) 395 397 END IF 396 398 CASE ( 'V' ) 397 l send3(:) = .false. ;lrecv3(:) = .false.399 llsend3(:) = .false. ; llrecv3(:) = .false. 398 400 DO jbdy = 1, nb_bdy 399 401 IF( cn_ice(jbdy) == 'frs' .AND. nn_ice_dta(jbdy) /= 0 ) THEN 400 lsend3(:) = lsend3(:) .OR. lsend_bdy(jbdy,3,:) ! to every bdy neighbour, V points 401 lrecv3(:) = lrecv3(:) .OR. lrecv_bdy(jbdy,3,:) ! from every bdy neighbour, V points 402 llsend3(:) = llsend3(:) .OR. lsend_bdyint(jbdy,3,:) ! possibly every direction, V points 403 llsend3(3) = llsend3(3) .OR. lsend_bdyext(jbdy,3,3) ! neighbour might search point towards bdy on its north 404 llrecv3(:) = llrecv3(:) .OR. lrecv_bdyint(jbdy,3,:) ! possibly every direction, V points 405 llrecv3(4) = llrecv3(4) .OR. lrecv_bdyext(jbdy,3,4) ! might search point towards bdy on the north 402 406 END IF 403 407 END DO 404 IF( ANY(l send3) .OR. ANY(lrecv3) ) THEN ! if need to send/recv in at least one direction405 CALL lbc_bdy_lnk( 'bdyice', l send3,lrecv3, v_ice, 'V', -1. )408 IF( ANY(llsend3) .OR. ANY(llrecv3) ) THEN ! if need to send/recv in at least one direction 409 CALL lbc_bdy_lnk( 'bdyice', llsend3, llrecv3, v_ice, 'V', -1. ) 406 410 END IF 407 411 END SELECT
Note: See TracChangeset
for help on using the changeset viewer.