source: codes/icosagcm/trunk/src/earth_const.f90 @ 404

Last change on this file since 404 was 404, checked in by dubos, 8 years ago

Towards moist dynamics - tested with DCMIP41

File size: 1.8 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_theta=1, thermo_entropy=2, thermo_moist=3
22  INTEGER, PUBLIC :: caldyn_thermo
23  !$OMP THREADPRIVATE(caldyn_thermo)
24
25  LOGICAL, SAVE :: boussinesq, hydrostatic
26  !$OMP THREADPRIVATE(boussinesq, hydrostatic)
27
28CONTAINS
29 
30  SUBROUTINE init_earth_const
31  USE getin_mod
32  IMPLICIT NONE
33  REAL(rstd) :: X=1
34 
35    CALL getin("radius",radius)
36    CALL getin("g",g)
37    CALL getin("scale_factor",scale_factor)
38    CALL getin("omega",omega) 
39    CALL getin("kappa",kappa) 
40    CALL getin("cpp",cpp) 
41    CALL getin("cppv",cppv)
42    CALL getin("Rv",Rv)
43    CALL getin("preff",preff) 
44    CALL getin("Treff",Treff) 
45    CALL getin("scale_height",scale_height)
46   
47    boussinesq=.FALSE.
48    CALL getin("boussinesq",boussinesq) 
49    hydrostatic=.TRUE.
50    CALL getin("hydrostatic",hydrostatic) 
51    IF(boussinesq .AND. .NOT. hydrostatic) THEN
52       PRINT *, 'boussinesq=.TRUE. and hydrostatic=.FALSE. : Non-hydrostatic boussinesq equations are not supported'
53       STOP
54    END IF
55   
56    mu=kappa/cpp
57    radius=radius/scale_factor
58    omega=omega*scale_factor
59   
60  END SUBROUTINE init_earth_const
61 
62 
63END MODULE earth_const
Note: See TracBrowser for help on using the repository browser.