Changeset 3536 for LMDZ6/trunk/libf
- Timestamp:
- Jun 13, 2019, 7:19:07 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/StratAer/nucleation_tstep_mod.F90
r3534 r3536 6 6 CONTAINS 7 7 8 SUBROUTINE nucleation_rate(rhoa,t_seri,pplay,rh,a_xm,b_xm,c_xm,nucl_rate,ntot ,x)8 SUBROUTINE nucleation_rate(rhoa,t_seri,pplay,rh,a_xm,b_xm,c_xm,nucl_rate,ntot_n,x_n) 9 9 10 10 USE aerophys 11 11 USE infotrac 12 USE YOMCST, ONLY : RPI, RD, R KBOL12 USE YOMCST, ONLY : RPI, RD, RMD, RKBOL, RNAVO 13 13 14 14 IMPLICIT NONE 15 15 16 ! input variable 16 ! input variables 17 17 LOGICAL, PARAMETER :: flag_new_nucl=.TRUE. 18 REAL rhoa !H2SO4 number density [molecules/cm3]19 REAL t_seri 20 REAL pplay 21 REAL rh 18 REAL rhoa ! H2SO4 number density [molecules/cm3] 19 REAL t_seri ! temperature (K) 20 REAL pplay ! pressure (Pa) 21 REAL rh ! relative humidity (between 0 and 1) 22 22 REAL a_xm, b_xm, c_xm 23 23 24 ! output variable 24 ! output variables 25 25 REAL nucl_rate 26 REAL ntot ! total number of molecules in the critical cluster 27 REAL x ! mole fraction of H2SO4 in the critical cluster 28 29 ! local variable 30 REAL :: jnuc !nucleation rate in 1/cm3s (10^-7-10^10 1/cm3s) 31 REAL :: rc !radius of the critical cluster in nm 26 REAL ntot_n ! total number of molecules in the critical cluster for neutral nucleation 27 REAL x_n ! mole fraction of H2SO4 in the critical cluster for neutral nucleation 28 29 ! local variables 30 REAL jnuc_n ! nucleation rate in 1/cm3s (10^-7-10^10 1/cm3s) for neutral nucleation 31 REAL rc_n ! radius of the critical cluster in nm for neutral nucleation 32 REAL na_n ! sulfuric acid molecules in the neutral critical cluster (NOT IN USE) 33 LOGICAL kinetic_n ! true if kinetic neutral nucleation (NOT IN USE) 34 LOGICAL kinetic_i ! true if kinetic ion-induced nucleation (NOT IN USE) 35 REAL rhoatres ! threshold concentration of H2SO4 (1/cm^3) for neutral kinetic nucleation (NOT IN USE) 32 36 REAL VH2SO4mol 37 REAL ntot_i, x_i, jnuc_i, rc_i, na_i, n_i ! quantities for charged nucleation (NOT IN USE) 38 REAL csi ! Ion condensation sink (s-1) NOT IN USE 39 REAL airn ! Air molecule concentration in (cm-3) NOT IN USE 40 REAL ipr ! Ion pair production rate (cm-3 s-1) NOT IN USE 33 41 34 42 ! call nucleation routine 35 ! IF (.NOT.flag_new_nucl) THEN 36 CALL binapara(t_seri,rh,rhoa,jnuc,x,ntot,rc) 37 ! ELSE 38 ! CALL newbinapara(t_seri,rh,rhoa,jnuc,x,ntot,rc) 39 ! ENDIF 40 41 IF (ntot < 4.0) THEN 42 !set jnuc to collision rate of two H2SO4 molecules (following personal communication of Ulrike Niemeier and Hanna Vehkamäki) 43 VH2SO4mol=mH2SO4mol/(1.E-3*(a_xm+t_seri*(b_xm+t_seri*c_xm))) !cm3 44 jnuc = rhoa**2. *(3./4.*RPI)**(1./6.) *(12.*RKBOL*t_seri/mH2SO4mol)**0.5 & 45 & *100.*(2.*VH2SO4mol**(1./3.))**2. !1/(cm3s) 46 ntot=2.0 47 x=1.0 48 ENDIF 49 50 ! convert jnuc from particles/cm3/s to kg(H2SO4)/kgA/s 51 nucl_rate=jnuc*ntot*x*mH2SO4mol/(pplay/t_seri/RD/1.E6) 43 IF (.NOT.flag_new_nucl) THEN 44 ! Use older routine from Hanna Vehkamäki (FMI) 45 CALL binapara(t_seri,rh,rhoa,jnuc_n,x_n,ntot_n,rc_n) 46 ! when total number of molecules is too small 47 ! then set jnuc_n to collision rate of two H2SO4 molecules (following personal communication of Ulrike Niemeier and Hanna Vehkamäki) 48 IF (ntot_n < 4.0) THEN 49 VH2SO4mol=mH2SO4mol/(1.E-3*(a_xm+t_seri*(b_xm+t_seri*c_xm))) !cm3 50 jnuc_n = rhoa**2. *(3./4.*RPI)**(1./6.) *(12.*RKBOL*t_seri/mH2SO4mol)**0.5 & 51 & *100.*(2.*VH2SO4mol**(1./3.))**2. !1/(cm3s) 52 ntot_n=2.0 53 x_n=1.0 54 ENDIF 55 ELSE 56 ! Use new routine from Anni Maattanen (LATMOS) 57 csi=0.0 ! no charged nucleation for now 58 ipr=-1.0 ! dummy value to make sure charged nucleation does not occur 59 airn=0.0 ! NOT IN USE 60 ! airn=pplay/t_seri/RD/1.E3*RNAVO/RMD ! molec cm-3 (for future use, to be confirmed) 61 CALL newbinapara(t_seri,rh,rhoa,csi,airn,ipr,jnuc_n,ntot_n,jnuc_i,ntot_i, & 62 & x_n,x_i,na_n,na_i,rc_n,rc_i,n_i,kinetic_n,kinetic_i,rhoatres) 63 ENDIF 64 65 ! convert jnuc_n from particles/cm3/s to kg(H2SO4)/kgA/s 66 nucl_rate=jnuc_n*ntot_n*x_n*mH2SO4mol/(pplay/t_seri/RD/1.E6) 52 67 53 68 END SUBROUTINE nucleation_rate … … 155 170 156 171 IF (t < 190.15) THEN 157 ! print *,'Warning (ilon=',ilon,'il at=',ilat,'): temperature < 190.15 K, using 190.15 K (T=',t,'K)'172 ! print *,'Warning (ilon=',ilon,'ilev=',ilev,'): temperature < 190.15 K, using 190.15 K (T=',t,'K)' 158 173 t=190.15 159 174 ENDIF 160 175 161 176 IF (t > 300.15) THEN 162 ! print *,'Warning (ilon=',ilon,'il at=',ilat,'): temperature > 300.15 K, using 300.15 K'177 ! print *,'Warning (ilon=',ilon,'ilev=',ilev,'): temperature > 300.15 K, using 300.15 K' 163 178 t=300.15 164 179 ENDIF 165 180 166 181 IF (rh < 0.0001) THEN 167 ! print *,'Warning (ilon=',ilon,'il at=',ilat,'): saturation ratio of water < 0.0001, using 0.0001'182 ! print *,'Warning (ilon=',ilon,'ilev=',ilev,'): saturation ratio of water < 0.0001, using 0.0001' 168 183 rh=0.0001 169 184 ENDIF 170 185 171 186 IF (rh > 1.0) THEN 172 ! print *,'Warning (ilon=',ilon,'il at=',ilat,'): saturation ratio of water > 1 using 1'187 ! print *,'Warning (ilon=',ilon,'ilev=',ilev,'): saturation ratio of water > 1 using 1' 173 188 ! print *, 'rh=',rh 174 189 rh=1.0 … … 176 191 177 192 IF (rhoa < 1.e4) THEN 178 ! print *,'Warning (ilon=',ilon,'il at=',ilat,'): sulfuric acid concentration < 1e4 1/cm3, using 1e4 1/cm3'193 ! print *,'Warning (ilon=',ilon,'ilev=',ilev,'): sulfuric acid concentration < 1e4 1/cm3, using 1e4 1/cm3' 179 194 rhoa=1.e4 180 195 ENDIF 181 196 182 197 IF (rhoa > 1.e11) THEN 183 ! print *,'Warning (ilon=',ilon,'il at=',ilat,'): sulfuric acid concentration > 1e11 1/cm3, using 1e11 1/cm3'198 ! print *,'Warning (ilon=',ilon,'ilev=',ilev,'): sulfuric acid concentration > 1e11 1/cm3, using 1e11 1/cm3' 184 199 rhoa=1.e11 185 200 ENDIF … … 266 281 267 282 IF (jnuc < 1.E-7) THEN 268 ! print *,'Warning (ilon=',ilon,'il at=',ilat'): nucleation rate < 1E-7/cm3s, using 0.0/cm3s,'283 ! print *,'Warning (ilon=',ilon,'ilev=',ilev'): nucleation rate < 1E-7/cm3s, using 0.0/cm3s,' 269 284 jnuc=0.0 270 285 ENDIF 271 286 272 287 IF (jnuc > 1.e10) THEN 273 ! print *,'Warning (ilon=',ilon,'il at=',ilat, &288 ! print *,'Warning (ilon=',ilon,'ilev=',ilev, & 274 289 ! & '): nucleation rate > 1e10/cm3s, using 1e10/cm3s' 275 290 jnuc=1.e10 … … 288 303 !--------------------------------------------------------------------------------------------------- 289 304 290 SUBROUTINE newbinapara(t,satrat,rhoa,csi,airn,ipr,jnuc_n,ntot_n,jnuc_i,ntot_i, & 291 & x_n,x_i,na_n,na_i,rc_n,rc_i,n_i,kinetic_n,kinetic_i,rhoatres) 305 SUBROUTINE newbinapara(t,satrat,rhoa,csi,airn,ipr,jnuc_n_real,ntot_n_real,jnuc_i_real,ntot_i_real, & 306 & x_n_real,x_i_real,na_n_real,na_i_real,rc_n_real,rc_i_real,n_i_real, & 307 & kinetic_n,kinetic_i,rhoatres_real) 292 308 293 309 ! Fortran 90 subroutine newbinapara … … 330 346 331 347 !Global intent in 332 DOUBLE PRECISION,INTENT(IN) :: t ! temperature in K333 DOUBLE PRECISION,INTENT(IN) :: satrat ! saturatio ratio of water (between zero and 1)334 DOUBLE PRECISION,INTENT(IN) :: rhoa ! sulfuric acid concentration in 1/cm3335 DOUBLE PRECISION,INTENT(IN) :: csi ! Ion condensation sink (s-1)336 DOUBLE PRECISION,INTENT(IN) :: airn ! Air molecule concentration in (cm-3)337 DOUBLE PRECISION,INTENT(IN) :: ipr ! Ion pair production rate (cm-3 s-1)348 REAL,INTENT(IN) :: t ! temperature in K 349 REAL,INTENT(IN) :: satrat ! saturatio ratio of water (between zero and 1) 350 REAL,INTENT(IN) :: rhoa ! sulfuric acid concentration in 1/cm3 351 REAL,INTENT(IN) :: csi ! Ion condensation sink (s-1) 352 REAL,INTENT(IN) :: airn ! Air molecule concentration in (cm-3) 353 REAL,INTENT(IN) :: ipr ! Ion pair production rate (cm-3 s-1) 338 354 !Global intent out 339 DOUBLE PRECISION,INTENT(OUT) :: jnuc_n! Neutral nucleation rate in 1/cm3s (J>10^-7 1/cm3s)340 DOUBLE PRECISION,INTENT(OUT) :: ntot_n! total number of molecules in the neutral critical cluster341 DOUBLE PRECISION,INTENT(OUT) :: jnuc_i! Charged nucleation rate in 1/cm3s (J>10^-7 1/cm3s)342 DOUBLE PRECISION,INTENT(OUT) :: ntot_i! total number of molecules in the charged critical cluster343 DOUBLE PRECISION,INTENT(OUT) :: x_n! mole fraction of H2SO4 in the neutral critical cluster344 DOUBLE PRECISION,INTENT(OUT) :: x_i! mole fraction of H2SO4 in the charged critical cluster355 REAL,INTENT(OUT) :: jnuc_n_real ! Neutral nucleation rate in 1/cm3s (J>10^-7 1/cm3s) 356 REAL,INTENT(OUT) :: ntot_n_real ! total number of molecules in the neutral critical cluster 357 REAL,INTENT(OUT) :: jnuc_i_real ! Charged nucleation rate in 1/cm3s (J>10^-7 1/cm3s) 358 REAL,INTENT(OUT) :: ntot_i_real ! total number of molecules in the charged critical cluster 359 REAL,INTENT(OUT) :: x_n_real ! mole fraction of H2SO4 in the neutral critical cluster 360 REAL,INTENT(OUT) :: x_i_real ! mole fraction of H2SO4 in the charged critical cluster 345 361 ! (note that x_n=x_i in nucleation regime) 346 DOUBLE PRECISION,INTENT(OUT) :: na_n ! sulfuric acid molecules in the neutral critical cluster 347 DOUBLE PRECISION,INTENT(OUT) :: na_i ! sulfuric molecules in the charged critical cluster 348 DOUBLE PRECISION,INTENT(OUT) :: rc_n ! radius of the charged critical cluster in nm 349 DOUBLE PRECISION,INTENT(OUT) :: rc_i ! radius of the charged critical cluster in nm 350 DOUBLE PRECISION,INTENT(OUT) :: n_i ! number of ion pairs in air (cm-3) 362 REAL,INTENT(OUT) :: na_n_real ! sulfuric acid molecules in the neutral critical cluster 363 REAL,INTENT(OUT) :: na_i_real ! sulfuric molecules in the charged critical cluster 364 REAL,INTENT(OUT) :: rc_n_real ! radius of the charged critical cluster in nm 365 REAL,INTENT(OUT) :: rc_i_real ! radius of the charged critical cluster in nm 366 REAL,INTENT(OUT) :: n_i_real ! number of ion pairs in air (cm-3) 367 REAL,INTENT(OUT) :: rhoatres_real ! threshold concentration of H2SO4 (1/cm^3) for neutral kinetic nucleation 351 368 LOGICAL,INTENT(OUT) :: kinetic_n ! true if kinetic neutral nucleation 352 369 LOGICAL,INTENT(OUT) :: kinetic_i ! true if kinetic ion-induced nucleation 353 DOUBLE PRECISION,INTENT(OUT) :: rhoatres ! threshold concentration of H2SO4 (1/cm^3) for neutral kinetic nucleation354 370 355 371 ! Local 372 DOUBLE PRECISION :: jnuc_n ! Neutral nucleation rate in 1/cm3s (J>10^-7 1/cm3s) 373 DOUBLE PRECISION :: ntot_n ! total number of molecules in the neutral critical cluster 374 DOUBLE PRECISION :: jnuc_i ! Charged nucleation rate in 1/cm3s (J>10^-7 1/cm3s) 375 DOUBLE PRECISION :: ntot_i ! total number of molecules in the charged critical cluster 376 DOUBLE PRECISION :: x_n ! mole fraction of H2SO4 in the neutral critical cluster 377 DOUBLE PRECISION :: x_i ! mole fraction of H2SO4 in the charged critical cluster 378 ! (note that x_n=x_i in nucleation regime) 379 DOUBLE PRECISION :: na_n ! sulfuric acid molecules in the neutral critical cluster 380 DOUBLE PRECISION :: na_i ! sulfuric molecules in the charged critical cluster 381 DOUBLE PRECISION :: rc_n ! radius of the charged critical cluster in nm 382 DOUBLE PRECISION :: rc_i ! radius of the charged critical cluster in nm 383 DOUBLE PRECISION :: n_i ! number of ion pairs in air (cm-3) 384 DOUBLE PRECISION :: rhoatres ! threshold concentration of H2SO4 (1/cm^3) for neutral kinetic nucleation 356 385 DOUBLE PRECISION :: x ! mole fraction of H2SO4 in the critical cluster 357 386 DOUBLE PRECISION :: satratln ! bounded water saturation ratio for neutral case (between 5.E-6 - 1.0) … … 812 841 813 842 ENDIF 843 844 !--conversion from double precision to float in case the model is run in single precision 845 jnuc_n_real = jnuc_n 846 ntot_n_real = ntot_n 847 jnuc_i_real = jnuc_i 848 ntot_i_real = ntot_i 849 x_n_real = x_n 850 x_i_real = x_i 851 na_n_real = na_n 852 na_i_real = na_i 853 rc_n_real = rc_n 854 rc_i_real = rc_i 855 n_i_real = n_i 856 rhoatres_real = rhoatres 814 857 815 858 END SUBROUTINE newbinapara
Note: See TracChangeset
for help on using the changeset viewer.