1 | MODULE lmdz_ratqs_ini |
---|
2 | |
---|
3 | IMPLICIT NONE |
---|
4 | |
---|
5 | save |
---|
6 | |
---|
7 | integer :: lunout |
---|
8 | |
---|
9 | INTEGER, SAVE, PROTECTED :: nbsrf,is_lic,is_ter |
---|
10 | REAL, SAVE, PROTECTED :: RG,RV,RD,RCPD,RLSTT,RLVTT,RTT |
---|
11 | REAL, SAVE, PROTECTED :: a_ratqs_cv |
---|
12 | REAL, SAVE, PROTECTED :: tau_var |
---|
13 | REAL, SAVE, PROTECTED :: fac_tau |
---|
14 | REAL, SAVE, PROTECTED :: tau_cumul |
---|
15 | REAL, SAVE, PROTECTED :: a_ratqs_wake |
---|
16 | INTEGER, SAVE, PROTECTED :: dqimpl |
---|
17 | |
---|
18 | real, allocatable, SAVE :: povariance(:,:) |
---|
19 | !$OMP THREADPRIVATE(povariance) |
---|
20 | real, 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 | |
---|
26 | CONTAINS |
---|
27 | SUBROUTINE 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 | |
---|
31 | integer, intent(in) :: klon,klev,iflag_thermals,lunout_in |
---|
32 | integer, intent(in) :: nbsrf_in,is_lic_in,is_ter_in |
---|
33 | real, intent(in) :: RG_in,RV_in,RD_in,RCPD_in,RLSTT_in,RLVTT_in,RTT_in |
---|
34 | |
---|
35 | integer :: i,k |
---|
36 | |
---|
37 | nbsrf =nbsrf_in |
---|
38 | is_lic =is_lic_in |
---|
39 | is_ter =is_ter_in |
---|
40 | RG =RG_in |
---|
41 | RV =RV_in |
---|
42 | RD =RD_in |
---|
43 | RCPD =RCPD_in |
---|
44 | RLSTT =RLSTT_in |
---|
45 | RLVTT =RLVTT_in |
---|
46 | RTT =RTT_in |
---|
47 | |
---|
48 | print*,'ratqs_ini' |
---|
49 | if (iflag_thermals==15.or.iflag_thermals==16) then |
---|
50 | dqimpl=-1 |
---|
51 | else |
---|
52 | dqimpl=1 |
---|
53 | endif |
---|
54 | lunout=lunout_in |
---|
55 | |
---|
56 | allocate(povariance(klon,klev)) |
---|
57 | allocate(var_conv(klon,klev)) |
---|
58 | |
---|
59 | |
---|
60 | tau_var = 700. ! temps de relaxation de la variabilit?? pour les thermiques |
---|
61 | fac_tau = 2. |
---|
62 | tau_cumul = 1000 |
---|
63 | a_ratqs_wake = 3. ! param??tre pilotant l'importance du terme d??pendant des poches froides |
---|
64 | a_ratqs_cv = 1. |
---|
65 | CALL getin_p('tau_var', tau_var) |
---|
66 | CALL getin_p('fac_tau', fac_tau) |
---|
67 | CALL getin_p('tau_cumul', tau_cumul) |
---|
68 | CALL getin_p('a_ratqs_wake', a_ratqs_wake) |
---|
69 | CALL getin_p('a_ratqs_cv', a_ratqs_cv) |
---|
70 | |
---|
71 | !-------------------------------------------------------- |
---|
72 | ! Initialisation des variances pour la param??trisation |
---|
73 | ! pronostique des variances de Louis. |
---|
74 | ! Ne marche pour le moment qu'en 1D en forcant une |
---|
75 | ! initialisation des variances ?? une valeur constante. |
---|
76 | ! A terme la variance doit devenir une variable d'etat |
---|
77 | ! passee en argument |
---|
78 | !-------------------------------------------------------- |
---|
79 | |
---|
80 | if (klon.eq.1) then |
---|
81 | do k=1,klev |
---|
82 | do i=1,klon |
---|
83 | povariance(i,k) = 0.00000000001 |
---|
84 | var_conv(i,k) = 0.00000000001 |
---|
85 | enddo |
---|
86 | enddo |
---|
87 | else |
---|
88 | print*, 'conserver la variance dans les restarts' |
---|
89 | endif |
---|
90 | !-------------------------------------------------------- |
---|
91 | |
---|
92 | RETURN |
---|
93 | |
---|
94 | END SUBROUTINE ratqs_ini |
---|
95 | END MODULE lmdz_ratqs_ini |
---|