Changeset 11822 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/TRP/trcsbc.F90
- Timestamp:
- 2019-10-29T11:41:36+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/TRP/trcsbc.F90
r11504 r11822 63 63 ! 64 64 INTEGER :: ji, jj, jn ! dummy loop indices 65 REAL(wp) :: zse3t, zrtrn, z ratio, zfact ! local scalars66 REAL(wp) :: zftra, z cd, zdtra, ztfx, ztra ! - -65 REAL(wp) :: zse3t, zrtrn, zfact ! local scalars 66 REAL(wp) :: zftra, zdtra, ztfx, ztra ! - - 67 67 CHARACTER (len=22) :: charout 68 68 REAL(wp), DIMENSION(jpi,jpj) :: zsfx … … 115 115 116 116 ! 0. initialization 117 IF( nn_ice_tr == -1 ) THEN ! No tracers in sea ice (null concentration in sea ice) 117 SELECT CASE ( nn_ice_tr ) 118 119 CASE ( -1 ) ! No tracers in sea ice (null concentration in sea ice) 118 120 ! 119 121 DO jn = 1, jptra … … 125 127 END DO 126 128 ! 127 ELSE 129 CASE ( 0 ) ! Same concentration in sea ice and in the ocean 130 ! 131 DO jn = 1, jptra 132 DO jj = 2, jpj 133 DO ji = fs_2, fs_jpim1 ! vector opt. 134 sbc_trc(ji,jj,jn) = ( zsfx(ji,jj) + fmmflx(ji,jj) ) * r1_rau0 * ptr(ji,jj,1,jn,Kmm) 135 END DO 136 END DO 137 END DO 138 ! 139 CASE ( 1 ) ! Specific treatment of sea ice fluxes with an imposed concentration in sea ice 128 140 ! 129 141 DO jn = 1, jptra … … 133 145 ! tracer flux at the ice/ocean interface (tracer/m2/s) 134 146 zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice 135 zcd = trc_o(ji,jj,jn) * fmmflx(ji,jj) ! concentration dilution due to freezing-melting,136 147 ! ! only used in the levitating sea ice case 137 148 ! tracer flux only : add concentration dilution term in net tracer flux, no F-M in volume flux 138 149 ! tracer and mass fluxes : no concentration dilution term in net tracer flux, F-M term in volume flux 139 ztfx = zftra 150 ztfx = zftra ! net tracer flux 140 151 ! 141 zdtra = r1_rau0 * ( ztfx + zsfx(ji,jj) * ptr(ji,jj,1,jn,Kmm) )152 zdtra = r1_rau0 * ( ztfx + ( zsfx(ji,jj) + fmmflx(ji,jj) ) * ptr(ji,jj,1,jn,Kmm) ) 142 153 IF ( zdtra < 0. ) THEN 143 zratio = -zdtra * zse3t * r2dttrc / ( ptr(ji,jj,1,jn,Kmm) + zrtrn ) 144 zdtra = MIN(1.0, zratio) * zdtra ! avoid negative concentrations to arise 154 zdtra = MAX(zdtra, -ptr(ji,jj,1,jn,Kmm) * e3t(ji,jj,1,Kmm) / r2dttrc ) ! avoid negative concentrations to arise 145 155 ENDIF 146 156 sbc_trc(ji,jj,jn) = zdtra … … 148 158 END DO 149 159 END DO 150 END IF160 END SELECT 151 161 ! 152 162 CALL lbc_lnk( 'trcsbc', sbc_trc(:,:,:), 'T', 1. )
Note: See TracChangeset
for help on using the changeset viewer.