Changeset 14809 for NEMO/branches/2021
- Timestamp:
- 2021-05-07T14:00:47+02:00 (4 years ago)
- Location:
- NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/DYN/dynadv_ubs.F90
r14433 r14809 109 109 ! 110 110 DO_2D( 0, 0, 0, 0 ) ! laplacian 111 zlu_uu(ji,jj,jk,1) = ( puu (ji+1,jj ,jk,Kbb) - 2.*puu (ji,jj,jk,Kbb) + puu (ji-1,jj ,jk,Kbb) ) * umask(ji,jj,jk) 112 zlv_vv(ji,jj,jk,1) = ( pvv (ji ,jj+1,jk,Kbb) - 2.*pvv (ji,jj,jk,Kbb) + pvv (ji ,jj-1,jk,Kbb) ) * vmask(ji,jj,jk) 111 ! round brackets added to fix the order of floating point operations 112 ! needed to ensure halo 1 - halo 2 compatibility 113 zlu_uu(ji,jj,jk,1) = ( (puu (ji+1,jj ,jk,Kbb) - puu (ji ,jj ,jk,Kbb)) + & 114 & (puu (ji-1,jj ,jk,Kbb) - puu (ji ,jj ,jk,Kbb)) ) * umask(ji ,jj ,jk) 115 zlv_vv(ji,jj,jk,1) = ( (pvv (ji ,jj+1,jk,Kbb) - pvv (ji ,jj ,jk,Kbb)) + & 116 & (pvv (ji ,jj-1,jk,Kbb) - pvv (ji ,jj ,jk,Kbb)) ) * vmask(ji ,jj ,jk) 113 117 zlu_uv(ji,jj,jk,1) = ( puu (ji ,jj+1,jk,Kbb) - puu (ji ,jj ,jk,Kbb) ) * fmask(ji ,jj ,jk) & 114 118 & - ( puu (ji ,jj ,jk,Kbb) - puu (ji ,jj-1,jk,Kbb) ) * fmask(ji ,jj-1,jk) … … 116 120 & - ( pvv (ji ,jj ,jk,Kbb) - pvv (ji-1,jj ,jk,Kbb) ) * fmask(ji-1,jj ,jk) 117 121 ! 118 zlu_uu(ji,jj,jk,2) = ( zfu(ji+1,jj ,jk) - 2.*zfu(ji,jj,jk) + zfu(ji-1,jj ,jk) ) * umask(ji,jj,jk) 119 zlv_vv(ji,jj,jk,2) = ( zfv(ji ,jj+1,jk) - 2.*zfv(ji,jj,jk) + zfv(ji ,jj-1,jk) ) * vmask(ji,jj,jk) 122 zlu_uu(ji,jj,jk,2) = ( (zfu(ji+1,jj ,jk) - zfu(ji ,jj ,jk)) + & 123 & (zfu(ji-1,jj ,jk) - zfu(ji ,jj ,jk)) ) * umask(ji ,jj ,jk) 124 zlv_vv(ji,jj,jk,2) = ( (zfv(ji ,jj+1,jk) - zfv(ji ,jj ,jk)) + & 125 & (zfv(ji ,jj-1,jk) - zfv(ji ,jj ,jk)) ) * vmask(ji ,jj ,jk) 120 126 zlu_uv(ji,jj,jk,2) = ( zfu(ji ,jj+1,jk) - zfu(ji ,jj ,jk) ) * fmask(ji ,jj ,jk) & 121 127 & - ( zfu(ji ,jj ,jk) - zfu(ji ,jj-1,jk) ) * fmask(ji ,jj-1,jk) … … 124 130 END_2D 125 131 END DO 126 CALL lbc_lnk( 'dynadv_ubs', zlu_uu(:,:,:,1), 'U', 1.0_wp , zlu_uv(:,:,:,1), 'U',1.0_wp, &127 & zlu_uu(:,:,:,2), 'U', 1.0_wp , zlu_uv(:,:,:,2), 'U', 1.0_wp, &128 & zlv_vv(:,:,:,1), 'V', 1.0_wp , zlv_vu(:,:,:,1), 'V',1.0_wp, &129 & zlv_vv(:,:,:,2), 'V', 1.0_wp , zlv_vu(:,:,:,2), 'V',1.0_wp )132 CALL lbc_lnk( 'dynadv_ubs', zlu_uu(:,:,:,1), 'U', -1.0_wp , zlu_uv(:,:,:,1), 'U', -1.0_wp, & 133 & zlu_uu(:,:,:,2), 'U', -1.0_wp , zlu_uv(:,:,:,2), 'U', -1.0_wp, & 134 & zlv_vv(:,:,:,1), 'V', -1.0_wp , zlv_vu(:,:,:,1), 'V', -1.0_wp, & 135 & zlv_vv(:,:,:,2), 'V', -1.0_wp , zlv_vu(:,:,:,2), 'V', -1.0_wp ) 130 136 ! 131 137 ! ! ====================== ! -
NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/DYN/dynvor.F90
r14681 r14809 632 632 CASE ( 0 ) ! original formulation (masked averaging of e3t divided by 4) 633 633 DO_2D( 1, 0, 1, 0 ) 634 ze3f = ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & 635 & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) & 636 & + e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & 637 & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) 634 ! round brackets added to fix the order of floating point operations 635 ! needed to ensure halo 1 - halo 2 compatibility 636 ze3f = ( (e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & 637 & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk)) & 638 & + (e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & 639 & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk)) ) 638 640 IF( ze3f /= 0._wp ) THEN ; z1_e3f(ji,jj) = 4._wp / ze3f 639 641 ELSE ; z1_e3f(ji,jj) = 0._wp … … 642 644 CASE ( 1 ) ! new formulation (masked averaging of e3t divided by the sum of mask) 643 645 DO_2D( 1, 0, 1, 0 ) 644 ze3f = ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & 645 & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) & 646 & + e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & 647 & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) 646 ! round brackets added to fix the order of floating point operations 647 ! needed to ensure halo 1 - halo 2 compatibility 648 ze3f = ( (e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & 649 & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk)) & 650 & + (e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & 651 & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk)) ) 648 652 zmsk = ( tmask(ji,jj+1,jk) + tmask(ji+1,jj+1,jk) & 649 653 & + tmask(ji,jj ,jk) + tmask(ji+1,jj ,jk) ) … … 785 789 CASE ( np_RVO ) !* relative vorticity 786 790 DO_2D( 1, 0, 1, 0 ) 787 zwz(ji,jj,jk) = ( e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk) & 788 & - e1u(ji ,jj+1) * pu(ji ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk) ) & 791 ! round brackets added to fix the order of floating point operations 792 ! needed to ensure halo 1 - halo 2 compatibility 793 zwz(ji,jj,jk) = ( (e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk)) & 794 & - (e1u(ji ,jj+1) * pu(ji ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk)) ) & 789 795 & * r1_e1e2f(ji,jj) 790 796 END_2D … … 801 807 CASE ( np_CRV ) !* Coriolis + relative vorticity 802 808 DO_2D( 1, 0, 1, 0 ) 803 zwz(ji,jj,jk) = ( ff_f(ji,jj) + ( e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk) & 804 & - e1u(ji ,jj+1) * pu(ji ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk) ) & 809 ! round brackets added to fix the order of floating point operations 810 ! needed to ensure halo 1 - halo 2 compatibility 811 zwz(ji,jj,jk) = ( ff_f(ji,jj) + ( (e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk)) & 812 & - (e1u(ji ,jj+1) * pu(ji ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk)) ) & 805 813 & * r1_e1e2f(ji,jj) ) 806 814 END_2D -
NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/TRA/traadv_fct.F90
r14433 r14809 238 238 END_2D 239 239 END DO 240 CALL lbc_lnk( 'traadv_fct', zltu, 'T', 1.0_wp , zltv, 'T', 1.0_wp ) ! Lateral boundary cond. (unchanged sgn) 240 ! NOTE [ comm_cleanup ] : need to change sign to ensure halo 1 - halo 2 compatibility 241 CALL lbc_lnk( 'traadv_fct', zltu, 'T', -1.0_wp , zltv, 'T', -1.0_wp ) ! Lateral boundary cond. (unchanged sgn) 241 242 ! 242 243 DO_3D( 1, 0, 1, 0, 1, jpkm1 ) … … 244 245 zC2t_v = pt(ji,jj,jk,jn,Kmm) + pt(ji ,jj+1,jk,jn,Kmm) 245 246 ! ! C4 minus upstream advective fluxes 246 zwx(ji,jj,jk) = 0.5_wp * pU(ji,jj,jk) * ( zC2t_u + zltu(ji,jj,jk) - zltu(ji+1,jj,jk) ) - zwx(ji,jj,jk) 247 zwy(ji,jj,jk) = 0.5_wp * pV(ji,jj,jk) * ( zC2t_v + zltv(ji,jj,jk) - zltv(ji,jj+1,jk) ) - zwy(ji,jj,jk) 247 ! round brackets added to fix the order of floating point operations 248 ! needed to ensure halo 1 - halo 2 compatibility 249 zwx(ji,jj,jk) = 0.5_wp * pU(ji,jj,jk) * ( zC2t_u + ( zltu(ji,jj,jk) - zltu(ji+1,jj,jk) & 250 & ) & ! bracket for halo 1 - halo 2 compatibility 251 & ) - zwx(ji,jj,jk) 252 zwy(ji,jj,jk) = 0.5_wp * pV(ji,jj,jk) * ( zC2t_v + ( zltv(ji,jj,jk) - zltv(ji,jj+1,jk) & 253 & ) & ! bracket for halo 1 - halo 2 compatibility 254 & ) - zwy(ji,jj,jk) 248 255 END_3D 249 256 IF (nn_hls.EQ.2) CALL lbc_lnk( 'traadv_fct', zwx, 'U', -1.0_wp, zwy, 'V', -1.0_wp ) ! Lateral boundary cond. (unchanged sgn) -
NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/TRA/trabbl.F90
r14433 r14809 141 141 IF( ntile == 0 .OR. ntile == nijtile ) THEN ! Do only on the last tile 142 142 ! lateral boundary conditions ; just need for outputs 143 CALL lbc_lnk( 'trabbl', utr_bbl, 'U', 1.0_wp , vtr_bbl, 'V',1.0_wp )143 CALL lbc_lnk( 'trabbl', utr_bbl, 'U', -1.0_wp , vtr_bbl, 'V', -1.0_wp ) 144 144 CALL iom_put( "uoce_bbl", utr_bbl ) ! bbl i-transport 145 145 CALL iom_put( "voce_bbl", vtr_bbl ) ! bbl j-transport
Note: See TracChangeset
for help on using the changeset viewer.