- Timestamp:
- 2015-12-08T12:39:53+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/icebergs_restart_single_file/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
r6019 r6020 28 28 USE sbc_oce ! surface boundary condition: ocean 29 29 USE sbcrnf ! river runoffs 30 USE sbcisf ! ice shelf melting/freezing 30 31 USE zdf_oce ! ocean vertical mixing 31 32 USE domvvl ! variable volume 32 USE dynspg_oce ! surface pressure gradient variables33 USE dynhpg ! hydrostatic pressure gradient34 33 USE trd_oce ! trends: ocean variables 35 34 USE trdtra ! trends manager: tracers 36 35 USE traqsr ! penetrative solar radiation (needed for nksr) 37 36 USE phycst ! physical constant 38 USE ldftra_oce ! lateral physics on tracers 37 USE ldftra ! lateral physics on tracers 38 USE ldfslp 39 39 USE bdy_oce ! BDY open boundary condition variables 40 40 USE bdytra ! open boundary condition (bdy_tra routine) … … 46 46 USE timing ! Timing 47 47 #if defined key_agrif 48 USE agrif_opa_update49 48 USE agrif_opa_interp 50 49 #endif … … 57 56 PUBLIC tra_nxt_vvl ! to be used in trcnxt 58 57 59 REAL(wp) :: rbcp ! Brown & Campana parameters for semi-implicit hpg60 58 61 59 !! * Substitutions … … 89 87 !! 90 88 !! ** Action : - (tb,sb) and (tn,sn) ready for the next time step 91 !! - (ta,sa) time averaged (t,s) (ln_dynhpg_imp = T)89 !! 92 90 !!---------------------------------------------------------------------- 93 91 INTEGER, INTENT(in) :: kt ! ocean time-step index … … 104 102 IF(lwp) WRITE(numout,*) 'tra_nxt : achieve the time stepping by Asselin filter and array swap' 105 103 IF(lwp) WRITE(numout,*) '~~~~~~~' 106 !107 rbcp = 0.25_wp * (1._wp + atfp) * (1._wp + atfp) * ( 1._wp - atfp) ! Brown & Campana parameter for semi-implicit hpg108 104 ENDIF 109 105 110 106 ! Update after tracer on domain lateral boundaries 111 107 ! 108 ! 109 #if defined key_agrif 110 CALL Agrif_tra ! AGRIF zoom boundaries 111 #endif 112 ! 112 113 CALL lbc_lnk( tsa(:,:,:,jp_tem), 'T', 1._wp ) ! local domain boundaries (T-point, unchanged sign) 113 114 CALL lbc_lnk( tsa(:,:,:,jp_sal), 'T', 1._wp ) … … 115 116 #if defined key_bdy 116 117 IF( lk_bdy ) CALL bdy_tra( kt ) ! BDY open boundaries 117 #endif118 #if defined key_agrif119 CALL Agrif_tra ! AGRIF zoom boundaries120 118 #endif 121 119 … … 148 146 ELSE ; CALL tra_nxt_fix( kt, nit000, 'TRA', tsb, tsn, tsa, jpts ) ! fixed volume level 149 147 ENDIF 150 ENDIF 151 ! 152 #if defined key_agrif 153 ! Update tracer at AGRIF zoom boundaries 154 IF( .NOT.Agrif_Root() ) CALL Agrif_Update_Tra( kt ) ! children only 155 #endif 148 ENDIF 156 149 ! 157 150 ! trends computation … … 184 177 !! 185 178 !! ** Method : - Apply a Asselin time filter on now fields. 186 !! - save in (ta,sa) an average over the three time levels187 !! which will be used to compute rdn and thus the semi-implicit188 !! hydrostatic pressure gradient (ln_dynhpg_imp = T)189 179 !! - swap tracer fields to prepare the next time_step. 190 !! This can be summurized for tempearture as:191 !! ztm = tn + rbcp * [ta -2 tn + tb ] ln_dynhpg_imp = T192 !! ztm = 0 otherwise193 !! with rbcp=1/4 * (1-atfp^4) / (1-atfp)194 !! tb = tn + atfp*[ tb - 2 tn + ta ]195 !! tn = ta196 !! ta = ztm (NB: reset to 0 after eos_bn2 call)197 180 !! 198 181 !! ** Action : - (tb,sb) and (tn,sn) ready for the next time step 199 !! - (ta,sa) time averaged (t,s) (ln_dynhpg_imp = T)182 !! 200 183 !!---------------------------------------------------------------------- 201 184 INTEGER , INTENT(in ) :: kt ! ocean time-step index … … 208 191 ! 209 192 INTEGER :: ji, jj, jk, jn ! dummy loop indices 210 LOGICAL :: ll_tra_hpg ! local logical211 193 REAL(wp) :: ztn, ztd ! local scalars 212 194 !!---------------------------------------------------------------------- … … 218 200 ENDIF 219 201 ! 220 IF( cdtype == 'TRA' ) THEN ; ll_tra_hpg = ln_dynhpg_imp ! active tracers case and semi-implicit hpg221 ELSE ; ll_tra_hpg = .FALSE. ! passive tracers case or NO semi-implicit hpg222 ENDIF223 202 ! 224 203 DO jn = 1, kjpt … … 233 212 ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn) ! ptn <-- pta 234 213 ! 235 IF( ll_tra_hpg ) pta(ji,jj,jk,jn) = ztn + rbcp * ztd ! pta <-- Brown & Campana average236 214 END DO 237 215 END DO … … 251 229 !! 252 230 !! ** Method : - Apply a thickness weighted Asselin time filter on now fields. 253 !! - save in (ta,sa) a thickness weighted average over the three254 !! time levels which will be used to compute rdn and thus the semi-255 !! implicit hydrostatic pressure gradient (ln_dynhpg_imp = T)256 231 !! - swap tracer fields to prepare the next time_step. 257 232 !! This can be summurized for tempearture as: 258 !! ztm = ( e3t_n*tn + rbcp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] ) ln_dynhpg_imp = T259 !! /( e3t_n + rbcp*[ e3t_b - 2 e3t_n + e3t_a ] )260 !! ztm = 0 otherwise261 !! tb = ( e3t_n*tn + atfp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] )262 !! /( e3t_n + atfp*[ e3t_b - 2 e3t_n + e3t_a ] )263 !! tn = ta264 !! ta = zt (NB: reset to 0 after eos_bn2 call)265 233 !! 266 234 !! ** Action : - (tb,sb) and (tn,sn) ready for the next time step 267 !! - (ta,sa) time averaged (t,s) (ln_dynhpg_imp = T)235 !! 268 236 !!---------------------------------------------------------------------- 269 237 INTEGER , INTENT(in ) :: kt ! ocean time-step index … … 279 247 280 248 !! 281 LOGICAL :: ll_tra _hpg, ll_traqsr, ll_rnf ! local logical249 LOGICAL :: ll_traqsr, ll_rnf, ll_isf ! local logical 282 250 INTEGER :: ji, jj, jk, jn ! dummy loop indices 283 251 REAL(wp) :: zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d ! local scalar … … 292 260 ! 293 261 IF( cdtype == 'TRA' ) THEN 294 ll_tra_hpg = ln_dynhpg_imp ! active tracers case and semi-implicit hpg295 262 ll_traqsr = ln_traqsr ! active tracers case and solar penetration 296 263 ll_rnf = ln_rnf ! active tracers case and river runoffs 264 IF (nn_isf .GE. 1) THEN 265 ll_isf = .TRUE. ! active tracers case and ice shelf melting/freezing 266 ELSE 267 ll_isf = .FALSE. 268 END IF 297 269 ELSE 298 ll_tra_hpg = .FALSE. ! passive tracers case or NO semi-implicit hpg299 270 ll_traqsr = .FALSE. ! active tracers case and NO solar penetration 300 271 ll_rnf = .FALSE. ! passive tracers or NO river runoffs 272 ll_isf = .FALSE. ! passive tracers or NO ice shelf melting/freezing 301 273 ENDIF 302 274 ! … … 321 293 ztc_f = ztc_n + atfp * ztc_d 322 294 ! 323 IF( jk == 1 ) THEN ! first level 324 ze3t_f = ze3t_f - zfact2 * ( emp_b(ji,jj) - emp(ji,jj) + rnf(ji,jj) - rnf_b(ji,jj) ) 295 IF( jk == mikt(ji,jj) ) THEN ! first level 296 ze3t_f = ze3t_f - zfact2 * ( (emp_b(ji,jj) - emp(ji,jj) ) & 297 & - (rnf_b(ji,jj) - rnf(ji,jj) ) & 298 & + (fwfisf_b(ji,jj) - fwfisf(ji,jj)) ) 325 299 ztc_f = ztc_f - zfact1 * ( psbc_tc(ji,jj,jn) - psbc_tc_b(ji,jj,jn) ) 326 300 ENDIF 327 301 328 IF( ll_traqsr .AND. jn == jp_tem .AND. jk <= nksr ) & ! solar penetration (temperature only) 302 ! solar penetration (temperature only) 303 IF( ll_traqsr .AND. jn == jp_tem .AND. jk <= nksr ) & 329 304 & ztc_f = ztc_f - zfact1 * ( qsr_hc(ji,jj,jk) - qsr_hc_b(ji,jj,jk) ) 330 305 331 IF( ll_rnf .AND. jk <= nk_rnf(ji,jj) ) & ! river runoffs 306 ! river runoff 307 IF( ll_rnf .AND. jk <= nk_rnf(ji,jj) ) & 332 308 & ztc_f = ztc_f - zfact1 * ( rnf_tsc(ji,jj,jn) - rnf_tsc_b(ji,jj,jn) ) & 333 309 & * fse3t_n(ji,jj,jk) / h_rnf(ji,jj) 310 311 ! ice shelf 312 IF( ll_isf ) THEN 313 ! level fully include in the Losch_2008 ice shelf boundary layer 314 IF ( jk >= misfkt(ji,jj) .AND. jk < misfkb(ji,jj) ) & 315 ztc_f = ztc_f - zfact1 * ( risf_tsc(ji,jj,jn) - risf_tsc_b(ji,jj,jn) ) & 316 & * fse3t_n(ji,jj,jk) * r1_hisf_tbl (ji,jj) 317 ! level partially include in Losch_2008 ice shelf boundary layer 318 IF ( jk == misfkb(ji,jj) ) & 319 ztc_f = ztc_f - zfact1 * ( risf_tsc(ji,jj,jn) - risf_tsc_b(ji,jj,jn) ) & 320 & * fse3t_n(ji,jj,jk) * r1_hisf_tbl (ji,jj) * ralpha(ji,jj) 321 END IF 334 322 335 323 ze3t_f = 1.e0 / ze3t_f … … 337 325 ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn) ! ptn <-- pta 338 326 ! 339 IF( ll_tra_hpg ) THEN ! semi-implicit hpg (T & S only)340 ze3t_d = 1.e0 / ( ze3t_n + rbcp * ze3t_d )341 pta(ji,jj,jk,jn) = ze3t_d * ( ztc_n + rbcp * ztc_d ) ! ta <-- Brown & Campana average342 ENDIF343 327 END DO 344 328 END DO
Note: See TracChangeset
for help on using the changeset viewer.