- Timestamp:
- 2016-09-23T11:57:08+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90
r6287 r6943 31 31 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sio3eq ! chemistry of Si 32 32 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: fekeq ! chemistry of Fe 33 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,: ):: chemc ! Solubilities of O2 and CO233 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: chemc ! Solubilities of O2 and CO2 34 34 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: chemo2 ! Solubilities of O2 and CO2 35 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tempis ! In situ temperature 35 36 36 37 REAL(wp), PUBLIC :: atcox = 0.20946 ! units atm … … 39 40 REAL(wp) :: o2atm = 1. / ( 1000. * 0.20946 ) 40 41 41 REAL(wp) :: akcc1 = -171.9065 ! coeff. for apparent solubility equilibrium 42 REAL(wp) :: akcc2 = -0.077993 ! Millero et al. 1995 from Mucci 1983 43 REAL(wp) :: akcc3 = 2839.319 44 REAL(wp) :: akcc4 = 71.595 45 REAL(wp) :: akcc5 = -0.77712 46 REAL(wp) :: akcc6 = 0.00284263 47 REAL(wp) :: akcc7 = 178.34 48 REAL(wp) :: akcc8 = -0.07711 49 REAL(wp) :: akcc9 = 0.0041249 50 51 REAL(wp) :: rgas = 83.143 ! universal gas constants 42 REAL(wp) :: rgas = 83.14472 ! universal gas constants 52 43 REAL(wp) :: oxyco = 1. / 22.4144 ! converts from liters of an ideal gas to moles 53 44 54 45 REAL(wp) :: bor1 = 0.00023 ! borat constants 55 46 REAL(wp) :: bor2 = 1. / 10.82 56 57 REAL(wp) :: ca0 = -162.8301 ! WEISS & PRICE 1980, units mol/(kg atm)58 REAL(wp) :: ca1 = 218.296859 REAL(wp) :: ca2 = 90.924160 REAL(wp) :: ca3 = -1.4769661 REAL(wp) :: ca4 = 0.02569562 REAL(wp) :: ca5 = -0.02522563 REAL(wp) :: ca6 = 0.004986764 65 REAL(wp) :: c10 = -3670.7 ! Coeff. for 1. dissoc. of carbonic acid (Edmond and Gieskes, 1970)66 REAL(wp) :: c11 = 62.00867 REAL(wp) :: c12 = -9.794468 REAL(wp) :: c13 = 0.011869 REAL(wp) :: c14 = -0.00011670 71 REAL(wp) :: c20 = -1394.7 ! coeff. for 2. dissoc. of carbonic acid (Millero, 1995)72 REAL(wp) :: c21 = -4.77773 REAL(wp) :: c22 = 0.018474 REAL(wp) :: c23 = -0.00011875 47 76 48 REAL(wp) :: st1 = 0.14 ! constants for calculate concentrations for sulfate … … 146 118 REAL(wp) :: ztgg , ztgg2, ztgg3 , ztgg4 , ztgg5 147 119 REAL(wp) :: zpres, ztc , zcl , zcpexp, zoxy , zcpexp2 148 REAL(wp) :: zsqrt, ztr , zlogt , zcek1 149 REAL(wp) :: zis , zis2 , zsal15, zisqrt 120 REAL(wp) :: zsqrt, ztr , zlogt , zcek1, zc1, zplat 121 REAL(wp) :: zis , zis2 , zsal15, zisqrt, za1 , za2 150 122 REAL(wp) :: zckb , zck1 , zck2 , zckw , zak1 , zak2 , zakb , zaksp0, zakw 151 123 REAL(wp) :: zst , zft , zcks , zckf , zaksp1 … … 154 126 IF( nn_timing == 1 ) CALL timing_start('p4z_che') 155 127 ! 128 ! Computations of chemical constants require in situ temperature 129 ! Here a quite simple formulation is used to convert 130 ! potential temperature to in situ temperature. The errors is less than 131 ! 0.04°C relative to an exact computation 132 ! --------------------------------------------------------------------- 133 DO jk = 1, jpk 134 DO jj = 1, jpj 135 DO ji = 1, jpi 136 zpres = fsdept(ji,jj,jk) / 1000. 137 za1 = 0.04 * ( 1.0 + 0.185 * tsn(ji,jj,jk,jp_tem) + 0.035 * (tsn(ji,jj,jk,jp_sal) - 35.0) ) 138 za2 = 0.0075 * ( 1.0 - tsn(ji,jj,jk,jp_tem) / 30.0 ) 139 tempis(ji,jj,jk) = tsn(ji,jj,jk,jp_tem) - za1 * zpres + za2 * zpres**2 140 END DO 141 END DO 142 END DO 143 ! 156 144 ! CHEMICAL CONSTANTS - SURFACE LAYER 157 145 ! ---------------------------------- … … 161 149 DO ji = 1, jpi 162 150 ! ! SET ABSOLUTE TEMPERATURE 163 ztkel = t sn(ji,jj,1,jp_tem) + 273.15151 ztkel = tempis(ji,jj,1) + 273.15 164 152 zt = ztkel * 0.01 165 153 zt2 = zt * zt … … 169 157 ! ! LN(K0) OF SOLUBILITY OF CO2 (EQ. 12, WEISS, 1980) 170 158 ! ! AND FOR THE ATMOSPHERE FOR NON IDEAL GAS 171 zcek1 = ca0 + ca1 / zt + ca2 * zlogt + ca3 * zt2 + zsal * ( ca4 + ca5 * zt + ca6 * zt2 ) 159 zcek1 = 9345.17/ztkel - 60.2409 + 23.3585 * LOG(zt) + zsal*(0.023517 - 0.00023656*ztkel & 160 & + 0.0047036e-4*ztkel**2) 172 161 ! ! SET SOLUBILITIES OF O2 AND CO2 173 chemc(ji,jj) = EXP( zcek1 ) * 1.e-6 * rhop(ji,jj,1) / 1000. ! mol/(L uatm) 162 chemc(ji,jj,1) = EXP( zcek1 ) * 1.e-6 * rhop(ji,jj,1) / 1000. ! mol/(kg uatm) 163 chemc(ji,jj,2) = -1636.75 + 12.0408*ztkel - 0.0327957*ztkel**2 + 0.0000316528*ztkel**3 164 chemc(ji,jj,3) = 57.7 - 0.118*ztkel 174 165 ! 175 166 END DO … … 184 175 !CDIR NOVERRCHK 185 176 DO ji = 1, jpi 186 ztkel = t sn(ji,jj,jk,jp_tem) + 273.15177 ztkel = tempis(ji,jj,jk) + 273.15 187 178 zsal = tsn(ji,jj,jk,jp_sal) + ( 1.- tmask(ji,jj,jk) ) * 35. 188 179 zsal2 = zsal * zsal 189 ztgg = LOG( ( 298.15 - t sn(ji,jj,jk,jp_tem) ) / ztkel ) ! Set the GORDON & GARCIA scaled temperature180 ztgg = LOG( ( 298.15 - tempis(ji,jj,jk) ) / ztkel ) ! Set the GORDON & GARCIA scaled temperature 190 181 ztgg2 = ztgg * ztgg 191 182 ztgg3 = ztgg2 * ztgg … … 210 201 DO ji = 1, jpi 211 202 212 ! SET PRESSION 213 zpres = 1.025e-1 * fsdept(ji,jj,jk) 203 ! SET PRESSION ACCORDING TO SAUNDER (1980) 204 zplat = SIN ( ABS(gphit(ji,jj)*3.141592654/180.) ) 205 zc1 = 5.92E-3 + zplat**2 * 5.25E-3 206 zpres = ((1-zc1)-SQRT(((1-zc1)**2)-(8.84E-6*fsdept(ji,jj,jk)))) / 4.42E-6 207 zpres = zpres / 10.0 214 208 215 209 ! SET ABSOLUTE TEMPERATURE 216 ztkel = t sn(ji,jj,jk,jp_tem) + 273.15210 ztkel = tempis(ji,jj,jk) + 273.15 217 211 zsal = tsn(ji,jj,jk,jp_sal) + ( 1.-tmask(ji,jj,jk) ) * 35. 218 212 zsqrt = SQRT( zsal ) … … 223 217 zis2 = zis * zis 224 218 zisqrt = SQRT( zis ) 225 ztc = t sn(ji,jj,jk,jp_tem) + ( 1.- tmask(ji,jj,jk) ) * 20.219 ztc = tempis(ji,jj,jk) + ( 1.- tmask(ji,jj,jk) ) * 20. 226 220 227 221 ! CHLORINITY (WOOSTER ET AL., 1969) … … 256 250 257 251 258 zck1 = c10 * ztr + c11 + c12 * zlogt + c13 * zsal + c14 * zsal * zsal 259 zck2 = c20 * ztr + c21 + c22 * zsal + c23 * zsal**2 252 ! DISSOCIATION COEFFICIENT FOR CARBONATE ACCORDING TO 253 ! MEHRBACH (1973) REFIT BY MILLERO (1995), seawater scale 254 zck1 = -1.0*(3633.86*ztr - 61.2172 + 9.6777*zlogt & 255 - 0.011555*zsal + 0.0001152*zsal*zsal) 256 zck2 = -1.0*(471.78*ztr + 25.9290 - 3.16967*zlogt & 257 - 0.01781*zsal + 0.0001122*zsal*zsal) 260 258 261 259 ! PKW (H2O) (DICKSON AND RILEY, 1979) … … 266 264 ! APPARENT SOLUBILITY PRODUCT K'SP OF CALCITE IN SEAWATER 267 265 ! (S=27-43, T=2-25 DEG C) at pres =0 (atmos. pressure) (MUCCI 1983) 268 zaksp0 = akcc1 + akcc2 * ztkel + akcc3 * ztr + akcc4 * LOG10( ztkel ) & 269 & + ( akcc5 + akcc6 * ztkel + akcc7 * ztr ) * zsqrt + akcc8 * zsal + akcc9 * zsal15 266 zaksp0 = -171.9065 -0.077993*ztkel + 2839.319*ztr + 71.595*LOG10( ztkel ) & 267 & + (-0.77712 + 0.00284263*ztkel + 178.34*ztr) * zsqrt & 268 & - 0.07711*zsal + 0.0041249*zsal15 270 269 271 270 ! K1, K2 OF CARBONIC ACID, KB OF BORIC ACID, KW (H2O) (LIT.?) … … 337 336 !! *** ROUTINE p4z_che_alloc *** 338 337 !!---------------------------------------------------------------------- 339 ALLOCATE( sio3eq(jpi,jpj,jpk), fekeq(jpi,jpj,jpk), chemc(jpi,jpj ), chemo2(jpi,jpj,jpk), &340 & STAT=p4z_che_alloc )338 ALLOCATE( sio3eq(jpi,jpj,jpk), fekeq(jpi,jpj,jpk), chemc(jpi,jpj,3), chemo2(jpi,jpj,jpk), & 339 & tempis(jpi,jpj,jpk), STAT=p4z_che_alloc ) 341 340 ! 342 341 IF( p4z_che_alloc /= 0 ) CALL ctl_warn('p4z_che_alloc : failed to allocate arrays.')
Note: See TracChangeset
for help on using the changeset viewer.