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