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