GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: phylmd/lmdz_thermcell_ini.F90 Lines: 44 46 95.7 %
Date: 2023-06-30 12:51:15 Branches: 1 2 50.0 %

Line Branch Exec Source
1
MODULE lmdz_thermcell_ini
2
3
IMPLICIT NONE
4
5
save
6
7
   integer :: dvdq=1,dqimpl=-1,prt_level=0,lunout
8
   real RG,RD,RCPD,RKAPPA,RLVTT,RLvCp,RETV
9
   real           :: r_aspect_thermals,tau_thermals,fact_thermals_ed_dz
10
   integer        :: iflag_thermals_ed,iflag_thermals_optflux,iflag_thermals_closure
11
   integer        :: iflag_thermals_down
12
   real           :: fact_thermals_down
13
14
!$OMP THREADPRIVATE(dvdq,dqimpl,prt_level,lunout)
15
!$OMP THREADPRIVATE(RG,RD,RCPD,RKAPPA,RLVTT,RLvCp)
16
!$OMP THREADPRIVATE(r_aspect_thermals,tau_thermals,fact_thermals_ed_dz)
17
!$OMP THREADPRIVATE(iflag_thermals_ed,iflag_thermals_optflux,iflag_thermals_closure)
18
!$OMP THREADPRIVATE(iflag_thermals_down)
19
!$OMP THREADPRIVATE(fact_thermals_down)
20
21
22
   REAL, SAVE :: fact_epsilon=0.002
23
   REAL, SAVE :: betalpha=0.9
24
   REAL, SAVE :: afact=2./3.
25
   REAL, SAVE :: fact_shell=1.
26
   REAL,SAVE :: detr_min=1.e-5
27
   REAL,SAVE :: entr_min=1.e-5
28
   REAL,SAVE :: detr_q_coef=0.012
29
   REAL,SAVE :: detr_q_power=0.5
30
   REAL,SAVE :: mix0=0.
31
   INTEGER,SAVE :: thermals_flag_alim=0
32
33
!$OMP THREADPRIVATE(fact_epsilon, betalpha, afact, fact_shell)
34
!$OMP THREADPRIVATE(detr_min, entr_min, detr_q_coef, detr_q_power)
35
!$OMP THREADPRIVATE( mix0, thermals_flag_alim)
36
37
38
CONTAINS
39
40
1
SUBROUTINE thermcell_ini(iflag_thermals,prt_level_in,tau_thermals_in,lunout_in, &
41
   &    RG_in,RD_in,RCPD_in,RKAPPA_in,RLVTT_in,RETV_in)
42
43
   USE ioipsl_getin_p_mod, ONLY : getin_p
44
45
integer, intent(in) :: iflag_thermals,prt_level_in,lunout_in
46
real, intent(in) :: RG_in,RD_in,RCPD_in,RKAPPA_in,RLVTT_in,RETV_in,tau_thermals_in
47
48
1
print*,'thermcell_ini'
49
1
      if (iflag_thermals==15.or.iflag_thermals==16) then
50
         dvdq=0
51
         dqimpl=-1
52
      else
53
1
         dvdq=1
54
1
         dqimpl=1
55
      endif
56
1
   prt_level=prt_level_in
57
1
   RG=RG_in
58
1
   RD=RD_in
59
1
   RCPD=RCPD_in
60
1
   RKAPPA=RKAPPA_in
61
1
   RLVTT=RLVTT_in
62
1
   RLvCp = RLVTT/RCPD
63
1
   RETV=RETV_in
64
1
   tau_thermals=tau_thermals_in
65
1
   lunout=lunout_in
66
67
68
!=====================================================================
69
! a la fois les vieilles param et thermcell_main :
70
!=====================================================================
71
72
1
   r_aspect_thermals=2.
73
1
   CALL getin_p('r_aspect_thermals',r_aspect_thermals)
74
75
1
   tau_thermals = 0.
76
1
   CALL getin_p('tau_thermals',tau_thermals)
77
78
1
   fact_thermals_ed_dz = 0.1
79
1
   CALL getin_p('fact_thermals_ed_dz',fact_thermals_ed_dz)
80
81
1
   fact_thermals_ed_dz = 0.1
82
1
   CALL getin_p('fact_thermals_ed_dz',fact_thermals_ed_dz)
83
84
1
   iflag_thermals_ed = 0
85
1
   CALL getin_p('iflag_thermals_ed',iflag_thermals_ed)
86
87
1
   iflag_thermals_optflux = 0
88
1
   CALL getin_p('iflag_thermals_optflux',iflag_thermals_optflux)
89
90
1
   iflag_thermals_closure = 1
91
1
   CALL getin_p('iflag_thermals_closure',iflag_thermals_closure)
92
93
1
   iflag_thermals_down = 0
94
1
   CALL getin_p('iflag_thermals_down',iflag_thermals_down)
95
96
1
   fact_thermals_down = 0.5
97
1
   CALL getin_p('fact_thermals_down',fact_thermals_down)
98
99
1
     CALL getin_p('thermals_fact_epsilon',fact_epsilon)
100
1
     CALL getin_p('thermals_betalpha',betalpha)
101
1
     CALL getin_p('thermals_afact',afact)
102
1
     CALL getin_p('thermals_fact_shell',fact_shell)
103
1
     CALL getin_p('thermals_detr_min',detr_min)
104
1
     CALL getin_p('thermals_entr_min',entr_min)
105
1
     CALL getin_p('thermals_detr_q_coef',detr_q_coef)
106
1
     CALL getin_p('thermals_detr_q_power',detr_q_power)
107
1
     CALL getin_p('thermals_mix0',mix0)
108
1
     CALL getin_p('thermals_flag_alim',thermals_flag_alim)
109
110
111
1
 RETURN
112
113
END SUBROUTINE thermcell_ini
114
END MODULE lmdz_thermcell_ini