Changeset 4033


Ignore:
Timestamp:
Jan 28, 2026, 3:06:52 PM (4 weeks ago)
Author:
mmaurice
Message:

Generic PCM

Introduce molecular viscosity module. Add callconduc and callmolvis
flags to call conduction and molecular viscosity, respectively. Change
phitop in conduction to phitop_conduc (there is also phitop_molvis now).
Move thermal conductivity lambda to conc_mod.F90.

MM

Location:
trunk/LMDZ.GENERIC/libf/phystd
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/callkeys_mod.F90

    r3942 r4033  
    2222!$OMP THREADPRIVATE(strictboundrayleigh)
    2323      logical,save :: callthermos
     24      logical,save :: callconduc
     25      logical,save :: callmolvis
    2426      logical,save :: force_conduction
    25       real,save    :: phitop
     27      real,save    :: phitop_conduc
     28      real,save    :: phitop_molvis
    2629      real,save    :: zztop
    2730      real,save    :: a_coeff
    2831      real,save    :: s_coeff
    29 !$OMP THREADPRIVATE(callthermos,phitop,zztop,force_conduction,a_coeff,s_coeff)
     32!$OMP THREADPRIVATE(callthermos,callconduc,callmolvis,phitop_conduc,phitop_molvis,zztop,force_conduction,a_coeff,s_coeff)
    3033
    3134      logical,save :: enertest
  • trunk/LMDZ.GENERIC/libf/phystd/conc_mod.F90

    r1798 r4033  
    55  real,save,allocatable :: mmean(:,:)  ! mean molecular mass of the atmosphere
    66  real,save,allocatable :: Akknew(:,:) ! thermal conductivity cofficient
     7  real,save,allocatable :: lambda(:,:) ! effective thermal conductivity
    78  real,save,allocatable :: cpnew(:,:)  ! specicic heat
    89  real,save,allocatable :: rnew(:,:)   ! specific gas constant
     
    1819    allocate(mmean(ngrid,nlayer))
    1920    allocate(Akknew(ngrid,nlayer))
     21    allocate(lambda(ngrid,nlayer))
    2022    allocate(cpnew(ngrid,nlayer))
    2123    allocate(rnew(ngrid,nlayer))
     
    2931    if (allocated(mmean)) deallocate(mmean)
    3032    if (allocated(Akknew)) deallocate(Akknew)
     33    if (allocated(lambda)) deallocate(lambda)
    3134    if (allocated(cpnew)) deallocate(cpnew)
    3235    if (allocated(rnew)) deallocate(rnew)
  • trunk/LMDZ.GENERIC/libf/phystd/conduction.F90

    r3235 r4033  
    99   
    1010      use comcstfi_mod, only: r, cpp, mugaz
    11       use callkeys_mod, only: phitop,zztop,a_coeff,s_coeff,force_conduction
     11      use callkeys_mod, only: phitop_conduc,zztop,a_coeff,s_coeff,force_conduction
     12      use conc_mod,     only: lambda
    1213      use gases_h
    1314
     
    4849      INTEGER :: i,ig,l,igas,kgas
    4950      REAL :: alpha(ngrid,nlayer)
    50       REAL :: lambda(ngrid,nlayer)
    5151      REAL :: muvol(ngrid,nlayer)   ! kg.m-3
    5252      REAL :: C(ngrid,nlayer)
     
    111111              molar_frac(:,:,igas) = gfrac(igas)
    112112              here(igas) = .true.
     113            elseif(igas.eq.igas_CO2) then
     114              !Interpolated from Hurly et al., (2007)
     115              !valid between 20 and 1000 K (max 3 percent of error)
     116              akk(igas) = 3.072e-4
     117              skk(igas) = 0.69
     118              molar_mass(igas) = 44.010e-3
     119              akk_visc(igas) = 4.5054e-7
     120              skk_visc(igas) = 0.6658
     121              molar_frac(:,:,igas) = gfrac(igas)
     122              here(igas) = .true.
    113123              ! Add more molecules here and the reference PLEASE!
    114124            else
     
    205215                   * (1-D(:,nlayer-1))
    206216      C(:,nlayer)  =C(:,nlayer-1)+zt(:,nlayer-1)-zt(:,nlayer)
    207       C(:,nlayer)  =(C(:,nlayer)*lambda(:,nlayer)+phitop) &
     217      C(:,nlayer)  =(C(:,nlayer)*lambda(:,nlayer)+phitop_conduc) &
    208218                   / den(:,nlayer)
    209219
  • trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90

    r3942 r4033  
    292292     if(callthermos) then
    293293       if (is_master) write(*,*) trim(rname)//&
     294        ": call thermospheric conduction ?"
     295       callconduc=.true. ! default value
     296       call getin_p("conduction",callconduc)
     297       if (is_master) write(*,*) trim(rname)//&
     298         ": conduction = ",callconduc
     299       if (is_master) write(*,*) trim(rname)//&
     300         ": call thermospheric viscosity ?"
     301         callmolvis=.true. ! default value
     302       call getin_p("molvis",callmolvis)
     303       if (is_master) write(*,*) trim(rname)//&
     304          ": molvis = ",callmolvis
     305       if (is_master) write(*,*) trim(rname)//&
    294306         ": flux from thermosphere ? W/m2"
    295        phitop = 0.0 ! default value
    296        call getin_p("phitop",phitop)
     307       phitop_conduc = 0.0 ! default value
     308       call getin_p("phitop_conduc",phitop_conduc)
    297309       if (is_master) write(*,*) trim(rname)//&
    298          ": phitop = ",phitop
     310         ": phitop_conduc = ",phitop_conduc
     311        if (is_master) write(*,*) trim(rname)//&
     312         ": momentum flux from thermosphere ?"
     313       phitop_molvis = 0.0 ! default value
     314       call getin_p("phitop_molvis",phitop_molvis)
     315        if (is_master) write(*,*) trim(rname)//&
     316         ": phitop_molvis = ",phitop_molvis
    299317       if (is_master) write(*,*) trim(rname)//&
    300318         ": Thickness of conduction ? m"
  • trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90

    r3990 r4033  
    7171                              ok_slab_ocean, photochem, rings_shadow, rmean, &
    7272                              season, sedimentation,generic_condensation, &
    73                               specOLR, callthermos, callvolcano, &
     73                              specOLR, callvolcano, &
     74                              callthermos, callconduc, callmolvis, &
    7475                              startphy_file, testradtimes, tlocked, &
    7576                              tracer, UseTurbDiff, water, watercond, &
     
    8384      use callcorrk_mod, only: callcorrk
    8485      use conduction_mod, only: conduction
     86      use molvis_mod, only: molvis
    8587      use volcano_mod, only: volcano
    8688      use pindex_mod, only: pindex
     
    382384      real zdhdif(ngrid,nlayer)                             ! Turbdiff/vdifc routines.
    383385      real zdhadj(ngrid,nlayer)                             ! Convadj routine.
     386      real zdumolvis(ngrid,nlayer)                          ! Molecular viscosity (thermosphere)
     387      real zdvmolvis(ngrid,nlayer)                          ! Molecular viscosity (thermosphere)
    384388
    385389      ! For Pressure and Mass :
     
    541545         zdtlw(:,:) = 0.0
    542546         zdtconduc(:,:) = 0.0
     547         zdumolvis(:,:) = 0.0
     548         zdvmolvis(:,:) = 0.0
    543549
    544550!        Initialize fixed variable mu
     
    23842390! -------------------------
    23852391      if (callthermos) then
    2386         call conduction(ngrid,nlayer,nq,ptimestep,pplay,pplev,  &
    2387                           pt,tsurf,zzlev,zzlay,muvar,pq,firstcall,zdtconduc)
    2388         pdt(1:ngrid,1:nlayer)=pdt(1:ngrid,1:nlayer)+zdtconduc(1:ngrid,1:nlayer)
     2392
     2393        if (callconduc) then
     2394          call conduction(ngrid,nlayer,nq,ptimestep,pplay,pplev,  &
     2395                            pt,tsurf,zzlev,zzlay,muvar,pq,firstcall,zdtconduc)
     2396          pdt(1:ngrid,1:nlayer)=pdt(1:ngrid,1:nlayer)+zdtconduc(1:ngrid,1:nlayer)
     2397        endif
     2398     
     2399        if (callmolvis) then
     2400          ! u
     2401          call molvis(ngrid,nlayer,ptimestep,pplay,pplev,pt,pdt, &
     2402                      pu,zzlev,zzlay,zdumolvis)
     2403          pdu(1:ngrid,1:nlayer) = pdu(1:ngrid,1:nlayer) + zdumolvis(1:ngrid,1:nlayer)
     2404          ! v
     2405          call molvis(ngrid,nlayer,ptimestep,pplay,pplev,pt,pdt, &
     2406                      pv,zzlev,zzlay,zdvmolvis)
     2407          pdv(1:ngrid,1:nlayer) = pdv(1:ngrid,1:nlayer) + zdvmolvis(1:ngrid,1:nlayer)
     2408        endif
     2409
    23892410      endif ! of if (callthermos)
    23902411
Note: See TracChangeset for help on using the changeset viewer.