Changeset 2988


Ignore:
Timestamp:
Jul 3, 2023, 6:40:46 PM (18 months ago)
Author:
jnaar
Message:

Bugfix for commit r2984 which caused improvedclouds to be much more numerically expensive than before (loop on ngrid,nlay within loop on ngrid,nlay). JN

Location:
trunk/LMDZ.MARS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/changelog.txt

    r2984 r2988  
    40814081retrocompatibility with imicro.
    40824082+ simpleclouds working
     4083
     4084== 03/07/2023 == JN
     4085Bugfix in improvedclouds from previous commit (r2984) where loops on
     4086(ngrid,nlay) where conducted within big (ngrid,nlay) loop. Two occurrences :
     4087initialization of zq0 and preventing negative tracers.
  • trunk/LMDZ.MARS/libf/phymars/improvedclouds_mod.F

    r2984 r2988  
    298298        spenttime = 0.
    299299        ending_ts=.false.
    300         print*, "ig,l :", ig, l
    301300        DO while (.not.ending_ts)
    302301          microtimestep=ptimestep/real(zimicro(ig,l))
    303           zq0(1:ngrid,1:nlay,1:nq) = zq
     302c         Initialize tracers for scavenging + hdo computations (JN)
     303          DO i=1,nq
     304             zq0(ig,l,i)=zq(ig,l,i)
     305          ENDDO !i=1,nq
    304306
    305307          ! Check if we are integrating over ptimestep
     
    577579     &          subpdtcloud(ig,l))*microtimestep
    578580
    579 c         Prevent negative tracers
    580           WHERE( zq(1:ngrid,1:nlay,1:nq) < 1.e-30 )
    581      &       zq(1:ngrid,1:nlay,1:nq) = 1.e-30
     581c         Prevent negative tracers ! JN
     582          DO i=1,nq
     583            IF(zq(ig,l,i).lt.1.e-30) zq(ig,l,i)=1.e-30
     584          ENDDO !i=1,nq
    582585
    583586c         Increment time spent in here
     
    758761c       zimicro = 30
    759762c      Coefficients good enough for present-day Mars :
    760        alpha = 1.87485684e+09
    761        beta = 1.45655856e+00
     763c       alpha = 1.87485684e+09
     764c       beta = 1.45655856e+00
    762765c      Coefficients covering high obliquity scenarios :
    763 c       alpha=3.36711332e+15
    764 c       beta=1.98636414e+00
     766       alpha=3.36711332e+15
     767       beta=1.98636414e+00
    765768c       nimicro=min(max(alpha*abs(potcond)**beta,5.),7000.)
    766769c       zimicro=ceiling((ptimestep/timeleft)*nimicro)
Note: See TracChangeset for help on using the changeset viewer.