Changeset 15450 for NEMO/trunk/src/TOP/PISCES/SED/sedinorg.F90
 Timestamp:
 20211027T16:32:08+02:00 (7 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

NEMO/trunk/src/TOP/PISCES/SED/sedinorg.F90
r12839 r15450 8 8 USE sed ! sediment global variable 9 9 USE sed_oce 10 USE sedmat ! linear system of equations11 USE sedco3 ! carbonate ion and proton concentration12 10 USE sedini 13 USE sed dsr11 USE sedmat 14 12 USE lib_mpp ! distribued memory computing library 15 13 USE lib_fortran … … 23 21 CONTAINS 24 22 25 SUBROUTINE sed_inorg( kt ) 23 SUBROUTINE sed_inorg( kt ) 26 24 !! 27 25 !! *** ROUTINE sed_inorg *** … … 46 44 !! 47 45 !! Arguments 48 INTEGER, INTENT(in) :: kt ! number of iteration46 INTEGER, INTENT(in) :: kt ! time step 49 47 !  local variables 50 INTEGER :: ji, jk, js, jw ! dummy looop indices 51 REAL(wp), DIMENSION(jpoce,jpksed) :: zrearat1, zrearat2 ! reaction rate in pore water 52 REAL(wp), DIMENSION(jpoce,jpksed) :: zundsat ! undersaturation ; indice jpwatp1 is for calcite 53 REAL(wp), DIMENSION(jpoce) :: zco3eq 54 REAL(wp), DIMENSION(jpoce,jpksed,jpsol) :: zvolc ! temp. variables 55 REAL(wp), DIMENSION(jpoce) :: zsieq 56 REAL(wp) :: zsolid1, zvolw, zreasat 57 REAL(wp) :: zsatur, zsatur2, znusil, zsolcpcl, zsolcpsi 48 INTEGER :: ji,jk ! dummy looop indices 49 REAL(wp), DIMENSION(jpoce) :: zsieq, reac_silf 50 REAL(wp) :: zsolid1, zreasat, zco3sat 51 REAL(wp) :: zsatur, zsatur2, znusil, zsolcpcl, zsolcpsi, zexcess 52 REAL(wp), DIMENSION(jpoce,jpksed) :: zundsat, zrearat, psms 58 53 !! 59 54 !! 60 55 61 56 IF( ln_timing ) CALL timing_start('sed_inorg') 57 58 IF( kt == nitsed000 ) THEN 59 IF (lwp) WRITE(numsed,*) ' sed_inorg : Dissolution of CaCO3 and BSi ' 60 IF (lwp) WRITE(numsed,*) ' ' 61 ENDIF 62 62 ! 63 IF( kt == nitsed000 ) THEN 64 IF (lwp) THEN 65 WRITE(numsed,*) ' sed_inorg : Dissolution reaction ' 66 WRITE(numsed,*) ' ' 67 ENDIF 68 ! ! 69 ENDIF 63 DO ji = 1, jpoce 64 !  65 ! Computation of Si solubility 66 ! Param of Ridgwell et al. 2002 67 !  70 68 71 ! Initializations72 !73 74 zrearat1(:,:) = 0. ; zundsat(:,:) = 0.75 zrearat2(:,:) = 0. ; zrearat2(:,:) = 0.76 zco3eq(:) = rtrn77 zvolc(:,:,:) = 0.78 79 ! 80 ! Computation of Si solubility81 ! Param of Ridgwell et al. 200282 ! 83 84 DO ji = 1, jpoce85 69 zsolcpcl = 0.0 86 70 zsolcpsi = 0.0 87 71 DO jk = 1, jpksed 88 zsolcpsi = zsolcpsi + solcp(ji,jk,jsopal) * dz(jk)89 zsolcpcl = zsolcpcl + solcp(ji,jk,jsclay) * dz(jk)72 zsolcpsi = zsolcpsi + solcp(ji,jk,jsopal) * vols3d(ji,jk) 73 zsolcpcl = zsolcpcl + solcp(ji,jk,jsclay) * vols3d(ji,jk) 90 74 END DO 91 75 zsolcpsi = MAX( zsolcpsi, rtrn ) 92 zsieq(ji) = sieqs(ji) * MAX(0.2 5, 1.0  (0.045 * zsolcpcl / zsolcpsi )**0.58 )93 zsieq(ji) = MAX( rtrn, sieqs(ji) )76 zsieq(ji) = sieqs(ji) * MAX(0.2, 1.0  (0.045 * zsolcpcl / zsolcpsi )**0.58 ) 77 reac_silf(ji) = reac_sil * ( 0.05 + 0.055 * ( 1.64 * ( zsolcpcl / zsolcpsi + 0.01 ) )**(0.75) ) / 1.25 94 78 END DO 95 79 96 DO js = 1, jpsol97 DO jk = 1, jpksed98 DO ji = 1, jpoce99 zvolc(ji,jk,js) = ( vols3d(ji,jk) * dens_mol_wgt(js) ) / &100 & ( volw3d(ji,jk) * 1.e3 )101 ENDDO102 ENDDO103 ENDDO104 105 !106 ! 5. Beginning of Pore Water diffusion and solid reaction107 !108 80 109 !110 ! For jk=2,jpksed, and for couple111 ! 1 : jwsil/jsopal ( SI/Opal )112 ! 2 : jsclay/jsclay ( clay/clay )113 ! 3 : jwoxy/jspoc ( O2/POC )114 ! reaction rate is a function of solid=concentration in solid reactif in [mol/l]115 ! and undersaturation in [mol/l].116 ! Solid weight fractions should be in ie [mol/l])117 ! second member and solution are in zundsat variable118 !119 120 DO jk = 1, jpksed121 DO ji = 1, jpoce122 ! For Silicic Acid and clay123 zundsat(ji,jk) = zsieq(ji)  pwcp(ji,jk,jwsil)124 ENDDO125 ENDDO126 127 ! Definition of reaction rates [rearat]=sans dim128 ! For jk=1 no reaction (pure water without solid) for each solid compo129 81 DO ji = 1, jpoce 130 zrearat1(ji,:) = 0. 131 zrearat2(ji,:) = 0. 132 ENDDO 133 134 ! left hand side of coefficient matrix 135 DO jk = 2, jpksed 136 DO ji = 1, jpoce 137 zsolid1 = zvolc(ji,jk,jsopal) * solcp(ji,jk,jsopal) 138 zsatur = MAX(0., zundsat(ji,jk) / zsieq(ji) ) 82 DO jk = 2, jpksed 83 zsolid1 = volc(ji,jk,jsopal) * solcp(ji,jk,jsopal) 84 zsatur = MAX(0., ( zsieq(ji)  pwcp(ji,jk,jwsil) ) / zsieq(ji) ) 139 85 zsatur2 = (1.0 + temp(ji) / 400.0 )**37 140 znusil = ( 0.225 * ( 1.0 + temp(ji) / 15.) + 0.775 * zsatur2 * zsatur**2.25 ) / zsieq(ji) 141 zrearat1(ji,jk) = ( reac_sil * znusil * dtsed * zsolid1 ) / & 142 & ( 1. + reac_sil * znusil * dtsed * zundsat(ji,jk) ) 143 ENDDO 144 ENDDO 145 146 CALL sed_mat( jwsil, jpoce, jpksed, zrearat1, zrearat2, zundsat, dtsed ) 147 148 ! New solid concentration values (jk=2 to jksed) for each couple 149 DO jk = 2, jpksed 150 DO ji = 1, jpoce 151 zreasat = zrearat1(ji,jk) * zundsat(ji,jk) / ( zvolc(ji,jk,jsopal) ) 152 solcp(ji,jk,jsopal) = solcp(ji,jk,jsopal)  zreasat 153 ENDDO 154 ENDDO 155 156 ! New pore water concentrations 157 DO jk = 1, jpksed 158 DO ji = 1, jpoce 159 ! Acid Silicic 160 pwcp(ji,jk,jwsil) = zsieq(ji)  zundsat(ji,jk) 161 ENDDO 162 ENDDO 86 znusil = ( 0.225 * ( 1.0 + temp(ji) / 15.) * zsatur + 0.775 * zsatur2 * zsatur**9.25 ) 87 solcp(ji,jk,jsopal) = solcp(ji,jk,jsopal)  reac_silf(ji) * znusil * dtsed * solcp(ji,jk,jsopal) 88 pwcp(ji,jk,jwsil) = pwcp(ji,jk,jwsil) + reac_silf(ji) * znusil * dtsed * zsolid1 89 END DO 90 END DO 163 91 164 92 ! … … 167 95 168 96 ! computes co3por from the updated pwcp concentrations (note [co3por] = mol/l) 169 170 CALL sed_co3( kt )171 172 97 ! *densSW(l)**2 converts aksps [mol2/kg sol2] into [mol2/l2] to get [undsat] in [mol/l] 173 DO jk = 1, jpksed 174 DO ji = 1, jpoce 175 zco3eq(ji) = aksps(ji) * densSW(ji) * densSW(ji) / ( calcon2(ji) + rtrn ) 176 zco3eq(ji) = MAX( rtrn, zco3eq(ji) ) 177 zundsat(ji,jk) = MAX(0., zco3eq(ji)  co3por(ji,jk) ) 178 ENDDO 179 ENDDO 180 181 DO jk = 2, jpksed 182 DO ji = 1, jpoce 183 zsolid1 = zvolc(ji,jk,jscal) * solcp(ji,jk,jscal) 184 zrearat1(ji,jk) = ( reac_cal * dtsed * zsolid1 / zco3eq(ji) ) / & 185 & ( 1. + reac_cal * dtsed * zundsat(ji,jk) / zco3eq(ji) ) 98 DO ji = 1, jpoce 99 zco3sat = aksps(ji) * densSW(ji) * densSW(ji) / ( calcon2(ji) + rtrn ) 100 saturco3(ji,:) = 1.0  co3por(ji,:) / ( rtrn + zco3sat ) 101 DO jk = 1, jpksed 102 zsolid1 = volc(ji,jk,jscal) * solcp(ji,jk,jscal) 103 zundsat(ji,jk) = MAX( 0., zco3sat  co3por(ji,jk) ) 104 zrearat(ji,jk) = ( reac_cal * zsolid1 / ( zco3sat + rtrn ) ) / & 105 & ( 1. + reac_cal * dtsed * zundsat(ji,jk) / ( zco3sat + rtrn ) ) 186 106 END DO 187 107 END DO 188 108 109 psms(:,:) = 0.0 189 110 ! solves tridiagonal system 190 CALL sed_mat ( jwdic, jpoce, jpksed, zrearat1, zrearat2, zundsat, dtsed)111 CALL sed_mat_dsri( jpksed, jwdic, zrearat(:,:), psms(:,:), dtsed, zundsat ) 191 112 192 113 ! New solid concentration values (jk=2 to jksed) for cacO3 193 114 DO jk = 2, jpksed 194 115 DO ji = 1, jpoce 195 zreasat = zrearat 1(ji,jk) * zundsat(ji,jk) / zvolc(ji,jk,jscal)116 zreasat = zrearat(ji,jk) * dtsed * zundsat(ji,jk) / ( volc(ji,jk,jscal) + rtrn ) 196 117 solcp(ji,jk,jscal) = solcp(ji,jk,jscal)  zreasat 118 zreasat = zrearat(ji,jk) * dtsed * zundsat(ji,jk) 119 ! For DIC 120 pwcp(ji,jk,jwdic) = pwcp(ji,jk,jwdic) + zreasat 121 ! For alkalinity 122 pwcp(ji,jk,jwalk) = pwcp(ji,jk,jwalk) + 2.* zreasat 197 123 ENDDO 198 124 ENDDO 199 125 200 ! New dissolved concentrations201 DO jk = 1, jpksed202 DO ji = 1, jpoce203 zreasat = zrearat1(ji,jk) * zundsat(ji,jk)204 ! For DIC205 pwcp(ji,jk,jwdic) = pwcp(ji,jk,jwdic) + zreasat206 ! For alkalinity207 pwcp(ji,jk,jwalk) = pwcp(ji,jk,jwalk) + 2.0 * zreasat208 ENDDO209 ENDDO210 211 !212 ! Beginning DIC, Alkalinity213 !214 215 DO jk = 1, jpksed216 DO ji = 1, jpoce217 zundsat(ji,jk) = pwcp(ji,jk,jwdic)218 zrearat1(ji,jk) = 0.219 ENDDO220 ENDDO221 222 ! solves tridiagonal system223 CALL sed_mat( jwdic, jpoce, jpksed, zrearat1, zrearat2, zundsat, dtsed )224 225 ! New dissolved concentrations226 DO jk = 1, jpksed227 DO ji = 1, jpoce228 pwcp(ji,jk,jwdic) = zundsat(ji,jk)229 ENDDO230 ENDDO231 232 !233 ! Beginning DIC, Alkalinity234 !235 236 DO jk = 1, jpksed237 DO ji = 1, jpoce238 zundsat(ji,jk) = pwcp(ji,jk,jwalk)239 zrearat1(ji,jk) = 0.240 ENDDO241 ENDDO242 !243 ! ! solves tridiagonal system244 CALL sed_mat( jwalk, jpoce, jpksed, zrearat1, zrearat2, zundsat, dtsed )245 !246 ! ! New dissolved concentrations247 DO jk = 1, jpksed248 DO ji = 1, jpoce249 pwcp(ji,jk,jwalk) = zundsat(ji,jk)250 ENDDO251 ENDDO252 253 !254 ! Back to initial geometry255 !256 257 !258 ! 1/ Compensation for ajustement of the bottom water concentrations259 ! (see note n° 1 about *por(2))260 !261 DO jw = 1, jpwat262 DO ji = 1, jpoce263 pwcp(ji,1,jw) = pwcp(ji,1,jw) + &264 & pwcp(ji,2,jw) * dzdep(ji) * por(2) / dzkbot(ji)265 END DO266 ENDDO267 268 !269 ! 2/ Det of new rainrg taking account of the new weight fraction obtained270 ! in dz3d(2) after diffusion/reaction (react/diffu are also in dzdep!)271 ! This new rain (rgntg rm) will be used in advection/burial routine272 !273 DO js = 1, jpsol274 DO ji = 1, jpoce275 rainrg(ji,js) = raintg(ji) * solcp(ji,2,js)276 rainrm(ji,js) = rainrg(ji,js) / mol_wgt(js)277 END DO278 ENDDO279 280 ! New raintg281 raintg(:) = 0.282 DO js = 1, jpsol283 DO ji = 1, jpoce284 raintg(ji) = raintg(ji) + rainrg(ji,js)285 END DO286 ENDDO287 288 !289 ! 3/ back to initial geometry290 !291 DO ji = 1, jpoce292 dz3d (ji,2) = dz(2)293 volw3d(ji,2) = dz3d(ji,2) * por(2)294 vols3d(ji,2) = dz3d(ji,2) * por1(2)295 ENDDO296 126 297 127 IF( ln_timing ) CALL timing_stop('sed_inorg')
Note: See TracChangeset
for help on using the changeset viewer.