- Timestamp:
- 2019-11-22T15:29:17+01:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r11943_MERGE_2019/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11943_MERGE_2019/src
- Property svn:mergeinfo deleted
-
NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/TRP/trcsbc.F90
r10788 r11949 37 37 CONTAINS 38 38 39 SUBROUTINE trc_sbc ( kt )39 SUBROUTINE trc_sbc ( kt, Kmm, ptr, Krhs ) 40 40 !!---------------------------------------------------------------------- 41 41 !! *** ROUTINE trc_sbc *** … … 49 49 !! The surface freshwater flux modify the ocean volume 50 50 !! and thus the concentration of a tracer as : 51 !! tr a = tra + emp * trn/ e3t for k=151 !! tr(Krhs) = tr(Krhs) + emp * tr(Kmm) / e3t for k=1 52 52 !! where emp, the surface freshwater budget (evaporation minus 53 53 !! precipitation ) given in kg/m2/s is divided 54 54 !! by 1035 kg/m3 (density of ocean water) to obtain m/s. 55 55 !! 56 !! ** Action : - Update the 1st level of tr awith the trend associated56 !! ** Action : - Update the 1st level of tr(:,:,:,:,Krhs) with the trend associated 57 57 !! with the tracer surface boundary condition 58 58 !! 59 59 !!---------------------------------------------------------------------- 60 INTEGER, INTENT(in) :: kt ! ocean time-step index 60 INTEGER, INTENT(in ) :: kt ! ocean time-step index 61 INTEGER, INTENT(in ) :: Kmm, Krhs ! time level indices 62 REAL(wp), DIMENSION(jpi,jpj,jpk,jptra,jpt), INTENT(inout) :: ptr ! passive tracers and RHS of tracer equation 61 63 ! 62 64 INTEGER :: ji, jj, jn ! dummy loop indices … … 82 84 IF( ln_rsttr .AND. .NOT.ln_top_euler .AND. & ! Restart: read in restart file 83 85 iom_varid( numrtr, 'sbc_'//TRIM(ctrcnm(1))//'_b', ldstop = .FALSE. ) > 0 ) THEN 84 IF(lwp) WRITE(numout,*) ' nittrc000- nn_dttrc surface tracer content forcing fields red in the restart file'86 IF(lwp) WRITE(numout,*) ' nittrc000-1 surface tracer content forcing fields read in the restart file' 85 87 zfact = 0.5_wp 86 88 DO jn = 1, jptra … … 102 104 ENDIF 103 105 104 ! Coupling online : river runoff is added to the horizontal divergence (hdiv n) in the subroutine sbc_rnf_div106 ! Coupling online : river runoff is added to the horizontal divergence (hdiv) in the subroutine sbc_rnf_div 105 107 ! one only consider the concentration/dilution effect due to evaporation minus precipitation + freezing/melting of sea-ice 106 108 ! Coupling offline : runoff are in emp which contains E-P-R … … 120 122 DO jj = 2, jpj 121 123 DO ji = fs_2, fs_jpim1 ! vector opt. 122 sbc_trc(ji,jj,jn) = zsfx(ji,jj) * r1_rau0 * trn(ji,jj,1,jn)124 sbc_trc(ji,jj,jn) = zsfx(ji,jj) * r1_rau0 * ptr(ji,jj,1,jn,Kmm) 123 125 END DO 124 126 END DO … … 130 132 DO jj = 2, jpj 131 133 DO ji = fs_2, fs_jpim1 ! vector opt. 132 sbc_trc(ji,jj,jn) = ( zsfx(ji,jj) + fmmflx(ji,jj) ) * r1_rau0 * trn(ji,jj,1,jn)134 sbc_trc(ji,jj,jn) = ( zsfx(ji,jj) + fmmflx(ji,jj) ) * r1_rau0 * ptr(ji,jj,1,jn,Kmm) 133 135 END DO 134 136 END DO … … 140 142 DO jj = 2, jpj 141 143 DO ji = fs_2, fs_jpim1 ! vector opt. 142 zse3t = 1. / e3t _n(ji,jj,1)144 zse3t = 1. / e3t(ji,jj,1,Kmm) 143 145 ! tracer flux at the ice/ocean interface (tracer/m2/s) 144 146 zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice … … 148 150 ztfx = zftra ! net tracer flux 149 151 ! 150 zdtra = r1_rau0 * ( ztfx + ( zsfx(ji,jj) + fmmflx(ji,jj) ) * trn(ji,jj,1,jn) )152 zdtra = r1_rau0 * ( ztfx + ( zsfx(ji,jj) + fmmflx(ji,jj) ) * ptr(ji,jj,1,jn,Kmm) ) 151 153 IF ( zdtra < 0. ) THEN 152 zdtra = MAX(zdtra, - trn(ji,jj,1,jn) * e3t_n(ji,jj,1) / r2dttrc ) ! avoid negative concentrations to arise154 zdtra = MAX(zdtra, -ptr(ji,jj,1,jn,Kmm) * e3t(ji,jj,1,Kmm) / r2dttrc ) ! avoid negative concentrations to arise 153 155 ENDIF 154 156 sbc_trc(ji,jj,jn) = zdtra … … 162 164 DO jn = 1, jptra 163 165 ! 164 IF( l_trdtrc ) ztrtrd(:,:,:) = tra(:,:,:,jn) ! save trends166 IF( l_trdtrc ) ztrtrd(:,:,:) = ptr(:,:,:,jn,Krhs) ! save trends 165 167 ! 166 168 DO jj = 2, jpj 167 169 DO ji = fs_2, fs_jpim1 ! vector opt. 168 zse3t = zfact / e3t _n(ji,jj,1)169 tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + ( sbc_trc_b(ji,jj,jn) + sbc_trc(ji,jj,jn) ) * zse3t170 zse3t = zfact / e3t(ji,jj,1,Kmm) 171 ptr(ji,jj,1,jn,Krhs) = ptr(ji,jj,1,jn,Krhs) + ( sbc_trc_b(ji,jj,jn) + sbc_trc(ji,jj,jn) ) * zse3t 170 172 END DO 171 173 END DO 172 174 ! 173 175 IF( l_trdtrc ) THEN 174 ztrtrd(:,:,:) = tra(:,:,:,jn) - ztrtrd(:,:,:)175 CALL trd_tra( kt, 'TRC', jn, jptra_nsr, ztrtrd )176 ztrtrd(:,:,:) = ptr(:,:,:,jn,Krhs) - ztrtrd(:,:,:) 177 CALL trd_tra( kt, Kmm, Krhs, 'TRC', jn, jptra_nsr, ztrtrd ) 176 178 END IF 177 179 ! ! =========== … … 193 195 IF( ln_ctl ) THEN 194 196 WRITE(charout, FMT="('sbc ')") ; CALL prt_ctl_trc_info(charout) 195 CALL prt_ctl_trc( tab4d= tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' )197 CALL prt_ctl_trc( tab4d=ptr(:,:,:,:,Krhs), mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 196 198 ENDIF 197 199 IF( l_trdtrc ) DEALLOCATE( ztrtrd ) … … 205 207 !! Dummy module : NO passive tracer 206 208 !!---------------------------------------------------------------------- 209 USE par_oce 210 USE par_trc 207 211 CONTAINS 208 SUBROUTINE trc_sbc (kt) ! Empty routine 209 INTEGER, INTENT(in) :: kt 212 SUBROUTINE trc_sbc ( kt, Kmm, ptr, Krhs ) ! Empty routine 213 INTEGER, INTENT(in ) :: kt ! ocean time-step index 214 INTEGER, INTENT(in ) :: Kmm, Krhs ! time level indices 215 REAL(wp), DIMENSION(jpi,jpj,jpk,jptra,jpt), INTENT(inout) :: ptr ! passive tracers and RHS of tracer equation 210 216 WRITE(*,*) 'trc_sbc: You should not have seen this print! error?', kt 211 217 END SUBROUTINE trc_sbc
Note: See TracChangeset
for help on using the changeset viewer.