Changeset 4189


Ignore:
Timestamp:
Dec 19, 2019, 11:18:28 PM (5 years ago)
Author:
dubos
Message:

simple_physics : cleanup

Location:
dynamico_lmdz/simple_physics/phyparam
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • dynamico_lmdz/simple_physics/phyparam/param/iniphyparam.F

    r4184 r4189  
    1111      use comsaison
    1212      USE geometry_mod, ONLY : longitude,latitude,cell_area
    13       USE phys_const
    14       USE planet
    15 
     13      USE phys_const, ONLY : pi,rad,g,r,cpp,rcp,dtphys,unjours,mugaz
     14      USE planet, ONLY : coefir, coefvis
     15      USE planet, ONLY : aphelie, periheli, peri_day, obliquit, year_day
     16      USE vdif_mod, ONLY : lmixmin, emin_turb
    1617      IMPLICIT NONE
    1718
  • dynamico_lmdz/simple_physics/phyparam/param/paramdef.F

    r4184 r4189  
    11      SUBROUTINE paramdef(ngrid,rnatur,albedo,inertie,emissiv,z0)
    2       USE  comgeomfi, ONLY : lati,sinlat,coslat
    3       USE planet
     2      USE comgeomfi, ONLY : lati,sinlat,coslat
     3      USE vdif_mod, ONLY : lmixmin, emin_turb
     4      USE planet, ONLY : coefir, coefvis
     5      USE planet, ONLY : aphelie, periheli, obliquit, peri_day, year_day
    46      IMPLICIT NONE
    57c-----------------------------------------------------------------------
  • dynamico_lmdz/simple_physics/phyparam/physics/planet.F90

    r4187 r4189  
    44
    55  REAL :: aphelie, periheli, year_day, peri_day, obliquit, &
    6        coefvis, coefir, &
    7        lmixmin=100., emin_turb=1e-8
     6       coefvis, coefir
    87 
    98END MODULE planet
  • dynamico_lmdz/simple_physics/phyparam/physics/vdif_mod.F90

    r4188 r4189  
    55 
    66  REAL, PARAMETER :: karman=0.4
    7  
    8   PUBLIC :: vdif
     7  REAL :: lmixmin=100., emin_turb=1e-8 
     8
     9  PUBLIC :: vdif, lmixmin, emin_turb
    910 
    1011CONTAINS
    1112 
    12   SUBROUTINE vdif_cd( ngrid,pz0,pg,pz,pu,pv,pts,ph,pcdv,pcdh)
     13  PURE SUBROUTINE vdif_cd( ngrid,pz0,pg,pz,pu,pv,pts,ph,pcdv,pcdh)
    1314    !=======================================================================
    1415    !
     
    2526    !   ------
    2627    !     ngrid            size of the horizontal grid
     28    !     pz0(ngrid)       roughness length ?
    2729    !     pg               gravity (m s -2)
    2830    !     pz(ngrid)        height of the first atmospheric layer
     
    4648    !   ----------
    4749   
    48     INTEGER ngrid,nlay
    49     REAL pz0(ngrid)
    50     REAL pg,pz(ngrid)
    51     REAL pu(ngrid),pv(ngrid)
    52     REAL pts(ngrid),ph(ngrid)
    53     REAL pcdv(ngrid),pcdh(ngrid)
     50    INTEGER, INTENT(IN) ::  ngrid
     51    REAL, INTENT(IN)  ::  pg, pz0(ngrid), pz(ngrid), &
     52         pu(ngrid),pv(ngrid), pts(ngrid),ph(ngrid)
     53    REAL, INTENT(OUT) :: pcdv(ngrid),pcdh(ngrid)
    5454   
    5555    !   Local:
     
    5858    REAL, PARAMETER :: b=5., c=5., d=5., umin2=1e-12, &
    5959         c2b=2.*b, c3bc=3.*b*c, c3b=3.*b
    60  
    6160    INTEGER ig
    62    
    63     REAL zu2,z1,zri,zcd0,zz
    64    
     61    REAL zu2,z1,zri,zcd0,zz   
    6562   
    6663    !-----------------------------------------------------------------------
     
    9895  END SUBROUTINE vdif_cd
    9996 
    100  
    101   SUBROUTINE vdif_k(ngrid,nlay,   &
    102        ptimestep,pg,pzlev,pzlay,pz0,pu,pv,ph,pcdv,pkv,pkh)
     97  PURE SUBROUTINE vdif_k(ngrid,nlay,   &
     98       ptimestep,pg,pzlev,pzlay,pz0,pu,pv,ph,pkv,pkh)
    10399    ! FIXME : pkh := pkv
    104100    USE planet
    105     INTEGER ngrid,nlay
    106     REAL ptimestep
    107     REAL pzlay(ngrid,nlay),pzlev(ngrid,nlay+1)
    108     REAL pz0(ngrid)
    109     REAL pu(ngrid,nlay),pv(ngrid,nlay),ph(ngrid,nlay)
    110     REAL pg,pcdv(ngrid)
    111     REAL pkv(ngrid,nlay+1),pkh(ngrid,nlay+1)
     101    INTEGER, INTENT(IN) :: ngrid,nlay
     102    REAL, INTENT(IN) ::  ptimestep, pg, &
     103         pzlay(ngrid,nlay),pzlev(ngrid,nlay+1), pz0(ngrid), &
     104         pu(ngrid,nlay),pv(ngrid,nlay),ph(ngrid,nlay)
     105    REAL, INTENT(OUT) :: pkv(ngrid,nlay+1),pkh(ngrid,nlay+1)
    112106   
    113107    INTEGER ig,il
    114108    REAL zdu,zdv,zri,zdvodz2,zdz,z1,lmix
    115109   
    116     print*,'LMIXMIN',lmixmin
    117110    DO ig=1,ngrid
    118111       pkv(ig,1)=0.
     
    285278    !
    286279    CALL vdif_cd( ngrid,pz0,g,pzlay,pu,pv,ptsrf,ph,zcdv,zcdh)
    287     CALL vdif_k(ngrid,nlay,ptimestep,g,pzlev,pzlay,pz0,pu,pv,ph,zcdv,zkv,zkh)
     280    CALL vdif_k(ngrid,nlay,ptimestep,g,pzlev,pzlay,pz0,pu,pv,ph,zkv,zkh)
    288281   
    289282    DO ig=1,ngrid
     
    296289       PRINT*
    297290       PRINT*,'Diagnostique diffusion verticale'
     291       print*,'LMIXMIN',lmixmin
    298292       PRINT*,'coefficients Cd pour v et h'
    299293       PRINT*,zcdv(ngrid/2+1),zcdh(ngrid/2+1)
Note: See TracChangeset for help on using the changeset viewer.