source: LMDZ6/branches/Ocean_skin/libf/phylmd/thermcell_ini_mod.F90 @ 5434

Last change on this file since 5434 was 4368, checked in by lguez, 2 years ago

Sync latest trunk changes to Ocean_skin

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