source: trunk/mars/libf/phymars/newsedim.F @ 80

Last change on this file since 80 was 38, checked in by emillour, 14 years ago

Ajout du modè Martien (mon LMDZ.MARS.BETA, du 28/01/2011) dans le rértoire mars, pour pouvoir suivre plus facilement les modifs.
EM

File size: 6.0 KB
Line 
1      SUBROUTINE newsedim(ngrid,nlay,naersize,ptimestep,
2     &  pplev,masse,epaisseur,pt,rd,rho,pqi,wq,beta)
3      IMPLICIT NONE
4
5c=======================================================================
6c
7c      Compute sedimentation of 1 tracer
8c      of radius rd (m) and density rho (kg.m-3)
9c
10c=======================================================================
11
12c-----------------------------------------------------------------------
13c   declarations:
14c   -------------
15
16#include "dimensions.h"
17#include "dimphys.h"
18#include "comcstfi.h"
19c
20c   arguments:
21c   ----------
22
23      INTEGER,INTENT(IN) :: ngrid,nlay,naersize
24      REAL,INTENT(IN) :: ptimestep            ! pas de temps physique (s)
25      REAL,INTENT(IN) :: pplev(ngrid,nlay+1) ! pression aux inter-couches (Pa)
26      REAL,INTENT(IN) :: pt(ngrid,nlay) ! temperature au centre des couches (K)
27      real,intent(in) :: masse (ngrid,nlay) ! masse d'une couche (kg)
28      real,intent(in) :: epaisseur (ngrid,nlay)  ! epaisseur d'une couche (m)
29      real,intent(in) :: rd(naersize)             ! particle radius (m)
30      real,intent(in) :: rho             ! particle density (kg.m-3)
31
32
33c    Traceurs :
34      real,intent(inout) :: pqi(ngrid,nlay)  ! traceur   (e.g. ?/kg)
35      real,intent(out) :: wq(ngridmx,nlay+1)  ! flux de traceur durant timestep (?/m-2)
36      real,intent(in) :: beta ! correction for the shape of the particles
37                !   (see Murphy et al. JGR 1990 vol.95)
38                !   beta=1 for spheres
39                !   beta=0.85 for irregular particles
40                !   beta=0.5 for disk shaped particles
41     
42c   local:
43c   ------
44
45      INTEGER l,ig, k, i
46      REAL rfall
47
48      LOGICAL,SAVE :: firstcall=.true.
49
50c    Traceurs :
51c    ~~~~~~~~
52      real traversee (ngridmx,nlayermx)
53      real vstokes(ngridmx,nlayermx)
54      real w(ngridmx,nlayermx)
55      real ptop, dztop, Ep, Stra
56
57
58c    Physical constant
59c    ~~~~~~~~~~~~~~~~~
60c     Gas molecular viscosity (N.s.m-2)
61      real,parameter :: visc=1.e-5       ! CO2
62c     Effective gas molecular radius (m)
63      real,parameter :: molrad=2.2e-10   ! CO2
64
65c     local and saved variable
66      real,save :: a,b
67
68
69
70c    ** un petit test de coherence
71c       --------------------------
72
73      IF (firstcall) THEN
74         IF(ngrid.NE.ngridmx) THEN
75            PRINT*,'STOP dans newsedim'
76            PRINT*,'probleme de dimensions :'
77            PRINT*,'ngrid  =',ngrid
78            PRINT*,'ngridmx  =',ngridmx
79            STOP
80         ENDIF
81         firstcall=.false.
82
83
84c       Preliminary calculations for sedimenation velocity :
85c       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86
87c       - Constant to compute stokes speed simple formulae
88c        (Vstokes =  b * rho* r**2   avec   b= (2/9) * rho * g / visc
89         b = 2./9. * g / visc
90      ENDIF ! of IF(firstcall)
91     
92c       - Constant  to compute gas mean free path
93c        l= (T/P)*a, avec a = (  0.707*8.31/(4*pi*molrad**2 * avogadro))
94         a = 0.707*8.31/(4*3.1416* molrad**2  * 6.023e23)
95
96c       - Correction to account for non-spherical shape (Murphy et al.  1990)
97         a = a * beta
98
99
100
101c-----------------------------------------------------------------------
102c    1. initialisation
103c    -----------------
104
105c     Sedimentation velocity (m/s)
106c     ~~~~~~~~~~~~~~~~~~~~~~
107c     (stokes law corrected for low pressure by the Cunningham
108c     slip-flow correction  according to Rossow (Icarus 36, 1-50, 1978)
109
110        do  l=1,nlay
111          do ig=1, ngrid
112            if (naersize.eq.1) then
113              rfall=rd(1)
114            else
115              i=ngrid*(l-1)+ig
116              rfall=rd(i)
117            endif 
118            vstokes(ig,l) = b * rho * rfall**2 *
119     &      (1 + 1.333* ( a*pt(ig,l)/pplev(ig,l) )/rfall)
120
121c           Layer crossing time (s) :
122            traversee(ig,l)= epaisseur(ig,l)/vstokes(ig,l)
123          end do
124        end do
125
126
127c     Calcul de la masse d'atmosphere correspondant a q transferee
128c     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
129c     (e.g. on recherche le niveau  en dessous de laquelle le traceur
130c      va traverser le niveau intercouche l : "dztop" est sa hauteur
131c      au dessus de l (m), "ptop" est sa pression (Pa))
132
133      do  l=1,nlay
134        do ig=1, ngrid
135             
136             dztop = vstokes(ig,l)*  ptimestep
137             Ep=0
138             k=0
139
140c **************************************************************
141c            Simple Method
142             w(ig,l) =
143     &       (1- exp(-dztop*g/(r*pt(ig,l))))*pplev(ig,l) / g
144cc           write(*,*) 'OK simple method l,w =', l, w(ig,l)
145cc           write(*,*) 'OK simple method dztop =', dztop
146c **************************************************************
147cccc         Complex method :
148            if (dztop.gt.epaisseur(ig,l)) then
149cccc            Cas ou on "epuise" la couche l : On calcule le flux
150cccc            Venant de dessus en tenant compte de la variation de Vstokes
151
152               Ep= epaisseur(ig,l)
153               Stra= traversee(ig,l)
154               do while(dztop.gt.Ep.and.l+k+1.le.nlay)
155                 k=k+1
156                 dztop= Ep + vstokes(ig,l+k)*(ptimestep -Stra)
157                 Ep = Ep + epaisseur(ig,l+k)
158                 Stra = Stra + traversee(ig,l+k)
159               enddo
160               Ep = Ep - epaisseur(ig,l+k)
161             end if
162             ptop=pplev(ig,l+k)*exp(-(dztop-Ep)*g/(r*pt(ig,l+k)))
163             w(ig,l) = (pplev(ig,l) -Ptop)/g
164c
165cc           write(*,*) 'OK new    method l,w =', l, w(ig,l)
166cc           write(*,*) 'OK new    method dztop =', dztop
167cc       if(l.eq.7)write(*,*)'l=7,k,pplev,Ptop',pplev(ig,l),Ptop
168cc       if(l.eq.7)write(*,*)'l=7,dztop,Ep',dztop,Ep
169cc            if(l.eq.6)write(*,*)'l=6,k, w',k, w(1,l)
170cc            if(l.eq.7)write(*,*)'l=7,k, w',k, w(1,l)
171cc            if(l.eq.8)write(*,*)'l=8,k, w',k, w(1,l)
172c **************************************************************
173        end do
174      end do
175
176      call vlz_fi(ngrid,pqi,2.,masse,w,wq)
177c         write(*,*) ' newsed: wq(6), wq(7), q(6)',
178c    &                wq(1,6),wq(1,7),pqi(1,6)
179
180
181      RETURN
182      END
183
Note: See TracBrowser for help on using the repository browser.