source: LMDZ6/branches/LMDZ_ECRad/libf/phylmd/lmdz_ratqs_ini.F90

Last change on this file was 4727, checked in by idelkadi, 14 months ago

Merged trunk changes -r4488:4726 LMDZ_ECRad branch

File size: 1.9 KB
Line 
1MODULE lmdz_ratqs_ini
2
3IMPLICIT NONE
4
5save
6
7integer :: lunout
8
9INTEGER, SAVE, PROTECTED :: nbsrf,is_lic,is_ter
10REAL, SAVE, PROTECTED :: RG,RV,RD,RCPD,RLSTT,RLVTT,RTT
11REAL, SAVE, PROTECTED :: a_ratqs_cv
12REAL, SAVE, PROTECTED :: tau_var
13REAL, SAVE, PROTECTED :: fac_tau
14REAL, SAVE, PROTECTED :: tau_cumul
15REAL, SAVE, PROTECTED :: a_ratqs_wake
16INTEGER, SAVE, PROTECTED :: dqimpl
17
18real, allocatable, SAVE :: povariance(:,:)
19!$OMP THREADPRIVATE(povariance)
20real, allocatable, SAVE :: var_conv(:,:)
21!$OMP THREADPRIVATE(var_conv)
22
23!$OMP THREADPRIVATE(a_ratqs_cv,tau_var,fac_tau,tau_cumul,a_ratqs_wake)
24
25
26CONTAINS
27SUBROUTINE ratqs_ini(klon,klev,iflag_thermals,lunout_in,nbsrf_in,is_lic_in,is_ter_in,RG_in,RV_in,RD_in,RCPD_in,RLSTT_in,RLVTT_in,RTT_in)
28
29   USE ioipsl_getin_p_mod, ONLY : getin_p
30
31integer, intent(in) :: klon,klev,iflag_thermals,lunout_in
32integer, intent(in) :: nbsrf_in,is_lic_in,is_ter_in
33real, intent(in) :: RG_in,RV_in,RD_in,RCPD_in,RLSTT_in,RLVTT_in,RTT_in
34
35integer :: i,k
36
37nbsrf   =nbsrf_in
38is_lic  =is_lic_in
39is_ter  =is_ter_in
40RG      =RG_in   
41RV      =RV_in
42RD      =RD_in
43RCPD    =RCPD_in
44RLSTT   =RLSTT_in
45RLVTT   =RLVTT_in
46RTT     =RTT_in
47
48print*,'ratqs_ini'
49if (iflag_thermals==15.or.iflag_thermals==16) then
50   dqimpl=-1
51else
52   dqimpl=1
53endif
54lunout=lunout_in
55
56allocate(povariance(klon,klev))
57allocate(var_conv(klon,klev))
58
59
60tau_var = 700. ! temps de relaxation de la variabilité pour les thermiques
61fac_tau = 2.
62tau_cumul = 1000
63a_ratqs_wake = 3.    ! paramètre pilotant l'importance du terme dépendant des poches froides
64a_ratqs_cv = 1.
65CALL getin_p('tau_var', tau_var)
66CALL getin_p('fac_tau', fac_tau)
67CALL getin_p('tau_cumul', tau_cumul)
68CALL getin_p('a_ratqs_wake', a_ratqs_wake)
69CALL getin_p('a_ratqs_cv', a_ratqs_cv)         
70do k=1,klev
71  do i=1,klon
72   povariance(i,k) = 0.00001
73   var_conv(i,k) = 0.
74  enddo
75enddo
76
77 RETURN
78
79END SUBROUTINE ratqs_ini
80END MODULE lmdz_ratqs_ini
Note: See TracBrowser for help on using the repository browser.