- Timestamp:
- 2020-05-14T21:46:00+02:00 (4 years ago)
- Location:
- NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser
- Property svn:externals
-
old new 6 6 ^/vendors/FCM@HEAD ext/FCM 7 7 ^/vendors/IOIPSL@HEAD ext/IOIPSL 8 9 # SETTE 10 ^/utils/CI/sette@HEAD sette
-
- Property svn:externals
-
NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser/src/TOP/TRP/trcsbc.F90
r10788 r12928 29 29 30 30 !! * Substitutions 31 # include " vectopt_loop_substitute.h90"31 # include "do_loop_substitute.h90" 32 32 !!---------------------------------------------------------------------- 33 33 !! NEMO/TOP 4.0 , NEMO Consortium (2018) … … 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 … … 118 120 ! 119 121 DO jn = 1, jptra 120 DO jj = 2, jpj 121 DO ji = fs_2, fs_jpim1 ! vector opt. 122 sbc_trc(ji,jj,jn) = zsfx(ji,jj) * r1_rau0 * trn(ji,jj,1,jn) 123 END DO 124 END DO 122 DO_2D_01_00 123 sbc_trc(ji,jj,jn) = zsfx(ji,jj) * r1_rho0 * ptr(ji,jj,1,jn,Kmm) 124 END_2D 125 125 END DO 126 126 ! … … 128 128 ! 129 129 DO jn = 1, jptra 130 DO jj = 2, jpj 131 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) 133 END DO 134 END DO 130 DO_2D_01_00 131 sbc_trc(ji,jj,jn) = ( zsfx(ji,jj) + fmmflx(ji,jj) ) * r1_rho0 * ptr(ji,jj,1,jn,Kmm) 132 END_2D 135 133 END DO 136 134 ! … … 138 136 ! 139 137 DO jn = 1, jptra 140 DO jj = 2, jpj 141 DO ji = fs_2, fs_jpim1 ! vector opt. 142 zse3t = 1. / e3t_n(ji,jj,1) 143 ! tracer flux at the ice/ocean interface (tracer/m2/s) 144 zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice 145 ! ! only used in the levitating sea ice case 146 ! tracer flux only : add concentration dilution term in net tracer flux, no F-M in volume flux 147 ! tracer and mass fluxes : no concentration dilution term in net tracer flux, F-M term in volume flux 148 ztfx = zftra ! net tracer flux 149 ! 150 zdtra = r1_rau0 * ( ztfx + ( zsfx(ji,jj) + fmmflx(ji,jj) ) * trn(ji,jj,1,jn) ) 151 IF ( zdtra < 0. ) THEN 152 zdtra = MAX(zdtra, -trn(ji,jj,1,jn) * e3t_n(ji,jj,1) / r2dttrc ) ! avoid negative concentrations to arise 153 ENDIF 154 sbc_trc(ji,jj,jn) = zdtra 155 END DO 156 END DO 138 DO_2D_01_00 139 zse3t = 1. / e3t(ji,jj,1,Kmm) 140 ! tracer flux at the ice/ocean interface (tracer/m2/s) 141 zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice 142 ! ! only used in the levitating sea ice case 143 ! tracer flux only : add concentration dilution term in net tracer flux, no F-M in volume flux 144 ! tracer and mass fluxes : no concentration dilution term in net tracer flux, F-M term in volume flux 145 ztfx = zftra ! net tracer flux 146 ! 147 zdtra = r1_rho0 * ( ztfx + ( zsfx(ji,jj) + fmmflx(ji,jj) ) * ptr(ji,jj,1,jn,Kmm) ) 148 IF ( zdtra < 0. ) THEN 149 zdtra = MAX(zdtra, -ptr(ji,jj,1,jn,Kmm) * e3t(ji,jj,1,Kmm) / rDt_trc ) ! avoid negative concentrations to arise 150 ENDIF 151 sbc_trc(ji,jj,jn) = zdtra 152 END_2D 157 153 END DO 158 154 END SELECT … … 162 158 DO jn = 1, jptra 163 159 ! 164 IF( l_trdtrc ) ztrtrd(:,:,:) = tra(:,:,:,jn) ! save trends 165 ! 166 DO jj = 2, jpj 167 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) ) * zse3t 170 END DO 171 END DO 160 IF( l_trdtrc ) ztrtrd(:,:,:) = ptr(:,:,:,jn,Krhs) ! save trends 161 ! 162 DO_2D_01_00 163 zse3t = zfact / e3t(ji,jj,1,Kmm) 164 ptr(ji,jj,1,jn,Krhs) = ptr(ji,jj,1,jn,Krhs) + ( sbc_trc_b(ji,jj,jn) + sbc_trc(ji,jj,jn) ) * zse3t 165 END_2D 172 166 ! 173 167 IF( l_trdtrc ) THEN 174 ztrtrd(:,:,:) = tra(:,:,:,jn) - ztrtrd(:,:,:)175 CALL trd_tra( kt, 'TRC', jn, jptra_nsr, ztrtrd )168 ztrtrd(:,:,:) = ptr(:,:,:,jn,Krhs) - ztrtrd(:,:,:) 169 CALL trd_tra( kt, Kmm, Krhs, 'TRC', jn, jptra_nsr, ztrtrd ) 176 170 END IF 177 171 ! ! =========== … … 191 185 ENDIF 192 186 ! 193 IF( ln_ctl) THEN187 IF( sn_cfctl%l_prttrc ) THEN 194 188 WRITE(charout, FMT="('sbc ')") ; CALL prt_ctl_trc_info(charout) 195 CALL prt_ctl_trc( tab4d= tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' )189 CALL prt_ctl_trc( tab4d=ptr(:,:,:,:,Krhs), mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 196 190 ENDIF 197 191 IF( l_trdtrc ) DEALLOCATE( ztrtrd ) … … 205 199 !! Dummy module : NO passive tracer 206 200 !!---------------------------------------------------------------------- 201 USE par_oce 202 USE par_trc 207 203 CONTAINS 208 SUBROUTINE trc_sbc (kt) ! Empty routine 209 INTEGER, INTENT(in) :: kt 204 SUBROUTINE trc_sbc ( kt, Kmm, ptr, Krhs ) ! Empty routine 205 INTEGER, INTENT(in ) :: kt ! ocean time-step index 206 INTEGER, INTENT(in ) :: Kmm, Krhs ! time level indices 207 REAL(wp), DIMENSION(jpi,jpj,jpk,jptra,jpt), INTENT(inout) :: ptr ! passive tracers and RHS of tracer equation 210 208 WRITE(*,*) 'trc_sbc: You should not have seen this print! error?', kt 211 209 END SUBROUTINE trc_sbc
Note: See TracChangeset
for help on using the changeset viewer.