Changeset 2152


Ignore:
Timestamp:
Sep 5, 2019, 4:30:23 PM (5 years ago)
Author:
aslmd
Message:

in improvedCO2clouds_mod, changed dlog to log, dexp to exp, and a dble instance so that the model can work in simple precision e.g. mesoscale

Location:
trunk/LMDZ.MARS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2149 r2152  
    27242724- Add F.Lott's non-orographic GW parametrization. Disabled by default for now,
    27252725  activated by setting calllott_nonoro=.true. in callphys.def
     2726
     2727== 05/09/2019 == AS
     2728- Changed dlog/dexp in log/exp
     2729- Added a double() instance to improvedCO2clouds so that the model works in simple precision [e.g. mesoscale]
  • trunk/LMDZ.MARS/libf/phymars/improvedCO2clouds_mod.F

    r1996 r2152  
    198198c       dr_cld is the width of each rad_cldco2 bin.
    199199
    200         vrat_cld = dlog(rmax_cld/rmin_cld) / float(nbinco2_cld-1) *3.
    201         vrat_cld = dexp(vrat_cld)
     200        vrat_cld = log(rmax_cld/rmin_cld) / float(nbinco2_cld-1) *3.
     201        vrat_cld = exp(vrat_cld)
    202202        rb_cldco2(1)  = rbmin_cld
    203203        rad_cldco2(1) = rmin_cld
     
    226226        print*,'-----------------------------------'
    227227        do i=1,nbinco2_cld+1
    228             rb_cldco2(i) = dlog(rb_cldco2(i))  !! we save that so that it is not computed
     228            rb_cldco2(i) = log(rb_cldco2(i))  !! we save that so that it is not computed
    229229                                         !! at each timestep and gridpoint
    230230        enddo
     
    402402
    403403              Mo =4.*pi*rho_dust*No*rdust(ig,l)**(3.)
    404      &           *dexp(9.*nuiceco2_ref/2.)/3. ! in Madeleine et al 2011
     404     &           *exp(9.*nuiceco2_ref/2.)/3. ! in Madeleine et al 2011
    405405     
    406406              No = zq(ig,l,igcm_dust_number)* tauscaling(ig)+1.e-30
     
    410410
    411411              Rn = rdust(ig,l)
    412               Rn = -dlog(Rn)
     412              Rn = -log(Rn)
    413413              Rm = Rn - 3. * sigma_iceco2*sigma_iceco2 
    414414              n_derf = derf( (rb_cldco2(1)+Rn) *dev2)
     
    448448                No = zq(ig,l,igcm_ccn_number)* tauscaling(ig) + 1.e-30
    449449                Rn = rice(ig,l)
    450                 Rn = -dlog(Rn)
     450                Rn = -log(Rn)
    451451                Rm = Rn - 3. * sigma_ice*sigma_ice 
    452452                n_derf = derf( (rb_cldco2(1)+Rn) *dev3)
     
    473473              dMh2o = 0.
    474474              do i = 1, nbinco2_cld
    475                  Proba    =1.0-dexp(-1.*microtimestep*rate(i))
     475                 Proba    =1.0-exp(-1.*microtimestep*rate(i))
    476476                 dN       = dN + n_aer(i) * Proba
    477477                 dM       = dM + m_aer(i) * Proba             
     
    479479              if (co2useh2o) then
    480480                 do i = 1, nbinco2_cld
    481                     Probah2o = 1.0-dexp(-1.*microtimestep*rateh2o(i))
     481                    Probah2o = 1.0-exp(-1.*microtimestep*rateh2o(i))
    482482                    dNh2o    = dNh2o + n_aer_h2oice(i) * Probah2o
    483483                    dMh2o    = dMh2o + m_aer_h2oice(i) * Probah2o
     
    535535     &         * tauscaling(ig)+1.e-30.ge. 1)THEN   ! we trigger crystal growth
    536536             
    537               call updaterice_microco2(zq(ig,l,igcm_co2_ice),
    538      &            zq(ig,l,igcm_ccnco2_mass),zq(ig,l,igcm_ccnco2_number),
     537              call updaterice_microco2(dble(zq(ig,l,igcm_co2_ice)),
     538     &            dble(zq(ig,l,igcm_ccnco2_mass)),
     539     &            dble(zq(ig,l,igcm_ccnco2_number)),
    539540     &            tauscaling(ig),riceco2(ig,l),rhocloudco2(ig,l))
    540541
Note: See TracChangeset for help on using the changeset viewer.