source: codes/icosagcm/trunk/src/base/earth_const.f90 @ 553

Last change on this file since 553 was 553, checked in by dubos, 7 years ago

trunk : backported commit 534 from devel

File size: 2.1 KB
Line 
1MODULE earth_const
2  USE prec
3  USE math_const
4 
5  REAL(rstd),SAVE :: radius=6.37122E6
6  REAL(rstd),SAVE :: g=9.80616
7  REAL(rstd),PARAMETER :: daysec=86400
8  REAL(rstd),SAVE :: omega=7.292E-5
9  REAL(rstd),SAVE :: kappa=0.2857143
10  REAL(rstd),SAVE :: cpp=1004.70885
11  REAL(rstd),SAVE :: cppv=1860.
12  REAL(rstd),SAVE :: Rv=461.5
13  REAL(rstd),SAVE :: Treff=273.
14  REAL(rstd),SAVE :: preff=101325.
15  REAL(rstd),SAVE :: pa=50000.
16  REAL(rstd),SAVE :: scale_height=8000. ! atmospheric scale height (m)
17  REAL(rstd),SAVE :: scale_factor=1.
18  REAL(rstd),SAVE :: gas_constant = 8.3144621 
19  REAL(rstd),SAVE :: mu                 ! molar mass of the atmosphere
20
21  INTEGER, PARAMETER,PUBLIC :: thermo_none=-99, thermo_theta=1, thermo_entropy=2, &
22       thermo_moist=3, thermo_boussinesq=4, thermo_dry=10, thermo_fake_moist=11, thermo_moist_debug=100
23  INTEGER, PUBLIC :: caldyn_thermo, physics_thermo
24  !$OMP THREADPRIVATE(caldyn_thermo)
25  !$OMP THREADPRIVATE(physics_thermo)
26
27  LOGICAL, SAVE :: boussinesq, hydrostatic
28  !$OMP THREADPRIVATE(boussinesq)
29  !$OMP THREADPRIVATE(hydrostatic)
30
31CONTAINS
32 
33  SUBROUTINE init_earth_const
34  USE getin_mod
35  IMPLICIT NONE
36  REAL(rstd) :: X=1
37 
38    CALL getin("radius",radius)
39    CALL getin("g",g)
40    CALL getin("scale_factor",scale_factor)
41    CALL getin("omega",omega) 
42    CALL getin("kappa",kappa) 
43    CALL getin("cpp",cpp) 
44    CALL getin("cppv",cppv)
45    CALL getin("Rv",Rv)
46    CALL getin("preff",preff) 
47    CALL getin("Treff",Treff) 
48    CALL getin("scale_height",scale_height)
49   
50    boussinesq=.FALSE.
51    CALL getin("boussinesq",boussinesq) 
52    PRINT *, "Note : key boussinesq is deprecated, use thermo=boussinesq instead"
53    IF(boussinesq) STOP
54    hydrostatic=.TRUE.
55    CALL getin("hydrostatic",hydrostatic) 
56    IF(boussinesq .AND. .NOT. hydrostatic) THEN
57       PRINT *, 'boussinesq=.TRUE. and hydrostatic=.FALSE. : Non-hydrostatic boussinesq equations are not supported'
58       STOP
59    END IF
60   
61    mu=kappa/cpp
62    radius=radius/scale_factor
63    omega=omega*scale_factor
64   
65  END SUBROUTINE init_earth_const
66 
67 
68END MODULE earth_const
Note: See TracBrowser for help on using the repository browser.