Changeset 5373
- Timestamp:
- 2015-06-08T12:47:17+02:00 (9 years ago)
- Location:
- branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM/NEMO
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
r5336 r5373 143 143 ELSE ! Leap-Frog + Asselin filter time stepping 144 144 ! 145 IF( lk_vvl ) THEN ; CALL tra_nxt_vvl( kt, nit000, rdttra, 'TRA', tsb, tsn, tsa, jpts ) ! variable volume level (vvl) 145 IF( lk_vvl ) THEN ; CALL tra_nxt_vvl( kt, nit000, rdttra, 'TRA', tsb, tsn, tsa, & 146 & sbc_tsc, sbc_tsc_b, jpts ) ! variable volume level (vvl) 146 147 ELSE ; CALL tra_nxt_fix( kt, nit000, 'TRA', tsb, tsn, tsa, jpts ) ! fixed volume level 147 148 ENDIF … … 241 242 242 243 243 SUBROUTINE tra_nxt_vvl( kt, kit000, p2dt, cdtype, ptb, ptn, pta, kjpt )244 SUBROUTINE tra_nxt_vvl( kt, kit000, p2dt, cdtype, ptb, ptn, pta, psbc_tc, psbc_tc_b, kjpt ) 244 245 !!---------------------------------------------------------------------- 245 246 !! *** ROUTINE tra_nxt_vvl *** … … 265 266 !! - (ta,sa) time averaged (t,s) (ln_dynhpg_imp = T) 266 267 !!---------------------------------------------------------------------- 267 INTEGER , INTENT(in ) :: kt ! ocean time-step index 268 INTEGER , INTENT(in ) :: kit000 ! first time step index 269 REAL(wp) , INTENT(in ), DIMENSION(jpk) :: p2dt ! time-step 270 CHARACTER(len=3), INTENT(in ) :: cdtype ! =TRA or TRC (tracer indicator) 271 INTEGER , INTENT(in ) :: kjpt ! number of tracers 272 REAL(wp) , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt) :: ptb ! before tracer fields 273 REAL(wp) , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt) :: ptn ! now tracer fields 274 REAL(wp) , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt) :: pta ! tracer trend 268 INTEGER , INTENT(in ) :: kt ! ocean time-step index 269 INTEGER , INTENT(in ) :: kit000 ! first time step index 270 REAL(wp) , INTENT(in ), DIMENSION(jpk) :: p2dt ! time-step 271 CHARACTER(len=3), INTENT(in ) :: cdtype ! =TRA or TRC (tracer indicator) 272 INTEGER , INTENT(in ) :: kjpt ! number of tracers 273 REAL(wp) , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt) :: ptb ! before tracer fields 274 REAL(wp) , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt) :: ptn ! now tracer fields 275 REAL(wp) , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt) :: pta ! tracer trend 276 REAL(wp) , INTENT(in ), DIMENSION(jpi,jpj,kjpt) :: psbc_tc ! surface tracer content 277 REAL(wp) , INTENT(in ), DIMENSION(jpi,jpj,kjpt) :: psbc_tc_b ! before surface tracer content 278 275 279 !! 276 LOGICAL :: ll_tra , ll_tra_hpg, ll_traqsr ! local logical280 LOGICAL :: ll_tra_hpg, ll_traqsr ! local logical 277 281 INTEGER :: ji, jj, jk, jn ! dummy loop indices 278 282 REAL(wp) :: zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d ! local scalar … … 287 291 ! 288 292 IF( cdtype == 'TRA' ) THEN 289 ll_tra = .TRUE. ! active tracers case290 293 ll_tra_hpg = ln_dynhpg_imp ! active tracers case and semi-implicit hpg 291 294 ll_traqsr = ln_traqsr ! active tracers case and solar penetration 292 295 ELSE 293 ll_tra = .FALSE. ! passive tracers case294 296 ll_tra_hpg = .FALSE. ! passive tracers case or NO semi-implicit hpg 295 297 ll_traqsr = .FALSE. ! active tracers case and NO solar penetration … … 317 319 ! 318 320 IF( jk == 1 ) THEN ! first level 319 320 IF( ll_tra ) ztc_f = ztc_f - zfact1 * ( sbc_tsc(ji,jj,jn) - sbc_tsc_b(ji,jj,jn) )321 ze3t_f = ze3t_f - zfact2 * ( emp_b(ji,jj) - emp(ji,jj) ) 322 ztc_f = ztc_f - zfact1 * ( psbc_tc(ji,jj,jn) - psbc_tc_b(ji,jj,jn) ) 321 323 ENDIF 322 324 IF( ll_traqsr .AND. jn == jp_tem .AND. jk <= nksr ) & ! solar penetration (temperature only) -
branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90
r5345 r5373 137 137 ELSE 138 138 ! Leap-Frog + Asselin filter time stepping 139 IF( lk_vvl ) THEN ; CALL tra_nxt_vvl( kt, nittrc000, rdttrc, 'TRC', trb, trn, tra, jptra ) ! variable volume level (vvl) 139 IF( lk_vvl ) THEN ; CALL tra_nxt_vvl( kt, nittrc000, rdttrc, 'TRC', trb, trn, tra, & 140 & sbc_trc, sbc_trc_b, jptra ) ! variable volume level (vvl) 140 141 ELSE ; CALL tra_nxt_fix( kt, nittrc000, 'TRC', trb, trn, tra, jptra ) ! fixed volume level 141 142 ENDIF -
branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
r5367 r5373 19 19 USE trc ! ocean passive tracers variables 20 20 USE prtctl_trc ! Print control for debbuging 21 USE iom 21 22 USE trd_oce 22 23 USE trdtra … … 63 64 ! 64 65 INTEGER :: ji, jj, jn ! dummy loop indices 65 REAL(wp) :: zse3t, zrtrn, zratio 66 REAL(wp) :: zse3t, zrtrn, zratio, zfact ! temporary scalars 66 67 REAL(wp) :: zswitch, zftra, zcd, zdtra, ztfx, ztra ! temporary scalars 67 68 CHARACTER (len=22) :: charout … … 100 101 IF(lwp) WRITE(numout,*) 'trc_sbc : Passive tracers surface boundary condition' 101 102 IF(lwp) WRITE(numout,*) '~~~~~~~ ' 103 104 IF( ln_rsttr .AND. & ! Restart: read in restart file 105 iom_varid( numrtr, 'sbc_trc_b', ldstop = .FALSE. ) > 0 ) THEN 106 IF(lwp) WRITE(numout,*) ' nittrc000-nn_dttrc surface tracer content forcing fields red in the restart file' 107 zfact = 0.5_wp 108 DO jn = 1, jptra 109 CALL iom_get( numror, jpdom_autoglo, 'sbc_trc_b', sbc_trc_b(:,:,jn) ) ! before tracer content sbc 110 END DO 111 ELSE ! No restart or restart not found: Euler forward time stepping 112 zfact = 1._wp 113 sbc_trc_b(:,:,:) = 0._wp 114 ENDIF 115 ELSE ! Swap of forcing fields 116 IF( ln_top_euler ) THEN 117 zfact = 1._wp 118 sbc_trc_b(:,:,:) = 0._wp 119 ELSE 120 zfact = 0.5_wp 121 sbc_trc_b(:,:,:) = sbc_trc(:,:,:) 122 ENDIF 123 ! 102 124 ENDIF 103 125 … … 122 144 DO jj = 2, jpj 123 145 DO ji = fs_2, fs_jpim1 ! vector opt. 124 zse3t = 1. / fse3t(ji,jj,1) 125 tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + zsfx(ji,jj) * r1_rau0 * trn(ji,jj,1,jn) * zse3t 146 sbc_trc(ji,jj,jn) = zsfx(ji,jj) * r1_rau0 * trn(ji,jj,1,jn) 126 147 END DO 127 148 END DO … … 131 152 DO jj = 2, jpj 132 153 DO ji = fs_2, fs_jpim1 ! vector opt. 133 134 154 zse3t = 1. / fse3t(ji,jj,1) 135 136 155 ! tracer flux at the ice/ocean interface (tracer/m2/s) 137 156 zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice … … 142 161 ztfx = zftra + zswitch * zcd ! net tracer flux (+C/D if no ice/ocean mass exchange) 143 162 144 zdtra = r1_rau0 * ( ztfx + zsfx(ji,jj) * trn(ji,jj,1,jn) ) * zse3t163 zdtra = r1_rau0 * ( ztfx + zsfx(ji,jj) * trn(ji,jj,1,jn) ) 145 164 IF ( zdtra < 0. ) THEN 146 zratio = -zdtra * r2dt / ( trn(ji,jj,1,jn) + zrtrn )165 zratio = -zdtra * zse3t * r2dt / ( trn(ji,jj,1,jn) + zrtrn ) 147 166 zdtra = MIN(1.0, zratio) * zdtra ! avoid negative concentrations to arise 148 167 ENDIF 149 150 tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + zdtra 151 168 sbc_trc(ji,jj,jn) = zdtra 152 169 END DO 153 170 END DO 154 155 ENDIF 156 171 ENDIF 172 ! Concentration dilution effect on tracers due to evaporation & precipitation 173 DO jj = 2, jpj 174 DO ji = fs_2, fs_jpim1 ! vector opt. 175 zse3t = zfact / fse3t(ji,jj,1) 176 tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + ( sbc_trc_b(ji,jj,jn) + sbc_trc(ji,jj,jn) ) * zse3t 177 END DO 178 END DO 179 ! 157 180 IF( l_trdtrc ) THEN 158 181 ztrtrd(:,:,:) = tra(:,:,:,jn) - ztrtrd(:,:,:) … … 162 185 END DO ! tracer loop 163 186 ! ! =========== 187 188 ! Write in the tracer restar file 189 ! ******************************* 190 IF( lrst_trc ) THEN 191 IF(lwp) WRITE(numout,*) 192 IF(lwp) WRITE(numout,*) 'sbc : ocean surface tracer content forcing fields written in tracer restart file ', & 193 & 'at it= ', kt,' date= ', ndastp 194 IF(lwp) WRITE(numout,*) '~~~~' 195 DO jn = 1, jptra 196 CALL iom_rstput( kt, nitrst, numrtw, 'sbc_trc_b', sbc_trc_b(:,:,jn) ) 197 END DO 198 ENDIF 199 ! 164 200 IF( ln_ctl ) THEN 165 201 WRITE(charout, FMT="('sbc ')") ; CALL prt_ctl_trc_info(charout) -
branches/2015/dev_r5204_CNRS_PISCES_dcy/NEMOGCM/NEMO/TOP_SRC/trc.F90
r5368 r5373 37 37 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: tra !: tracer concentration for next time step 38 38 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: trb !: tracer concentration for before time step 39 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) :: sbc_trc_b !: Before sbc fluxes for tracers 40 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) :: sbc_trc !: Now sbc fluxes for tracers 41 39 42 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) :: trc_i !: prescribed tracer concentration in sea ice for SBC 40 43 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) :: trc_o !: prescribed tracer concentration in ocean for SBC … … 205 208 & gtru (jpi,jpj,jptra) , gtrv (jpi,jpj,jptra) , & 206 209 & gtrui(jpi,jpj,jptra) , gtrvi(jpi,jpj,jptra) , & 210 & sbc_trc_b(jpi,jpj,jptra), sbc_trc(jpi,jpj,jptra) , & 207 211 & cvol(jpi,jpj,jpk) , rdttrc(jpk) , trai(jptra) , & 208 212 & ctrcnm(jptra) , ctrcln(jptra) , ctrcun(jptra) , &
Note: See TracChangeset
for help on using the changeset viewer.