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

Last change on this file since 366 was 366, checked in by dubos, 9 years ago

Progress towards NH

File size: 1.5 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 :: preff=101325.
12  REAL(rstd),SAVE :: pa=50000.
13  REAL(rstd),SAVE :: scale_height=8000. ! atmospheric scale height (m)
14  REAL(rstd),SAVE :: scale_factor=1.
15  REAL(rstd),SAVE :: gas_constant = 8.3144621 
16  REAL(rstd),SAVE :: mu                 ! molar mass of the atmosphere
17
18  LOGICAL, SAVE :: boussinesq, hydrostatic
19
20CONTAINS
21 
22  SUBROUTINE init_earth_const
23  USE getin_mod
24  IMPLICIT NONE
25  REAL(rstd) :: X=1
26 
27    CALL getin("radius",radius)
28    CALL getin("g",g)
29    CALL getin("scale_factor",scale_factor)
30    CALL getin("omega",omega) 
31    CALL getin("kappa",kappa) 
32    CALL getin("cpp",cpp) 
33    CALL getin("preff",preff) 
34    CALL getin("scale_height",scale_height)
35   
36    boussinesq=.FALSE.
37    CALL getin("boussinesq",boussinesq) 
38    hydrostatic=.TRUE.
39    CALL getin("hydrostatic",hydrostatic) 
40    IF(boussinesq .AND. .NOT. hydrostatic) THEN
41       PRINT *, 'boussinesq=.TRUE. and hydrostatic=.FALSE. : Non-hydrostatic boussinesq equations are not supported'
42       STOP
43    END IF
44   
45    mu=kappa/cpp
46    radius=radius/scale_factor
47    omega=omega*scale_factor
48   
49  END SUBROUTINE init_earth_const
50 
51 
52END MODULE earth_const
Note: See TracBrowser for help on using the repository browser.