source: LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_ratqs_ini.F90 @ 5158

Last change on this file since 5158 was 5158, checked in by abarral, 3 months ago

Add missing klon on strataer_emiss_mod.F90
Correct various missing explicit declarations
Replace tabs by spaces (tabs are not part of the fortran charset)
Continue cleaning modules
Removed unused arguments and variables

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