Ignore:
Timestamp:
05/03/19 13:25:21 (5 years ago)
Author:
dubos
Message:

devel : Cp(T) thermodynamics (TBC)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/src/base/earth_const.f90

    r834 r836  
    77! hence the variables set here are not THREADPRIVATE 
    88 
    9   REAL(rstd) :: g=9.80616 
    10   REAL(rstd) :: radius=6.37122E6 
     9! Some variable are BIND(C) to be accessible from Python 
     10 
     11  REAL(rstd), BIND(C) :: g=9.80616    ! acceleration of gravity assumed constant 
     12  REAL(rstd):: radius=6.37122E6 
    1113  REAL(rstd) :: omega=7.292E-5 
    1214  REAL(rstd) :: scale_factor=1. 
    1315  REAL(rstd),PARAMETER :: daysec=86400 
    1416 
    15   REAL(rstd) :: kappa=0.2857143 
    16   REAL(rstd) :: cpp=1004.70885 
    17   REAL(rstd) :: nu=0.35 ! exponent in variable-Cp law Cp=cpp*(T/Treff)^nu 
    18   REAL(rstd) :: cppv=1860. 
    19   REAL(rstd) :: Rv=461.5 
    20   REAL(rstd) :: Treff=273. 
    21   REAL(rstd) :: preff=101325. 
    22   REAL(rstd) :: pa=50000. ! default value set to preff/2 by disvert_std 
     17  REAL(rstd), BIND(C) ::   Treff=273.,     &   ! reference temperature, used in definition of entropy 
     18                           preff=101325.,  &   ! reference pressure, used in definition of entropy and theta 
     19                           cpp=1004.70885, &   ! specific heat at constant pressure at t=Treff for dry air 
     20                           cppv=1860.,     &   ! specific heat at constant pressure at t=Treff for water vapor 
     21                           Rd,             &   ! specific perfect gas constant for dry air 
     22                           Rv=461.5            ! specific perfect gas constant for water vapor 
     23 
     24  REAL(rstd) :: nu=0.35     ! exponent in variable-Cp law Cp=cpp*(T/Treff)^nu 
     25  REAL(rstd) :: pa=50000.   ! default value set to preff/2 by disvert_std 
    2326  REAL(rstd) :: scale_height=8000. ! atmospheric scale height (m) 
    2427  REAL(rstd) :: gas_constant = 8.3144621  
    25   REAL(rstd) :: Rd, mu             ! specific perfect gas constant and molar mass (?) 
     28  REAL(rstd) :: mu             ! molar mass (?) 
    2629 
    27   INTEGER, PUBLIC, PARAMETER :: thermo_none=-99, thermo_theta=1, thermo_entropy=2, thermo_variable_Cp=3, & 
     30  REAL(rstd) :: kappa=0.2857143 
     31 
     32  INTEGER, PARAMETER :: thermo_none=-99, thermo_theta=1, thermo_entropy=2, thermo_variable_Cp=3, & 
    2833       thermo_moist=4, thermo_boussinesq=5, thermo_dry=10, thermo_fake_moist=11, thermo_moist_debug=100 
    29   LOGICAL, PUBLIC :: boussinesq 
    30   INTEGER, PUBLIC :: caldyn_thermo, physics_thermo 
     34  LOGICAL :: boussinesq 
     35  INTEGER, BIND(C) :: caldyn_thermo, physics_thermo 
    3136 
    3237CONTAINS 
Note: See TracChangeset for help on using the changeset viewer.