******************************************************* * * subroutine nucleaCO2(pco2,temp,sat,n_ccn,nucrate, & n_ccn_h2oice,rad_h2oice,nucrate_h2oice, & vo2co2) USE comcstfi_h implicit none * * * This subroutine computes the nucleation rate * * as given in Pruppacher & Klett (1978) in the * * case of water ice forming on a solid substrate. * * Definition refined by Keese (jgr,1989) * * Authors: F. Montmessin * * Adapted for the LMD/GCM by J.-B. Madeleine * * (October 2011) * * Optimisation by A. Spiga (February 2012) * ******************************************************* ! nucrate = output ! nucrate_h2o en sortie aussi : !nucleation sur dust et h2o separement ici !#include "tracer.h" #include "microphys.h" c#include "microphysCO2.h" c Inputs DOUBLE PRECISION pco2,sat,vo2co2 DOUBLE PRECISION n_ccn(nbinco2_cld), n_ccn_h2oice(nbinco2_cld) REAL temp c Output ! DOUBLE PRECISION nucrate(nbinco2_cld) DOUBLE PRECISION nucrate(nbinco2_cld) DOUBLE PRECISION nucrate_h2oice(nbinco2_cld) ! h2o as substrate double precision rad_h2oice(nbinco2_cld) ! h2o ice grid (as substrate) c Local variables DOUBLE PRECISION nco2 c DOUBLE PRECISION sigco2 ! Water-ice/air surface tension (N.m) c external sigco2 DOUBLE PRECISION rstar ! Radius of the critical germ (m) DOUBLE PRECISION gstar ! # of molecules forming a critical embryo DOUBLE PRECISION fistar ! Activation energy required to form a critical embryo (J) ! DOUBLE PRECISION zeldov ! Zeldovitch factor (no dim) DOUBLE PRECISION fshapeco2 ! function defined at the end of the file DOUBLE PRECISION deltaf c Ratio rstar/radius of the nucleating dust particle c double precision xratio double precision mtetalocal,mtetalocalh ! local mteta in double precision double precision fshapeco2simple,zefshapeco2 integer i LOGICAL firstcall DATA firstcall/.true./ SAVE firstcall c ************************************************* mtetalocal = dble(mtetaco2) !! use mtetalocal for better performance mtetalocalh=dble(mteta) if (sat .gt. 1.) then ! minimum condition to activate nucleation nco2 = pco2 / kbz / temp rstar = 2. * sigco2 * vo2co2 / (kbz*temp*dlog(sat)) gstar = 4. * pi * (rstar * rstar * rstar) / (3.*vo2co2) fshapeco2simple = (2.+mtetalocal)*(1.-mtetalocal)*(1.-mtetalocal) & / 4. c Loop over size bins do 200 i=1,nbinco2_cld c write(*,*) "IN NUCLEA, i, RAD_CLDCO2(i) = ",i, rad_cldco2(i), c & n_ccn(i) if ( n_ccn(i) .lt. 1e-10 ) then c no dust, no need to compute nucleation! nucrate(i)=0. goto 210 endif if (rad_cldco2(i).gt.3000.*rstar) then zefshapeco2 = fshapeco2simple else zefshapeco2 = fshapeco2(mtetalocal,rad_cldco2(i)/rstar) endif fistar = (4./3.*pi) * sigco2 * (rstar * rstar) * & zefshapeco2 deltaf = (2.*desorpco2-surfdifco2-fistar)/ & (kbz*temp) deltaf = min( max(deltaf, -100.d0), 100.d0) if (deltaf.eq.-100.) then nucrate(i) = 0. else nucrate(i)= dble(sqrt ( fistar / & (3.*pi*kbz*temp*(gstar*gstar)) ) & * kbz * temp * rstar & * rstar * 4. * pi & * ( nco2*rad_cldco2(i) ) & * ( nco2*rad_cldco2(i) ) & / ( zefshapeco2 * nusco2 * m0co2 ) & * dexp (deltaf)) endif 210 continue if ( n_ccn_h2oice(i) .lt. 1e-10 ) then c no dust, no need to compute nucleation! nucrate_h2oice(i)=0. goto 200 endif if (rad_h2oice(i).gt.3000.*rstar) then zefshapeco2 = (2.+mtetalocalh)*(1.-mtetalocalh)* & (1.-mtetalocalh) / 4. else zefshapeco2 = fshapeco2(mtetalocalh,rad_h2oice(i)/rstar) ! same m for dust/h2o ice endif fistar = (4./3.*pi) * sigco2 * (rstar * rstar) * & zefshapeco2 deltaf = (2.*desorpco2-surfdifco2-fistar)/ & (kbz*temp) deltaf = min( max(deltaf, -100.d0), 100.d0) if (deltaf.eq.-100.) then nucrate_h2oice(i) = 0. else nucrate_h2oice(i)= dble(sqrt ( fistar / & (3.*pi*kbz*temp*(gstar*gstar)) ) & * kbz * temp * rstar & * rstar * 4. * pi & * ( nco2*rad_h2oice(i) ) & * ( nco2*rad_h2oice(i) ) & / ( zefshapeco2 * nusco2 * m0co2 ) & * dexp (deltaf)) endif 200 continue else do i=1,nbinco2_cld nucrate(i) = 0. nucrate_h2oice(i) = 0. enddo endif return end ********************************************************* double precision function fshapeco2(cost,rap) implicit none * function computing the f(m,x) factor * * related to energy required to form a critical embryo * ********************************************************* double precision cost,rap double precision yeah !! PHI yeah = sqrt( 1. - 2.*cost*rap + rap*rap ) !! FSHAPECO2 = TERM A fshapeco2 = (1.-cost*rap) / yeah fshapeco2 = fshapeco2 * fshapeco2 * fshapeco2 fshapeco2 = 1. + fshapeco2 !! ... + TERM B yeah = (rap-cost)/yeah fshapeco2 = fshapeco2 + & rap*rap*rap*(2.-3.*yeah+yeah*yeah*yeah) !! ... + TERM C fshapeco2 = fshapeco2 + 3. * cost * rap * rap * (yeah-1.) !! FACTOR 1/2 fshapeco2 = 0.5*fshapeco2 return end