- Timestamp:
- 2021-04-07T19:16:18+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2021/dev_r14273_HPC-02_Daley_Tiling/src/OCE/DYN/sshwzv.F90
r14205 r14680 78 78 REAL(wp), DIMENSION(jpi,jpj,jpt), INTENT(inout) :: pssh ! sea-surface height 79 79 ! 80 INTEGER :: j k ! dummy loop index80 INTEGER :: ji, jj, jk ! dummy loop index 81 81 REAL(wp) :: zcoef ! local scalar 82 82 REAL(wp), DIMENSION(jpi,jpj) :: zhdiv ! 2D workspace … … 103 103 ! 104 104 zhdiv(:,:) = 0._wp 105 DO jk = 1, jpkm1 ! Horizontal divergence of barotropic transports 106 zhdiv(:,:) = zhdiv(:,:) + e3t(:,:,jk,Kmm) * hdiv(:,:,jk) 107 END DO 105 ! [comm_cleanup] ! DO jk = 1, jpkm1 ! Horizontal divergence of barotropic transports 106 DO_3D( nn_hls-1, nn_hls, nn_hls-1, nn_hls, 1, jpkm1 ) ! Horizontal divergence of barotropic transports 107 zhdiv(ji,jj) = zhdiv(ji,jj) + e3t(ji,jj,jk,Kmm) * hdiv(ji,jj,jk) 108 END_3D 108 109 ! ! Sea surface elevation time stepping 109 110 ! In time-split case we need a first guess of the ssh after (using the baroclinic timestep) in order to 110 111 ! compute the vertical velocity which can be used to compute the non-linear terms of the momentum equations. 111 112 ! 112 pssh(:,:,Kaa) = ( pssh(:,:,Kbb) - rDt * ( zcoef * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) ) ) * ssmask(:,:) 113 ! [comm_cleanup] 114 DO_2D( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 115 pssh(ji,jj,Kaa) = ( pssh(ji,jj,Kbb) - rDt * ( zcoef * ( emp_b(ji,jj) + emp(ji,jj) ) + zhdiv(ji,jj) ) ) * ssmask(ji,jj) 116 END_2D 113 117 ! 114 118 #if defined key_agrif … … 119 123 IF ( .NOT.ln_dynspg_ts ) THEN 120 124 IF( ln_bdy ) THEN 121 CALL lbc_lnk( 'sshwzv', pssh(:,:,Kaa), 'T', 1.0_wp ) ! Not sure that's necessary 125 ! [comm_cleanup] 126 IF (nn_hls.eq.1) CALL lbc_lnk( 'sshwzv', pssh(:,:,Kaa), 'T', 1.0_wp ) ! Not sure that's necessary 122 127 CALL bdy_ssh( pssh(:,:,Kaa) ) ! Duplicate sea level across open boundaries 123 128 ENDIF … … 178 183 ! horizontal divergence of thickness diffusion transport ( velocity multiplied by e3t) 179 184 ! - ML - note: computation already done in dom_vvl_sf_nxt. Could be optimized (not critical and clearer this way) 180 DO_2D( 0, 0, 0, 0 ) 185 ! [comm_cleanup] ! DO_2D( 0, 0, 0, 0 ) 186 DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) 181 187 zhdiv(ji,jj,jk) = r1_e1e2t(ji,jj) * ( un_td(ji,jj,jk) - un_td(ji-1,jj,jk) + vn_td(ji,jj,jk) - vn_td(ji,jj-1,jk) ) 182 188 END_2D 183 189 END DO 184 CALL lbc_lnk('sshwzv', zhdiv, 'T', 1.0_wp) ! - ML - Perhaps not necessary: not used for horizontal "connexions"190 IF (nn_hls.eq.1) CALL lbc_lnk('sshwzv', zhdiv, 'T', 1.0_wp) ! - ML - Perhaps not necessary: not used for horizontal "connexions" 185 191 ! ! Is it problematic to have a wrong vertical velocity in boundary cells? 186 192 ! ! Same question holds for hdiv. Perhaps just for security … … 357 363 zdt = 2._wp * rn_Dt ! 2*rn_Dt and not rDt (for restartability) 358 364 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN 359 DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 365 ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 366 DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 ) 360 367 z1_e3t = 1._wp / e3t(ji,jj,jk,Kmm) 361 368 Cu_adv(ji,jj,jk) = zdt * & … … 374 381 END_3D 375 382 ELSE 376 DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 383 ! [comm_cleanup] ! DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 384 DO_3D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1, 1, jpkm1 ) 377 385 z1_e3t = 1._wp / e3t(ji,jj,jk,Kmm) 378 386 Cu_adv(ji,jj,jk) = zdt * & … … 387 395 END_3D 388 396 ENDIF 389 CALL lbc_lnk( 'sshwzv', Cu_adv, 'T', 1.0_wp )397 IF (nn_hls.eq.1) CALL lbc_lnk( 'sshwzv', Cu_adv, 'T', 1.0_wp ) 390 398 ! 391 399 CALL iom_put("Courant",Cu_adv) 392 400 ! 393 401 IF( MAXVAL( Cu_adv(:,:,:) ) > Cu_min ) THEN ! Quick check if any breaches anywhere 394 DO_3DS( 1, 1, 1, 1, jpkm1, 2, -1 ) ! or scan Courant criterion and partition ! w where necessary 402 ! [comm_cleanup] ! DO_3DS( 1, 1, 1, 1, jpkm1, 2, -1 ) ! or scan Courant criterion and partition ! w where necessary 403 DO_3DS( nn_hls, nn_hls, nn_hls, nn_hls, jpkm1, 2, -1 ) ! or scan Courant criterion and partition ! w where necessary 395 404 ! 396 405 zCu = MAX( Cu_adv(ji,jj,jk) , Cu_adv(ji,jj,jk-1) )
Note: See TracChangeset
for help on using the changeset viewer.