source: trunk/LMDZ.MARS/libf/aeronomars/deposition.F @ 421

Last change on this file since 421 was 421, checked in by acolaitis, 13 years ago

## deposition.F: corrected a bug with z0, replaced with z0(ngrid) with the correct call to surfdat.h ## makemeso: corrected syntax of call to compile to make sure that there are no conflicts with other instances of compile in the environment of the user.

File size: 5.7 KB
Line 
1      subroutine deposition(ig, ig_vl1, pplay, pplev, zzlay, zzlev,
2     $                      zu, zv, zt, zycol, ptimestep, co2ice)
3cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
4c
5c     dry deposition of chemical species
6c
7cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
8c
9      implicit none
10c
11#include "dimensions.h"
12#include "dimphys.h"
13#include "planete.h"
14#include "chimiedata.h"
15#include "conc.h"
16#include "surfdat.h"
17c
18c     input
19c
20      integer ig                         ! grid point index
21      integer ig_vl1                     ! viking 1 grid point
22      real    pplay(ngridmx,nlayermx)    ! pressure at the middle of the layers (pa)
23      real    pplev(ngridmx,nlayermx+1)  ! pressure at layer boundaries (pa)
24      real    zzlay(ngridmx,nlayermx)    ! altitude at the middle of the layers (m)
25      real    zzlev(ngridmx,nlayermx+1)  ! altitude at layer boundaries (m)
26      real    zu(ngridmx,nlayermx)       ! u component of the wind (m.s-1)
27      real    zv(ngridmx,nlayermx)       ! v component of the wind (m.s-1)
28      real    zt(ngridmx,nlayermx)       ! temperature (k)
29      real    zycol(nlayermx,nqmx)       ! composition (volume mixing ratio)
30      real    ptimestep                  ! physical timestep (s)
31      real    co2ice(ngridmx)            ! co2 ice surface layer (kg.m-2)
32c
33c     local
34c
35      real    ubar                       ! wind module (m.s-1)
36      real    ustar                      ! friction velocity (m.s-1)
37      real    karman                     ! von karman constant
38      real    ra                         ! aerodynamic resistance (s.m-1)
39      real    rb                         ! quasi-laminar layer resistance (s.m-1)
40      real    vd                         ! dry deposition velocity (cm.s-1)
41      real    deltaz                     ! thickness of first layer (m)
42      real    mu0                        ! dynamic viscosity of co2 at 293.15 k (pa.s)
43      real    mu                         ! dynamic viscosity of co2 (pa.s)
44      real    nu                         ! kinematic viscosity of co2 (cm2.s-1)
45      real    rho                        ! density
46      real    d                          ! molecular diffusivity of methane (cm2.s-1)
47      real    schmidt                    ! schmidt number
48      real    prandtl                    ! prandtl number
49      real    p0                         ! reference pressure (pa)
50      real    loss                       ! loss rate (s-1)                       
51      integer iq
52c
53      real    nuch4
54      real    tau
55      real    gravity
56      real    gam
57      real    dp
58      real    cd
59c
60      data    karman / 0.4 /
61      data    prandtl / 0.72 /
62      data    mu0 / 14.8e-6 /
63      data    p0 /1.e5/
64c
65c     deposition is only active on surface uncovered by ice
66c
67c     if ((.not. watercaptag(ig)) .and. (co2ice(ig) .eq. 0.)) then
68c
69c        wind module (m.s-1)
70c
71         ubar = (zu(ig,1)**2. + zv(ig,1)**2.)**0.5
72c
73c        friction velocity (m.s-1)
74c
75         ustar = ubar*karman/log(zzlay(ig,1)/z0(ig))
76c
77c        aerodynamic resistance (s.m-1)
78c
79         ra = 1./(karman*ustar)*log(zzlay(ig,1)/z0(ig))
80c
81c        molecular diffusivity of methane in *air*  (cm2.s-1)
82c        massman, atmospheric environment, 32, 1111-1127, 1998
83c
84         d = 0.1952*(p0/pplay(ig,1))*(zt(ig,1)/273.15)**1.81
85c
86c        dynamic viscosity: temperature dependance (pa.s)
87c        sutherland's formula
88c
89         mu = mu0*(293.15 + 240.)/(zt(ig,1) + 240.)
90     $           *(zt(ig,1)/293.15)**(3./2.)
91c
92c        density (kg.m-3)
93c
94         rho = pplay(ig,1)/(rnew(ig,1)*zt(ig,1))
95c
96c        kinematic viscosity (cm2.s-1)
97c
98         nu = mu/rho*1.e4
99c
100c        schmidt number
101c
102         schmidt = nu/d
103c
104c        quasi-laminar layer resistance (s.m-1)
105c
106         rb = (2./(karman*ustar))*(schmidt/prandtl)**2./3.
107c
108c        dry deposition velocity (m.s-1)
109c
110         vd = 1./(ra + rb)
111c
112c        thickness of first layer (m)
113c
114         deltaz = zzlev(ig,2) - zzlev(ig,1)
115c
116c        loss rate (s-1)
117c
118         loss = vd/deltaz
119c
120c        test
121c
122c        loss = 1./(3600.*6.)
123c        vd = loss*deltaz
124c
125         nuch4 = sqrt(8.*8.31*zt(ig,1)
126     $                /(3.1416*16.e-3))
127         tau = 6.*3600.
128         gravity = 3.7
129         dp = pplev(ig,1) - pplev(ig,2)
130         cd = (karman/log(zzlay(ig,1)/z0(ig)))**2.
131c
132         gam = (4./nuch4)*dp
133     $        /(tau*gravity*rho - 1./(cd*ubar))
134c
135c        methane index
136c
137         iq = 12
138c
139c        update methane in first layer
140c
141c        zycol(1,iq) = zycol(1,iq)*exp(-loss*ptimestep)
142c
143         if (ig .eq. ig_vl1) then
144            print*,'**** deposition ****'
145            print*,'z0     = ', z0(ig), 'm'
146            print*,'deltaz = ', deltaz, ' m'
147            print*,'deltap = ', dp, 'pa'
148            print*,'zzlay  = ', zzlay(ig, 1), ' m'
149            print*,'pplay  = ', pplay(ig, 1), ' pa'
150            print*,'t      = ', zt(ig,1), ' k'
151            print*,'u      = ', zu(ig,1), ' m.s-1'
152            print*,'v      = ', zv(ig,1), ' m.s-1'
153            print*,'rho    = ', rho, ' kg.m-3'
154            print*,'ubar   = ', ubar, ' m.s-1'
155            print*,'d      = ', d, ' cm2.s-1'
156            print*,'mu     = ', mu, ' pa.s'
157            print*,'nu     = ', nu, ' cm2.s-1'
158            print*,'schmi  = ', schmidt
159            print*,'Ra     = ', ra, ' s.m-1'
160            print*,'Rb     = ', rb, ' s.m-1'
161            print*,'vd     = ', vd*100., 'cm.s-1'
162            print*,'tau dep= ', 1./loss, 's'
163            print*,'R      = ', rnew(ig,1)
164            print*,'nuch4  = ', nuch4, 'm.s-1'
165            print*,'tau    = ', tau, ' s'
166            print*,'gamma  = ', gam
167            print*,'taugrho= ',tau*gravity*rho
168            print*,'1surcdu= ', 1./(cd*ubar)
169
170            print*,'********************'
171         end if
172c
173c     end if
174c
175      return
176      end
Note: See TracBrowser for help on using the repository browser.