Changeset 3443 for trunk/LMDZ.MARS


Ignore:
Timestamp:
Sep 27, 2024, 6:23:50 PM (8 weeks ago)
Author:
emillour
Message:

Mars PCM:
Add new molecular diffusion routine moldiff_MPF (modified pass flow scheme)
But for intermetiate testing the legacy moldiff_red routine remains
the default. The moldiff_scheme flag (1: legacy, 2: MPF) can be used
to swich from one scheme to the other.
JYC+EM

Location:
trunk/LMDZ.MARS
Files:
1 added
2 edited

Legend:

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

    r3433 r3443  
    46994699== 20/09/2024 == EM
    47004700Update reference callphys.def.hdo.GCM5 in deftank
     4701
     4702== 27/09/2024 == JYC+EM
     4703Add new molecular diffusion routine moldiff_MPF (modified pass flow scheme)
     4704But for intermetiate testing the legacy moldiff_red routine remains
     4705the default. The "moldiff_scheme" flag (1: legacy, 2: MPF) can be used
     4706to swich from one scheme to the other.
  • trunk/LMDZ.MARS/libf/aeronomars/thermosphere.F

    r3156 r3443  
    33      IMPLICIT NONE
    44     
     5      integer,save :: moldiff_scheme ! 1:legacy scheme, 2: MPF scheme
     6!$OMP THREADPRIVATE(moldiff_scheme)
     7
    58      CONTAINS
    69     
     
    1215     $     PhiEscH,PhiEscH2,PhiEscD)
    1316
    14       use moldiff_red_mod, only: moldiff_red
     17      use ioipsl_getin_p_mod, only: getin_p
     18      use moldiff_red_mod, only: moldiff_red ! old molecular diffusion scheme
     19      use moldiff_MPF_mod, only: moldiff_MPF ! new molecular diffusion scheme
    1520      use conc_mod, only: rnew, cpnew
    1621      USE comcstfi_h, only: r, cpp
     22      use mod_phys_lmdz_para, only : is_master
    1723      implicit none
    1824
     
    4551
    4652      INTEGER :: l,ig
     53      logical,save :: firstcall=.true.
     54!$OMP THREADPRIVATE(firstcall)
     55     
     56      if (firstcall) then
     57        ! default scheme for molecular diffusion: legacy
     58        moldiff_scheme=1
     59        call getin_p("moldiff_scheme",moldiff_scheme)
     60        if (is_master) then
     61          write(*,*)"thermosphere: moldiff_scheme=",moldiff_scheme
     62        endif
     63        firstcall=.false.
     64      endif ! of if (firstcall)
    4765
    4866      ! initialize tendencies to zero in all cases
     
    7492
    7593      if (callmoldiff) THEN
     94       if (moldiff_scheme==1) then
     95        ! old "legacy" scheme
    7696        call moldiff_red(ngrid,nlayer,nq,
    7797     &                   pplay,pplev,pt,pdt,pq,pdq,ptimestep,
    7898     &                   zzlay,zdteuv,zdtconduc,zdqmoldiff,
    7999     &                   PhiEscH,PhiEscH2,PhiEscD)
     100       else
     101        ! new MPF (modified pass flow) scheme
     102        call moldiff_MPF(ngrid,nlayer,nq,
     103     &                   pplay,pplev,pt,pdt,pq,pdq,ptimestep,
     104     &                   zzlay,zdteuv,zdtconduc,zdqmoldiff,
     105     &                   PhiEscH,PhiEscH2,PhiEscD)
     106       endif ! of if (moldiff_scheme==1)
    80107      endif
    81108
Note: See TracChangeset for help on using the changeset viewer.