source: trunk/LMDZ.MARS/libf/phymars/nuclea.F @ 2526

Last change on this file since 2526 was 2522, checked in by jnaar, 4 years ago

Added flag for temperature-dependant water contact parameter. Default is false for now !
JN

File size: 5.8 KB
Line 
1*******************************************************
2*                                                     *
3      subroutine nuclea(ph2o,temp,sat,n_ccn,nucrate)
4      USE comcstfi_h
5      implicit none
6*                                                     *
7*   This subroutine computes the nucleation rate      *
8*   as given in Pruppacher & Klett (1978) in the      *
9*   case of water ice forming on a solid substrate.   *
10*     Definition refined by Keese (jgr,1989)          *
11*   Authors: F. Montmessin                            *
12*     Adapted for the LMD/GCM by J.-B. Madeleine      *
13*     (October 2011)                                  *
14*     Optimisation by A. Spiga (February 2012)        * 
15*******************************************************
16
17#include "microphys.h"
18      include "callkeys.h"
19
20c     Inputs
21      DOUBLE PRECISION ph2o,sat
22      DOUBLE PRECISION n_ccn(nbin_cld)
23      REAL temp
24
25c     Output
26   !   DOUBLE PRECISION nucrate(nbin_cld)
27      REAL nucrate(nbin_cld)
28
29c     Local variables
30      DOUBLE PRECISION nh2o
31      DOUBLE PRECISION sig      ! Water-ice/air surface tension  (N.m)
32      external sig
33      DOUBLE PRECISION rstar    ! Radius of the critical germ (m)
34      DOUBLE PRECISION gstar    ! # of molecules forming a critical embryo
35      DOUBLE PRECISION fistar   ! Activation energy required to form a critical embryo (J)
36!      DOUBLE PRECISION zeldov   ! Zeldovitch factor (no dim)
37      DOUBLE PRECISION fshape   ! function defined at the end of the file
38      DOUBLE PRECISION deltaf
39
40c     Ratio rstar/radius of the nucleating dust particle
41c     double precision xratio
42     
43      double precision mtetalocal ! local mteta in double precision
44
45      double precision fshapesimple,zefshape
46
47
48      integer i
49     
50      LOGICAL firstcall
51      DATA firstcall/.true./
52      SAVE firstcall
53
54c     *************************************************
55
56      mtetalocal = mteta  !! use mtetalocal for better performance
57
58      IF (temp_dependant_m) THEN
59         mtetalocal = min(0.0044*temp + 0.1831,0.97)
60      ENDIF ! (temp_dependant_m) THEN
61cccccccccccccccccccccccccccccccccccccccccccccccccc
62ccccccccccc ESSAIS TN MTETA = F (T) cccccccccccccc
63c      if (temp .gt. 200) then
64c         mtetalocal = mtetalocal
65c      else if (temp .lt. 190) then
66c         mtetalocal = mtetalocal-0.05
67c      else
68c         mtetalocal = mtetalocal - (190-temp)*0.005
69c      endif
70c----------------exp law, see Trainer 2008, J. Phys. Chem. C 2009, 113, 2036\u20132040
71       !mtetalocal = max(mtetalocal - 6005*exp(-0.065*temp),0.1)
72       !mtetalocal = max(mtetalocal - 6005*exp(-0.068*temp),0.1)
73               !print*, mtetalocal, temp
74cccccccccccccccccccccccccccccccccccccccccccccccccc
75cccccccccccccccccccccccccccccccccccccccccccccccccc
76      IF (firstcall.and.temp_dependant_m) THEN
77          print*, ' ' 
78          print*, 'dear user, please keep in mind that'
79          print*, 'contact parameter IS NOT constant ;'
80          print*, 'Using the following linear fit from'
81          print*, 'Maattanen et al. 2014 (SM linear fit) :'
82          print*, 'min(0.0044*temp + 0.1831,0.97)'
83          print*, ' ' 
84         firstcall=.false.
85      ELSE IF (firstcall.and.(.not.(temp_dependant_m))) THEN
86          print*, ' ' 
87          print*, 'dear user, please keep in mind that'
88          print*, 'contact parameter IS constant'
89          print*, ' ' 
90         firstcall=.false.
91      END IF
92cccccccccccccccccccccccccccccccccccccccccccccccccc
93cccccccccccccccccccccccccccccccccccccccccccccccccc
94   
95
96      if (sat .gt. 1.) then    ! minimum condition to activate nucleation
97
98        nh2o   = ph2o / kbz / temp
99        rstar  = 2. * sig(temp) * vo1 / (rgp*temp*log(sat))
100        gstar  = 4. * nav * pi * (rstar * rstar * rstar) / (3.*vo1)
101       
102        fshapesimple = (2.+mtetalocal)*(1.-mtetalocal)*(1.-mtetalocal)
103     &                   / 4.
104
105c       Loop over size bins
106        do 200 i=1,nbin_cld
107
108          if ( n_ccn(i) .lt. 1e-10 ) then
109c           no dust, no need to compute nucleation!
110            nucrate(i)=0.
111            goto 200
112          endif
113
114          if (rad_cld(i).gt.3000.*rstar) then
115            zefshape = fshapesimple
116          else
117            zefshape = fshape(mtetalocal,rad_cld(i)/rstar)
118          endif
119
120          fistar = (4./3.*pi) * sig(temp) * (rstar * rstar) *
121     &             zefshape
122          deltaf = (2.*desorp-surfdif-fistar)/
123     &             (kbz*temp)
124          deltaf = min( max(deltaf, -100.d0), 100.d0)
125
126          if (deltaf.eq.-100.) then
127            nucrate(i) = 0.
128          else
129            nucrate(i)= real(sqrt ( fistar /
130     &               (3.*pi*kbz*temp*(gstar*gstar)) )
131     &                  * kbz * temp * rstar
132     &                  * rstar * 4. * pi
133     &                  * ( nh2o*rad_cld(i) )
134     &                  * ( nh2o*rad_cld(i) )
135     &                  / ( zefshape * nus * m0 )
136     &                  * exp (deltaf))
137          endif
138
139200     continue
140
141      else
142
143        do i=1,nbin_cld
144          nucrate(i) = 0.
145        enddo
146
147      endif
148
149      return
150      end
151
152*********************************************************
153      double precision function fshape(cost,rap)
154      implicit none
155*        function computing the f(m,x) factor           *
156* related to energy required to form a critical embryo  *
157*********************************************************
158
159      double precision cost,rap
160      double precision yeah
161
162          !! PHI
163          yeah = sqrt( 1. - 2.*cost*rap + rap*rap )
164          !! FSHAPE = TERM A
165          fshape = (1.-cost*rap) / yeah
166          fshape = fshape * fshape * fshape
167          fshape = 1. + fshape
168          !! ... + TERM B
169          yeah = (rap-cost)/yeah
170          fshape = fshape +
171     & rap*rap*rap*(2.-3.*yeah+yeah*yeah*yeah)
172          !! ... + TERM C
173          fshape = fshape + 3. * cost * rap * rap * (yeah-1.)
174          !! FACTOR 1/2
175          fshape = 0.5*fshape
176
177      return
178      end
Note: See TracBrowser for help on using the repository browser.