Changeset 14072 for NEMO/trunk/src/OCE/TRA/traldf_lap_blp.F90
- Timestamp:
- 2020-12-04T08:48:38+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/TRA/traldf_lap_blp.F90
r13982 r14072 4 4 !! Ocean tracers: lateral diffusivity trend (laplacian and bilaplacian) 5 5 !!============================================================================== 6 !! History : 3.7 ! 2014-01 (G. Madec, S. Masson) Original code, re-entrant laplacian 6 !! History : 3.7 ! 2014-01 (G. Madec, S. Masson) Original code, re-entrant laplacian 7 7 !!---------------------------------------------------------------------- 8 8 … … 74 74 !!---------------------------------------------------------------------- 75 75 !! *** ROUTINE tra_ldf_lap *** 76 !! 77 !! ** Purpose : Compute the before horizontal tracer (t & s) diffusive 76 !! 77 !! ** Purpose : Compute the before horizontal tracer (t & s) diffusive 78 78 !! trend and add it to the general trend of tracer equation. 79 79 !! 80 80 !! ** Method : Second order diffusive operator evaluated using before 81 !! fields (forward time scheme). The horizontal diffusive trends of 81 !! fields (forward time scheme). The horizontal diffusive trends of 82 82 !! the tracer is given by: 83 83 !! difft = 1/(e1e2t*e3t) { di-1[ pahu e2u*e3u/e1u di(tb) ] … … 86 86 !! pt_rhs = pt_rhs + difft 87 87 !! 88 !! ** Action : - Update pt_rhs arrays with the before iso-level 88 !! ** Action : - Update pt_rhs arrays with the before iso-level 89 89 !! harmonic mixing trend. 90 90 !!---------------------------------------------------------------------- … … 139 139 ! ! =========== ! 140 140 DO jn = 1, kjpt ! tracer loop ! 141 ! ! =========== ! 142 ! 141 ! ! =========== ! 142 ! 143 143 DO_3D( nn_hls, nn_hls-1, nn_hls, nn_hls-1, 1, jpkm1 ) !== First derivative (gradient) ==! 144 144 ztu(ji,jj,jk) = zaheeu(ji,jj,jk) * ( pt(ji+1,jj ,jk,jn) - pt(ji,jj,jk,jn) ) … … 152 152 IF( ln_isfcav ) THEN ! top in ocean cavities only 153 153 DO_2D( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 154 IF( miku(ji,jj) > 1 ) ztu(ji,jj,miku(ji,jj)) = zaheeu(ji,jj,miku(ji,jj)) * pgui(ji,jj,jn) 155 IF( mikv(ji,jj) > 1 ) ztv(ji,jj,mikv(ji,jj)) = zaheev(ji,jj,mikv(ji,jj)) * pgvi(ji,jj,jn) 154 IF( miku(ji,jj) > 1 ) ztu(ji,jj,miku(ji,jj)) = zaheeu(ji,jj,miku(ji,jj)) * pgui(ji,jj,jn) 155 IF( mikv(ji,jj) > 1 ) ztv(ji,jj,mikv(ji,jj)) = zaheev(ji,jj,mikv(ji,jj)) * pgvi(ji,jj,jn) 156 156 END_2D 157 157 ENDIF … … 177 177 ! 178 178 END SUBROUTINE tra_ldf_lap_t 179 179 180 180 181 181 SUBROUTINE tra_ldf_blp( kt, Kmm, kit000, cdtype, pahu, pahv , & … … 184 184 !!---------------------------------------------------------------------- 185 185 !! *** ROUTINE tra_ldf_blp *** 186 !! 187 !! ** Purpose : Compute the before lateral tracer diffusive 186 !! 187 !! ** Purpose : Compute the before lateral tracer diffusive 188 188 !! trend and add it to the general trend of tracer equation. 189 189 !! … … 238 238 ! NOTE: [tiling-comms-merge] Needed for both nn_hls as tra_ldf_iso and tra_ldf_triad have not yet been adjusted to work with nn_hls = 2. In the zps case the lbc_lnk in zps_hde handles this, but in the zco case zlap always needs this lbc_lnk. I did try adjusting the bounds in tra_ldf_iso and tra_ldf_triad so this lbc_lnk was only needed for nn_hls = 1, but this was not correct and I did not have time to figure out why 239 239 CALL lbc_lnk( 'traldf_lap_blp', zlap(:,:,:,:) , 'T', 1.0_wp ) ! Lateral boundary conditions (unchanged sign) 240 ! ! Partial top/bottom cell: GRADh( zlap ) 240 ! ! Partial top/bottom cell: GRADh( zlap ) 241 241 IF( ln_isfcav .AND. ln_zps ) THEN ; CALL zps_hde_isf( kt, Kmm, kjpt, zlap, zglu, zglv, zgui, zgvi ) ! both top & bottom 242 ELSEIF( ln_zps ) THEN ; CALL zps_hde ( kt, Kmm, kjpt, zlap, zglu, zglv ) ! only bottom 242 ELSEIF( ln_zps ) THEN ; CALL zps_hde ( kt, Kmm, kjpt, zlap, zglu, zglv ) ! only bottom 243 243 ENDIF 244 244 !
Note: See TracChangeset
for help on using the changeset viewer.