Ignore:
Timestamp:
Aug 20, 2025, 4:25:12 PM (3 days ago)
Author:
emillour
Message:

Mars PCM:
Some code tidying:

  • turn aeroptproperties, albedocaps, cvmgp and convadj into modules
  • remove useless check in callradite
  • clean module vlz_fi (remove obsolete #ifdef CRAY cpp alternatives)
  • remove function cvmgp since it was only called under #ifdef CRAY in vlz_fi

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/vlz_fi.F

    r3727 r3901  
    1010c
    1111c    ********************************************************************
    12 c     Shema  d'advection " pseudo amont " dans la verticale
    13 c    pour appel dans la physique (sedimentation)
     12c    "pseudo upstream" Advection scheme along the vertical
     13c    to be used in the physics (sedimentation)
    1414c    ********************************************************************
    15 c    q rapport de melange (kg/kg)...
    16 c    masse : masse de la couche Dp/g
    17 c    w : masse d'atm ``transferee'' a chaque pas de temps (kg.m-2)
    18 c    pente_max = 2 conseillee
    19 c
    20 c
    21 c   --------------------------------------------------------------------
     15
    2216      IMPLICIT NONE
    2317c
     
    2923      integer,intent(in) :: ngrid ! number of atmospheric columns
    3024      integer,intent(in) :: nlay ! number of atmospheric layers
    31       real masse(ngrid,nlay),pente_max
    32       REAL q(ngrid,nlay)
    33       REAL w(ngrid,nlay)
    34       REAL wq(ngrid,nlay+1)
     25      real,intent(in) :: masse(ngrid,nlay) ! mass of atmospheric layer delta(P)/g
     26      real,intent(in) :: pente_max ! maximum slope for the scheme (2 is recommended)
     27      real,intent(inout) :: q(ngrid,nlay) ! tracer mixing ratio (kg/kg)
     28      real,intent(inout) :: w(ngrid,nlay) ! mass of atmosphere "transfered" over the time step (kg.m-2)
     29      real,intent(out) :: wq(ngrid,nlay+1) ! trancer increment due to advection (kg)
    3530c
    3631c      Local
     
    4540      integer m
    4641
    47       REAL      SSUM,CVMGP,CVMGT
    48       integer ismax,ismin
    4942
    50 
    51 c    On oriente tout dans le sens de la pression c'est a dire dans le
    52 c    sens de W
     43c    Orientation follows pressure, i.e. follows W
    5344
    5445      do l=2,nlay
     
    6152      do l=2,nlay-1
    6253         do ij=1,ngrid
    63 #ifdef CRAY
    64             dzq(ij,l)=0.5*
    65      ,      cvmgp(dzqw(ij,l)+dzqw(ij,l+1),0.,dzqw(ij,l)*dzqw(ij,l+1))
    66 #else
    6754            if(dzqw(ij,l)*dzqw(ij,l+1).gt.0.) then
    6855                dzq(ij,l)=0.5*(dzqw(ij,l)+dzqw(ij,l+1))
     
    7057                dzq(ij,l)=0.
    7158            endif
    72 #endif
     59
    7360            dzqmax=pente_max*min(adzqw(ij,l),adzqw(ij,l+1))
    7461            dzq(ij,l)=sign(min(abs(dzq(ij,l)),dzqmax),dzq(ij,l))
     
    8168      enddo
    8269c ---------------------------------------------------------------
    83 c   .... calcul des termes d'advection verticale  .......
     70c   .... compute vertical advection terms   .......
    8471c ---------------------------------------------------------------
    8572
    86 c calcul de  - d( q   * w )/ d(sigma)    qu'on ajoute a  dq pour calculer dq
     73c compute  - d( q   * w )/ d(sigma) , later added to dq to compute dq
    8774c
    8875c      No flux at the model top:
Note: See TracChangeset for help on using the changeset viewer.