Changeset 3017


Ignore:
Timestamp:
Jul 27, 2023, 12:23:20 AM (16 months ago)
Author:
jnaar
Message:

Change the way zdq is estimated to fasten (by a lot) the adaptative subtimestep of water ice clouds. JN

Location:
trunk/LMDZ.MARS
Files:
2 edited

Legend:

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

    r3016 r3017  
    41424142into module data there. Also convert lteparams.h into module nlteparams_h.F90.
    41434143And while at it also turn nlthermeq.F and blendrad.F into modules.
     4144
     4145== 27/07/2023 == JN
     4146Optimization for adaptative subtimestep of water-ice clouds : should now be
     4147much faster. + small cleanup
  • trunk/LMDZ.MARS/libf/phymars/improvedclouds_mod.F

    r3008 r3017  
    397397       IF ( zq(ig,l,igcm_ccn_number)*tauscaling(ig).ge. 1.) THEN ! we trigger crystal growth
    398398
    399      
    400399        call updaterice_micro(zq(ig,l,igcm_h2o_ice),
    401400     &    zq(ig,l,igcm_ccn_mass),zq(ig,l,igcm_ccn_number),
     
    417416ccccccc  implicit scheme of mass growth
    418417c         cste here must be computed at each step
    419           cste = 4*pi*rho_ice*microtimestep
    420 c          print*, 'ig',ig
    421 c          print*, 'l',l
    422 c          print*, 'cste',cste
    423 c          print*, 'seq',seq
    424 c          print*, 'zqsat',zqsat(ig,l)
    425 c          print*, 'zq vap',zq(ig,l,igcm_h2o_vap)
    426 c          print*, 'res',res
    427 c          print*, 'No',No
    428 c          print*, 'rice',rice(ig,l)
     418        cste = 4*pi*rho_ice*microtimestep
    429419
    430420        dMice =
     
    578568          ENDDO !i=1,nq
    579569
     570          IF (cloud_adapt_ts) then
     571c           Estimation of how much is actually condensing/subliming
     572                zdq=(dMice/spenttime)*(ptimestep-spenttime)
     573c           Threshold with powerlaw (sanity check)
     574                zdq=min(abs(zdq),
     575     &            abs(zpotcond(ig,l)*((ptimestep-spenttime)/ptimestep)))
     576                call adapt_imicro(ptimestep,zdq,
     577     &             zimicro(ig,l))
     578          ENDIF! (cloud_adapt_ts) then
    580579c         Increment time spent in here
    581580          spenttime=spenttime+microtimestep
    582581          count_micro(ig,l)=count_micro(ig,l)+1
    583           IF (cloud_adapt_ts) then
    584 c           Estimation of how much is actually condensing/subliming
    585 c                print*, 'zq',zq(ig,l,igcm_h2o_vap)
    586 c                print*, 'zq0',zq0(ig,l,igcm_h2o_vap)
    587 c                print*, 'ptimestep',ptimestep
    588                 zdq=(zq(ig,l,igcm_h2o_vap)-zq0(ig,l,igcm_h2o_vap))
    589      &                   *ptimestep/microtimestep
    590 c           Estimation of how much is actually condensing/subliming
    591 c                zdq=min(abs(dMice)*ptimestep,zpotcond(ig,l))
    592                 call adapt_imicro(ptimestep,zdq,
    593      &             zimicro(ig,l))
    594           ENDIF! (cloud_adapt_ts) then
    595582          ENDDO ! while (.not. ending_ts)
    596583        ENDDO ! of ig loop
Note: See TracChangeset for help on using the changeset viewer.