GCC Code Coverage Report


Directory: ./
File: dyn3d_common/iniconst.f90
Date: 2022-01-11 19:19:34
Exec Total Coverage
Lines: 22 27 81.5%
Branches: 2 6 33.3%

Line Branch Exec Source
1 !
2 ! $Id: iniconst.F90 2601 2016-07-24 09:51:55Z emillour $
3 !
4 2 SUBROUTINE iniconst
5
6 USE control_mod
7 use IOIPSL
8 USE comconst_mod, ONLY: im, imp1, jm, jmp1, lllm, lllmm1, lllmp1, &
9 unsim, pi, r, kappa, cpp, dtvr, dtphys
10 USE comvert_mod, ONLY: disvert_type, pressure_exner
11
12 IMPLICIT NONE
13 !
14 ! P. Le Van
15 !
16 ! Declarations:
17 ! -------------
18 !
19 include "dimensions.h"
20 include "paramet.h"
21 include "iniprint.h"
22
23 character(len=*),parameter :: modname="iniconst"
24 character(len=80) :: abort_message
25 !
26 !
27 !
28 !-----------------------------------------------------------------------
29 ! dimension des boucles:
30 ! ----------------------
31
32 1 im = iim
33 1 jm = jjm
34 1 lllm = llm
35 1 imp1 = iim
36 1 jmp1 = jjm + 1
37 1 lllmm1 = llm - 1
38 1 lllmp1 = llm + 1
39
40 !-----------------------------------------------------------------------
41
42 1 dtphys = iphysiq * dtvr
43 1 unsim = 1./iim
44 1 pi = 2.*ASIN( 1. )
45
46 !-----------------------------------------------------------------------
47 !
48
49 1 r = cpp * kappa
50
51 1 write(lunout,*) trim(modname),': R CP Kappa ',r,cpp,kappa
52 !
53 !-----------------------------------------------------------------------
54
55 ! vertical discretization: default behavior depends on planet_type flag
56
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 if (planet_type=="earth") then
57 1 disvert_type=1
58 else
59 disvert_type=2
60 endif
61 ! but user can also specify using one or the other in run.def:
62 1 call getin('disvert_type',disvert_type)
63 1 write(lunout,*) trim(modname),': disvert_type=',disvert_type
64
65 1 pressure_exner = disvert_type == 1 ! default value
66 1 call getin('pressure_exner', pressure_exner)
67
68
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 if (disvert_type==1) then
69 ! standard case for Earth (automatic generation of levels)
70 1 call disvert()
71 else if (disvert_type==2) then
72 ! standard case for planets (levels generated using z2sig.def file)
73 call disvert_noterre
74 else
75 write(abort_message,*) "Wrong value for disvert_type: ", disvert_type
76 call abort_gcm(modname,abort_message,0)
77 endif
78
79 1 END SUBROUTINE iniconst
80