Changeset 1870 for branches/DEV_r1837_MLF/NEMO/OPA_SRC/TRA/tranxt.F90
- Timestamp:
- 2010-05-12T17:36:00+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DEV_r1837_MLF/NEMO/OPA_SRC/TRA/tranxt.F90
r1847 r1870 15 15 !! 3.0 ! 2008-06 (G. Madec) time stepping always done in trazdf 16 16 !! 3.1 ! 2009-02 (G. Madec, R. Benshila) re-introduce the vvl option 17 !! 3.3 ! 2010-04 (M. Leclair, G. Madec) semi-implicit hpg with asselin filter 17 !! 3.3 ! 2010-04 (M. Leclair, G. Madec) semi-implicit hpg with asselin filter + modified LF-RA 18 18 !!---------------------------------------------------------------------- 19 19 … … 81 81 !! ** Action : - (tb,sb) and (tn,sn) ready for the next time step 82 82 !! - (ta,sa) time averaged (t,s) (ln_dynhpg_imp = T) 83 !! 84 !! Reference : Leclair, M., and G. Madec, 2009, Ocean Modelling. 83 85 !!---------------------------------------------------------------------- 84 86 USE oce, ONLY : ztrdt => ua ! use ua as 3D workspace … … 91 93 !!---------------------------------------------------------------------- 92 94 93 IF( kt == nit000 ) THEN 95 IF( kt == nit000 ) THEN !== initialisation ==! 94 96 IF(lwp) WRITE(numout,*) 95 97 IF(lwp) WRITE(numout,*) 'tra_nxt : achieve the time stepping by Asselin filter and array swap' … … 99 101 r1_2bcp = 1.e0 - 2.e0 * rbcp 100 102 ENDIF 101 102 ! Update after tracer on domain lateral boundaries 103 ! ! set time step size (Euler/Leapfrog) 104 IF( neuler == 0 .AND. kt == nit000 ) THEN ; r2dt_t(:) = rdttra(:) ! at nit000 (Euler) 105 ELSEIF( kt <= nit000 + 1 ) THEN ; r2dt_t(:) = 2.* rdttra(:) ! at nit000 or nit000+1 (Leapfrog) 106 ENDIF 107 108 ! !== Update after tracer on domain lateral boundaries ==! 103 109 ! 104 CALL lbc_lnk( ta, 'T', 1. ) ! local domain boundaries (T-point, unchanged sign)110 CALL lbc_lnk( ta, 'T', 1. ) ! local domain boundaries (T-point, unchanged sign) 105 111 CALL lbc_lnk( sa, 'T', 1. ) 106 112 ! 107 113 #if defined key_obc 108 CALL obc_tra( kt ) ! OBC open boundaries114 CALL obc_tra( kt ) ! OBC open boundaries 109 115 #endif 110 116 #if defined key_bdy 111 CALL bdy_tra( kt ) ! BDY open boundaries117 CALL bdy_tra( kt ) ! BDY open boundaries 112 118 #endif 113 119 #if defined key_agrif 114 CALL Agrif_tra ! AGRIF zoom boundaries120 CALL Agrif_tra ! AGRIF zoom boundaries 115 121 #endif 116 122 117 ! set time step size (Euler/Leapfrog) 118 IF( neuler == 0 .AND. kt == nit000 ) THEN ; r2dt_t(:) = rdttra(:) ! at nit000 (Euler) 119 ELSEIF( kt <= nit000 + 1 ) THEN ; r2dt_t(:) = 2.* rdttra(:) ! at nit000 or nit000+1 (Leapfrog) 120 ENDIF 121 122 ! trends computation initialisation 123 IF( l_trdtra ) THEN ! store now fields before applying the Asselin filter 123 IF( l_trdtra ) THEN ! trends computation: store now fields before applying the Asselin filter 124 124 ztrdt(:,:,:) = tn(:,:,:) 125 125 ztrds(:,:,:) = sn(:,:,:) 126 126 ENDIF 127 127 128 ! Leap-Frog + Asselin filter time stepping128 ! !== modifed Leap-Frog + Asselin filter (modified LF-RA) scheme ==! 129 129 IF( lk_vvl ) THEN ; CALL tra_nxt_vvl( kt ) ! variable volume level (vvl) 130 130 ELSE ; CALL tra_nxt_fix( kt ) ! fixed volume level … … 132 132 133 133 #if defined key_agrif 134 ! Update tracer at AGRIF zoom boundaries 135 IF( .NOT.Agrif_Root() ) CALL Agrif_Update_Tra( kt ) ! children only 134 IF( .NOT.Agrif_Root() ) CALL Agrif_Update_Tra( kt ) ! Update tracer at AGRIF zoom boundaries (children only) 136 135 #endif 137 136 138 ! trends computation 139 IF( l_trdtra ) THEN ! trend of the Asselin filter (tb filtered - tb)/dt 137 IF( l_trdtra ) THEN ! trends computation: trend of the Asselin filter (tb filtered - tb)/dt 140 138 DO jk = 1, jpkm1 141 139 zfact = 1.e0 / r2dt_t(jk) … … 176 174 !! - (ta,sa) time averaged (t,s) (ln_dynhpg_imp = T) 177 175 !!---------------------------------------------------------------------- 178 INTEGER, INTENT(in) :: kt 179 !! 180 INTEGER :: ji, jj, jk ! dummy loop indices181 REAL(wp) :: ztm, ztf 182 REAL(wp) :: zsm, zsf ! - -176 INTEGER, INTENT(in) :: kt ! ocean time-step index 177 !! 178 INTEGER :: ji, jj, jk ! dummy loop indices 179 REAL(wp) :: ztm, ztf, zac ! temporary scalars 180 REAL(wp) :: zsm, zsf ! - - 183 181 !!---------------------------------------------------------------------- 184 182 … … 225 223 sn(:,:,jk) = sa(:,:,jk) 226 224 END DO 227 ELSE ! general case (Leapfrog + Asselin filter 225 ELSE ! general case (Leapfrog + Asselin filter) 228 226 DO jk = 1, jpkm1 229 227 DO jj = 1, jpj … … 239 237 END DO 240 238 ENDIF 239 ENDIF 240 ! 241 !!gm from Matthieu : unchecked 242 IF( neuler /= 0 .OR. kt /= nit000 ) THEN ! remove the forcing from the Asselin filter 243 zac = atfp * rdttra(1) 244 tb(:,:,1) = tb(:,:,1) - zac * ( qns (:,:) - qns_b (:,:) ) ! non solar surface flux 245 sb(:,:,1) = sn(:,:,1) - zac * ( emps(:,:) - emps_b(:,:) ) ! surface salt flux 246 ! 247 IF( ln_traqsr ) ! solar penetrating flux 248 DO jk = 1, nksr 249 DO jj = 1, jpj 250 DO ji = 1, jpi 251 IF( ln_sco ) THEN 252 z_cor_qsr = etot3(ji,jj,jk) * ( qsr(ji,jj) - qsrb(ji,jj) ) 253 ELSEIF( ln_zps .OR. ln_zco ) THEN 254 z_cor_qsr = ( qsr(ji,jj) - qsrb(ji,jj) ) * & 255 & ( gdsr(jk) * tmask(ji,jj,jk) - gdsr(jk+1) * tmask(ji,jj,jk+1) ) 256 ENDIF 257 zt = zt - zfact1 * z_cor_qsr 258 END DO 259 END DO 241 260 ENDIF 242 261 ! … … 372 391 ENDIF 373 392 ENDIF 393 !!gm from Matthieu : unchecked 394 ! 395 IF( neuler /= 0 .OR. kt /= nit000 ) THEN ! remove the forcing from the Asselin filter 396 IF( lk_vvl ) THEN ! Varying levels 397 DO jj = 1, jpj 398 DO ji = 1, jpi 399 ! - ML - modification for varaiance diagnostics 400 zssh1 = tmask(ji,jj,jk) / ( fse3t(ji,jj,jk) + atfp * ( zfse3ta(ji,jj,jk) - 2*fse3t(ji,jj,jk) & 401 & + fse3tb(ji,jj,jk) ) ) 402 zt = zssh1 * ( tn(ji,jj,jk) + atfp * ( ta(ji,jj,jk) - 2 * tn(ji,jj,jk) + tb(ji,jj,jk) ) ) 403 zs = zssh1 * ( sn(ji,jj,jk) + atfp * ( sa(ji,jj,jk) - 2 * sn(ji,jj,jk) + sb(ji,jj,jk) ) ) 404 ! filter correction for global conservation 405 !------------------------------------------ 406 zfact1 = atfp * rdttra(1) * zssh1 407 IF (jk == 1) THEN ! remove sbc trend from time filter 408 zt = zt - zfact1 * ( qn(ji,jj) - qb(ji,jj) ) 409 !!??? zs = zs - zfact1 * ( - emp( ji,jj) + empb(ji,jj) ) * zsrau * 35.5e0 410 ENDIF 411 ! remove qsr trend from time filter 412 IF (jk <= nksr) THEN 413 IF( ln_sco ) THEN 414 z_cor_qsr = etot3(ji,jj,jk) * ( qsr(ji,jj) - qsrb(ji,jj) ) 415 ELSEIF( ln_zps .OR. ln_zco ) THEN 416 z_cor_qsr = ( qsr(ji,jj) - qsrb(ji,jj) ) * & 417 & ( gdsr(jk) * tmask(ji,jj,jk) - gdsr(jk+1) * tmask(ji,jj,jk+1) ) 418 ENDIF 419 zt = zt - zfact1 * z_cor_qsr 420 IF (jk == nksr) qsrb(ji,jj) = qsr(ji,jj) 421 ENDIF 422 ! - ML - end of modification 423 zssh1 = tmask(ji,jj,1) / zfse3ta(ji,jj,jk) 424 tn(ji,jj,jk) = ta(ji,jj,jk) * zssh1 425 sn(ji,jj,jk) = sa(ji,jj,jk) * zssh1 426 END DO 427 END DO 428 ENDIF 429 !!gm end 374 430 ! 375 431 END SUBROUTINE tra_nxt_vvl
Note: See TracChangeset
for help on using the changeset viewer.