Changeset 15192 for NEMO/branches/2021
- Timestamp:
- 2021-08-13T15:16:48+02:00 (3 years ago)
- Location:
- NEMO/branches/2021/dev_r14318_RK3_stage1/src
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/stprk3_stg.F90
r14993 r15192 22 22 USE dynspg_ts, ONLY: un_adv , vn_adv ! advective transport from N to N+1 23 23 USE bdydyn ! ocean open boundary conditions (define bdy_dyn) 24 #if defined key_agrif 24 # if defined key_top 25 USE trc ! ocean passive tracers variables 26 USE trcadv ! advection (trc_adv routine) 27 USE trcsms ! source and sink 28 USE trctrp ! transport 29 USE trcbdy 30 USE trcstp_rk3 31 # endif 32 # if defined key_agrif 25 33 USE agrif_oce_interp 26 # endif34 # endif 27 35 28 36 ! … … 71 79 INTEGER, INTENT(in) :: kstp, Kbb, Kmm, Krhs, Kaa ! ocean time-step and time-level indices 72 80 ! 73 INTEGER :: ji, jj, jk, j tile! dummy loop indices81 INTEGER :: ji, jj, jk, jn, jtile ! dummy loop indices 74 82 REAL(wp) :: ze3Tb, ze3Sb, z1_e3t ! local scalars 75 83 REAL(wp) :: ze3Tr, ze3Sr ! - - … … 194 202 ! RHS of tracers : ADV only using (zaU,zaV,ww) 195 203 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 196 #if defined key_top 204 205 # if defined key_top 197 206 ! !== Passive Tracer ==! 198 !===>>>>>> create a specific trc_RK3_adv routine with Advective velocity 199 ! and with Kstg as input argument 200 ! CALL trc_stp ( kstp, Kbb, Kmm, Krhs, Kaa ) ! time-stepping 201 #endif 207 ! 208 IF( kstg == 1 ) THEN 209 CALL trc_stp_start( kstp, Kbb, Kmm, Krhs, Kaa ) 210 ENDIF 211 ! 212 DO jn = 1, jptra 213 DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 214 tr(ji,jj,jk,jn,Krhs) = 0._wp ! set tracer trends to zero 215 END_3D 216 END DO 217 ! !== advection of passive tracers ==! 218 rDt_trc = rDt 219 CALL trc_adv( kstp, Kbb, Kmm, tr, Krhs, zaU, zaV, ww ) ! horizontal & vertical advection 220 ! 221 ! 222 SELECT CASE( kstg ) 223 ! !-------------------! 224 CASE ( 1 , 2 ) !== Stage 1 & 2 ==! stg1: Kbb = N ; Kaa = N+1/3 225 ! !-------------------! stg2: Kbb = N ; Kmm = N+1/3 ; Kaa = N+1/2 226 ! 227 ! !== time integration ==! ∆t = rn_Dt/3 (stg1) or rn_Dt/2 (stg2) 228 DO jn = 1, jptra 229 DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 230 ze3Tb = e3t(ji,jj,jk,Kbb) * tr(ji,jj,jk,jn,Kbb ) 231 ze3Tr = e3t(ji,jj,jk,Kmm) * tr(ji,jj,jk,jn,Krhs) 232 z1_e3t= 1._wp / e3t(ji,jj,jk, Kaa) 233 tr(ji,jj,jk,jn,Kaa) = ( ze3Tb + rDt * ze3Tr*tmask(ji,jj,jk) ) * z1_e3t 234 END_3D 235 END DO 236 ! !---------------! 237 CASE ( 3 ) !== Stage 3 ==! add all RHS terms but advection (=> Kbb only) 238 ! !---------------! 239 CALL trc_sms( kstp, Kbb, Kbb, Krhs ) ! tracers: sinks and sources 240 CALL trc_trp( kstp, Kbb, Kbb, Krhs, Kaa ) ! transport of passive tracers (without advection) 241 ! 242 !!st a mettre dans trp 243 !!st# if defined key_agrif 244 !!st CALL Agrif_trc( kstp ) ! AGRIF zoom boundaries 245 !!st# endif 246 !!st ! Update after tracer on domain lateral boundaries 247 !!st CALL lbc_lnk( 'stprk3_stg', tr(:,:,:,:,Kaa), 'T', 1._wp ) 248 !!st ! 249 !!st IF( ln_bdy ) CALL trc_bdy( kstp, Kbb, Kmm, Kaa ) 250 ! 251 CALL trc_stp_end( kstp, Kbb, Kmm, Kaa ) 252 ! 253 END SELECT 254 # endif 202 255 203 256 ! !== T-S Tracers ==! 204 257 205 258 !===>>>>>> Modify tra_adv_... routines so that Krhs to zero useless 206 DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 207 ts(ji,jj,jk,:,Krhs) = 0._wp ! set tracer trends to zero 208 END_3D 209 210 !===>>> CAUTION here sans GM velocity but with stokes drift ! 259 DO jn = 1, jpts 260 DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 261 ts(ji,jj,jk,jn,Krhs) = 0._wp ! set tracer trends to zero 262 END_3D 263 END DO 264 265 !===>>> CAUTION here may be without GM velocity but stokes drift required ! 0 barotropic divergence for GM != 0 barotropic divergence for SD 266 !!st consistence 2D / 3D - flux de masse 211 267 CALL tra_adv( kstp, Kbb, Kmm, ts, Krhs, zaU, zaV, ww ) ! hor. + vert. advection ==> RHS 212 268 … … 268 324 & tab3d_2=ts(:,:,:,jp_sal,Kaa), clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) 269 325 ! 270 !271 326 ! !---------------! 272 327 CASE ( 3 ) !== Stage 3 ==! add all remaining RHS terms … … 284 339 ENDIF 285 340 286 # if defined key_agrif341 # if defined key_agrif 287 342 IF(.NOT. Agrif_Root() ) THEN ! AGRIF: sponge ==> momentum and tracer RHS 288 343 CALL Agrif_Sponge_dyn 289 344 CALL Agrif_Sponge_tra 290 345 ENDIF 291 # endif346 # endif 292 347 ! !== complete the tracers RHS ==! except ZDF (implicit) 293 #if defined key_top294 ! !* Passive Tracer *!295 296 !===>>>>>> create a specific trc_RK3_NOadv routine with other trend than ADV297 ! and with Kstg as input argument298 ! CALL trc_stp ( kstp, Kbb, Kmm, Krhs, Kaa ) ! time-stepping299 #endif300 348 ! !* T-S Tracer *! 301 349 ! … … 324 372 ! 325 373 IF( ln_zdfnpc ) CALL tra_npc( kstp, Kmm, Krhs, ts , Kaa ) ! update after fields by non-penetrative convection 326 327 328 !==>>>>> Missing obc CALL....329 330 374 ! 331 375 END SELECT
Note: See TracChangeset
for help on using the changeset viewer.