Changeset 120
- Timestamp:
- May 17, 2011, 4:27:01 PM (14 years ago)
- Location:
- trunk/mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mars/README
r117 r120 632 632 --> fix by moving the closing "endif" [in addition to corrections mentioned in the previous point] 633 633 634 == 17/10/2011 == EM 635 >> set internal computations using double precision in growthrate.F and 636 watercloud.F (otherwise we sometimes end up with Nans). 637 >> add extra checks in newcondens.F to avoid possibility of out of bounds 638 evaluation of array masse() 639 -
trunk/mars/libf/phymars/growthrate.F
r38 r120 23 23 REAL*8 psat ! water vapor saturation pressure (Pa) 24 24 REAL r ! crystal radius before condensation (m) 25 REAL seq ! Equilibrium saturation ratio 26 REAL dr ! crystal radius variation (m) 25 REAL*8 seq ! Equilibrium saturation ratio 26 ! REAL dr ! crystal radius variation (m) 27 REAL*8 Cste 27 28 28 29 c local: 29 30 c ------ 30 31 31 REAL molco2,molh2o32 REAL Mco2,Mh2o,rho_i,sigh2o33 REAL nav,rgp,kbz,pi,To32 REAL*8 molco2,molh2o 33 REAL*8 Mco2,Mh2o,rho_i,sigh2o 34 REAL*8 nav,rgp,kbz,pi,To 34 35 35 36 c Effective gas molecular radius (m) 36 data molco2/2.2 e-10/ ! CO237 data molco2/2.2d-10/ ! CO2 37 38 c Effective gas molecular radius (m) 38 data molh2o/1.2 e-10/ ! H2O39 data molh2o/1.2d-10/ ! H2O 39 40 c Molecular weight of CO2 40 data Mco2/44. e-3/ ! kg.mol-141 data Mco2/44.d-3/ ! kg.mol-1 41 42 c Molecular weight of H2O 42 data Mh2o/18. e-3/ ! kg.mol-143 data Mh2o/18.d-3/ ! kg.mol-1 43 44 c surface tension of ice/vapor 44 45 data sigh2o/0.12/ ! N.m … … 46 47 data rho_i/917./ ! kg.m-3 also defined in initcld.f 47 48 c Avogadro number 48 data nav/6.023 e23/49 data nav/6.023d23/ 49 50 c Perfect gas constant 50 51 data rgp/8.3143/ 51 52 c Boltzman constant 52 data kbz/1.381 e-23/53 data kbz/1.381d-23/ 53 54 c pi number 54 55 data pi/3.141592654/ … … 56 57 data To/273.15/ 57 58 58 REAL k,Lv59 REAL knudsen ! Knudsen number (gas mean free path/particle radius)60 REAL a,Dv,lambda ! Intermediate computations for growth rate59 REAL*8 k,Lv 60 REAL*8 knudsen ! Knudsen number (gas mean free path/particle radius) 61 REAL*8 a,Dv,lambda ! Intermediate computations for growth rate 61 62 REAL*8 Rk,Rd 62 REAL Cste, rf63 63 64 64 c----------------------------------------------------------------------- -
trunk/mars/libf/phymars/newcondens.F
r86 r120 854 854 Mtot = masse(m+1) 855 855 MQtot = masse(m+1)*q(m+1) 856 do while ((m.gt.0).and.(-w(l+1).gt.(Mtot+masse(m)))) 856 if (m.gt.0) then ! because some compilers will have problems 857 ! evaluating masse(0) 858 do while ((m.gt.0).and.(-w(l+1).gt.(Mtot+masse(m)))) 857 859 m=m-1 858 860 Mtot = Mtot + masse(m+1) 859 861 MQtot = MQtot + masse(m+1)*q(m+1) 860 end do 862 if (m.eq.0) exit 863 end do 864 endif 861 865 if (m.gt.0) then 862 866 sigw=(w(l+1)+Mtot)/masse(m) -
trunk/mars/libf/phymars/newsedim.F
r117 r120 179 179 ptop=exp(-(dztop-Ep)*g/(r*pt(ig,l+k))) 180 180 IF ( ptop .eq. 1. ) THEN 181 PRINT*, ' exposant trop petit ', ig, l181 PRINT*, 'newsedim: exposant trop petit ', ig, l 182 182 ptop=pplev(ig,l+k) * ( 1. - (dztop-Ep)*g/(r*pt(ig,l+k))) 183 183 ELSE -
trunk/mars/libf/phymars/watercloud.F
r83 r120 75 75 REAL CBRT 76 76 EXTERNAL CBRT 77 INTEGER ig, iq,l77 INTEGER ig,l 78 78 79 79 … … 85 85 REAL masse (ngridmx,nlayermx) 86 86 REAL epaisseur (ngridmx,nlayermx) 87 REAL rfinal ! Ice crystal radius after condensation(m)88 REAL seq ! Equilibrium saturation ration (accounting for curvature effect)89 REAL dzq ! masse de glace echangee (kg/kg)87 ! REAL rfinal ! Ice crystal radius after condensation(m) 88 REAL*8 seq ! Equilibrium saturation ration (accounting for curvature effect) 89 REAL*8 dzq ! masse de glace echangee (kg/kg) 90 90 REAL lw !Latent heat of sublimation (J.kg-1) 91 91 REAL,PARAMETER :: To=273.15 ! reference temperature, T=273.15 K … … 93 93 REAL Ctot 94 94 REAL*8 ph2o,satu 95 REAL gr,Cste,up,dwn,newvap95 REAL*8 gr,Cste,up,dwn,newvap 96 96 97 97 LOGICAL,SAVE :: firstcall=.true. … … 104 104 c REAL rave(ngridmx) ! Mean crystal radius in a column (m) 105 105 106 INTEGER i107 108 106 ! indexes of water vapour, water ice and dust tracers: 109 107 INTEGER,SAVE :: i_h2o=0 ! water vapour 110 108 INTEGER,SAVE :: i_ice=0 ! water ice 111 CHARACTER(LEN=20) :: tracername ! to temporarly store text112 109 113 110 c ** un petit test de coherence … … 209 206 c Improved microphysics scheme 210 207 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 211 212 208 Ctot = zq(ig,l,i_h2o) + zq(ig,l,i_ice) 213 209 ph2o = zq(ig,l,i_h2o) * 44. / 18. * pplay(ig,l)
Note: See TracChangeset
for help on using the changeset viewer.