- Timestamp:
- 2020-09-14T17:40:34+02:00 (4 years ago)
- Location:
- NEMO/branches/2019/dev_r11351_fldread_with_XIOS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11351_fldread_with_XIOS
- Property svn:externals
-
old new 3 3 ^/utils/build/mk@HEAD mk 4 4 ^/utils/tools@HEAD tools 5 ^/vendors/AGRIF/dev @HEADext/AGRIF5 ^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS ext/AGRIF 6 6 ^/vendors/FCM@HEAD ext/FCM 7 7 ^/vendors/IOIPSL@HEAD ext/IOIPSL 8 9 # SETTE 10 ^/utils/CI/sette@13382 sette
-
- Property svn:externals
-
NEMO/branches/2019/dev_r11351_fldread_with_XIOS/src/TOP/TRP/trcsbc.F90
r10788 r13463 18 18 USE oce_trc ! ocean dynamics and active tracers variables 19 19 USE trc ! ocean passive tracers variables 20 USE prtctl _trc! Print control for debbuging20 USE prtctl ! Print control for debbuging 21 21 USE iom 22 22 USE trd_oce … … 29 29 30 30 !! * Substitutions 31 # include "vectopt_loop_substitute.h90" 31 # include "do_loop_substitute.h90" 32 # include "domzgr_substitute.h90" 32 33 !!---------------------------------------------------------------------- 33 34 !! NEMO/TOP 4.0 , NEMO Consortium (2018) … … 37 38 CONTAINS 38 39 39 SUBROUTINE trc_sbc ( kt )40 SUBROUTINE trc_sbc ( kt, Kmm, ptr, Krhs ) 40 41 !!---------------------------------------------------------------------- 41 42 !! *** ROUTINE trc_sbc *** … … 49 50 !! The surface freshwater flux modify the ocean volume 50 51 !! and thus the concentration of a tracer as : 51 !! tr a = tra + emp * trn / e3tfor k=152 !! tr(Krhs) = tr(Krhs) + emp * tr(Kmm) / e3t_ for k=1 52 53 !! where emp, the surface freshwater budget (evaporation minus 53 54 !! precipitation ) given in kg/m2/s is divided 54 55 !! by 1035 kg/m3 (density of ocean water) to obtain m/s. 55 56 !! 56 !! ** Action : - Update the 1st level of tr awith the trend associated57 !! ** Action : - Update the 1st level of tr(:,:,:,:,Krhs) with the trend associated 57 58 !! with the tracer surface boundary condition 58 59 !! 59 60 !!---------------------------------------------------------------------- 60 INTEGER, INTENT(in) :: kt ! ocean time-step index 61 INTEGER, INTENT(in ) :: kt ! ocean time-step index 62 INTEGER, INTENT(in ) :: Kmm, Krhs ! time level indices 63 REAL(wp), DIMENSION(jpi,jpj,jpk,jptra,jpt), INTENT(inout) :: ptr ! passive tracers and RHS of tracer equation 61 64 ! 62 65 INTEGER :: ji, jj, jn ! dummy loop indices … … 82 85 IF( ln_rsttr .AND. .NOT.ln_top_euler .AND. & ! Restart: read in restart file 83 86 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'87 IF(lwp) WRITE(numout,*) ' nittrc000-1 surface tracer content forcing fields read in the restart file' 85 88 zfact = 0.5_wp 86 89 DO jn = 1, jptra 87 CALL iom_get( numrtr, jpdom_auto glo, 'sbc_'//TRIM(ctrcnm(jn))//'_b', sbc_trc_b(:,:,jn) ) ! before tracer content sbc90 CALL iom_get( numrtr, jpdom_auto, 'sbc_'//TRIM(ctrcnm(jn))//'_b', sbc_trc_b(:,:,jn) ) ! before tracer content sbc 88 91 END DO 89 92 ELSE ! No restart or restart not found: Euler forward time stepping … … 102 105 ENDIF 103 106 104 ! Coupling online : river runoff is added to the horizontal divergence (hdiv n) in the subroutine sbc_rnf_div107 ! Coupling online : river runoff is added to the horizontal divergence (hdiv) in the subroutine sbc_rnf_div 105 108 ! one only consider the concentration/dilution effect due to evaporation minus precipitation + freezing/melting of sea-ice 106 109 ! Coupling offline : runoff are in emp which contains E-P-R … … 118 121 ! 119 122 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 123 DO_2D( 0, 1, 0, 0 ) 124 sbc_trc(ji,jj,jn) = zsfx(ji,jj) * r1_rho0 * ptr(ji,jj,1,jn,Kmm) 125 END_2D 125 126 END DO 126 127 ! … … 128 129 ! 129 130 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 131 DO_2D( 0, 1, 0, 0 ) 132 sbc_trc(ji,jj,jn) = ( zsfx(ji,jj) + fmmflx(ji,jj) ) * r1_rho0 * ptr(ji,jj,1,jn,Kmm) 133 END_2D 135 134 END DO 136 135 ! … … 138 137 ! 139 138 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 139 DO_2D( 0, 1, 0, 0 ) 140 zse3t = 1. / e3t(ji,jj,1,Kmm) 141 ! tracer flux at the ice/ocean interface (tracer/m2/s) 142 zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice 143 ! ! only used in the levitating sea ice case 144 ! tracer flux only : add concentration dilution term in net tracer flux, no F-M in volume flux 145 ! tracer and mass fluxes : no concentration dilution term in net tracer flux, F-M term in volume flux 146 ztfx = zftra ! net tracer flux 147 ! 148 zdtra = r1_rho0 * ( ztfx + ( zsfx(ji,jj) + fmmflx(ji,jj) ) * ptr(ji,jj,1,jn,Kmm) ) 149 IF ( zdtra < 0. ) THEN 150 zdtra = MAX(zdtra, -ptr(ji,jj,1,jn,Kmm) * e3t(ji,jj,1,Kmm) / rDt_trc ) ! avoid negative concentrations to arise 151 ENDIF 152 sbc_trc(ji,jj,jn) = zdtra 153 END_2D 157 154 END DO 158 155 END SELECT 159 156 ! 160 CALL lbc_lnk( 'trcsbc', sbc_trc(:,:,:), 'T', 1. )157 CALL lbc_lnk( 'trcsbc', sbc_trc(:,:,:), 'T', 1.0_wp ) 161 158 ! Concentration dilution effect on tracers due to evaporation & precipitation 162 159 DO jn = 1, jptra 163 160 ! 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 161 IF( l_trdtrc ) ztrtrd(:,:,:) = ptr(:,:,:,jn,Krhs) ! save trends 162 ! 163 DO_2D( 0, 1, 0, 0 ) 164 zse3t = zfact / e3t(ji,jj,1,Kmm) 165 ptr(ji,jj,1,jn,Krhs) = ptr(ji,jj,1,jn,Krhs) + ( sbc_trc_b(ji,jj,jn) + sbc_trc(ji,jj,jn) ) * zse3t 166 END_2D 172 167 ! 173 168 IF( l_trdtrc ) THEN 174 ztrtrd(:,:,:) = tra(:,:,:,jn) - ztrtrd(:,:,:)175 CALL trd_tra( kt, 'TRC', jn, jptra_nsr, ztrtrd )169 ztrtrd(:,:,:) = ptr(:,:,:,jn,Krhs) - ztrtrd(:,:,:) 170 CALL trd_tra( kt, Kmm, Krhs, 'TRC', jn, jptra_nsr, ztrtrd ) 176 171 END IF 177 172 ! ! =========== … … 191 186 ENDIF 192 187 ! 193 IF( ln_ctl) THEN194 WRITE(charout, FMT="('sbc ')") ; CALL prt_ctl_ trc_info(charout)195 CALL prt_ctl _trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' )188 IF( sn_cfctl%l_prttrc ) THEN 189 WRITE(charout, FMT="('sbc ')") ; CALL prt_ctl_info( charout, cdcomp = 'top' ) 190 CALL prt_ctl( tab4d_1=ptr(:,:,:,:,Krhs), mask1=tmask, clinfo=ctrcnm, clinfo3='trd' ) 196 191 ENDIF 197 192 IF( l_trdtrc ) DEALLOCATE( ztrtrd ) … … 205 200 !! Dummy module : NO passive tracer 206 201 !!---------------------------------------------------------------------- 202 USE par_oce 203 USE par_trc 207 204 CONTAINS 208 SUBROUTINE trc_sbc (kt) ! Empty routine 209 INTEGER, INTENT(in) :: kt 205 SUBROUTINE trc_sbc ( kt, Kmm, ptr, Krhs ) ! Empty routine 206 INTEGER, INTENT(in ) :: kt ! ocean time-step index 207 INTEGER, INTENT(in ) :: Kmm, Krhs ! time level indices 208 REAL(wp), DIMENSION(jpi,jpj,jpk,jptra,jpt), INTENT(inout) :: ptr ! passive tracers and RHS of tracer equation 210 209 WRITE(*,*) 'trc_sbc: You should not have seen this print! error?', kt 211 210 END SUBROUTINE trc_sbc
Note: See TracChangeset
for help on using the changeset viewer.