source: LMDZ.3.3/trunk/libf/phylmd/calcratqs.F @ 484

Last change on this file since 484 was 303, checked in by lmdz, 23 years ago

Probleme de flag_ratqs en cas d'utilisation de KE FH
LF

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.8 KB
Line 
1c $Header$
2      SUBROUTINE calcratqs (flag_ratqs,
3     I            paprs,pplay,q_seri,d_t_con,d_t_ajs
4     O           ,ratqs,zpt_conv)
5      IMPLICIT none
6c======================================================================
7c
8c Auteur(s) Z.X. Li (LMD/CNRS) date: 19930818
9c
10c Objet: Moniteur general de la physique du modele
11cAA      Modifications quant aux traceurs :
12cAA                  -  uniformisation des parametrisations ds phytrac
13cAA                  -  stockage des moyennes des champs necessaires
14cAA                     en mode traceur off-line
15c======================================================================
16c    modif   ( P. Le Van ,  12/10/98 )
17c
18c  Arguments:
19c
20c paprs---input-R-pression pour chaque inter-couche (en Pa)
21c pplay---input-R-pression pour le mileu de chaque couche (en Pa)
22c presnivs-input_R_pressions approximat. des milieux couches ( en PA)
23#include "dimensions.h"
24#include "dimphy.h"
25      REAL paprs(klon,klev+1)
26      REAL pplay(klon,klev)
27      REAL d_t_con(klon,klev)
28      REAL d_t_ajs(klon,klev)
29      REAL ratqs(klon,klev)
30      LOGICAL pt_conv(klon,klev)
31      REAL q_seri(klon,klev)
32
33      logical firstcall
34      save firstcall
35      data firstcall/.true./
36
37
38      REAL ratqsmin,ratqsmax,zx,epmax
39      REAL ratqs1,ratqs2,ratqs3,ratqs4
40      REAL ratqsc1,ratqsc2,ratqsc3,ratqsc4
41      INTEGER i,k
42      INTEGER flag_ratqs
43      save ratqsmin,ratqsmax,epmax
44      save ratqs1,ratqs2,ratqs3,ratqs4
45      save ratqsc1,ratqsc2,ratqsc3,ratqsc4
46      real zpt_conv(klon,klev)
47
48      REAL zx_min
49      PARAMETER (zx_min=1.0)
50      REAL zx_max
51      PARAMETER (zx_max=0.1)
52
53c
54c Appeler le processus de condensation a grande echelle
55c et le processus de precipitation
56c
57      if (flag_ratqs.eq.0) then
58
59         ratqsmax=0.01
60         ratqsmin=0.3
61
62         if (firstcall) print*,'RATQS ANCIEN '
63         do k=1,klev
64         do i=1,klon
65            zx = pplay(i,k)/paprs(i,1)
66            zx = (zx_max-zx)/(zx_max-zx_min)
67            zx = MIN(MAX(zx,0.0),1.0)
68            zx = zx * zx * zx
69            ratqs(i,k)= zx * (ratqsmax-ratqsmin) + ratqsmin
70         enddo
71         enddo
72
73      else
74
75c  On aplique un ratqs "interactif" a toutes les mailles affectees
76c  par la convection ou se trouvant "sous" une maille affectee.
77         do i=1,klon
78            pt_conv(i,klev)=.false.
79         enddo
80         do k=klev-1,1,-1
81            do i=1,klon
82               pt_conv(i,k)=pt_conv(i,k+1).or.
83     s               (abs(d_t_con(i,k))+abs(d_t_ajs(i,k))).gt.1.e-8
84               if(pt_conv(i,k)) then
85                  zpt_conv(i,k)=1.
86               else
87                  zpt_conv(i,k)=0.
88               endif
89            enddo
90         enddo
91
92         if (flag_ratqs.eq.1) then
93
94            ratqsmin=0.4
95            ratqsmax=0.99
96            if (firstcall) print*,'RATQS INTERACTIF '
97            do k=1,klev
98                do i=1,klon
99                   if (pt_conv(i,k)) then
100                      ratqs(i,k)=0.01
101     s                +0.25*(q_seri(i,1)-q_seri(i,k))/q_seri(i,k)
102                      ratqs(i,k)=min(ratqs(i,k),ratqsmax)
103                      ratqs(i,k)=max(ratqs(i,k),0.1)
104                   else
105                      ratqs(i,k)=0.01+(ratqsmin-0.01)*
106     s             min((paprs(i,1)-pplay(i,k))/(paprs(i,1)-30000.),1.)
107                   endif
108                enddo
109            enddo
110         else if (flag_ratqs.eq.2) then
111            do k=1,klev
112                do i=1,klon
113                   ratqs(i,k)=0.001+
114     s             (q_seri(i,1)-q_seri(i,k))/q_seri(i,k)
115                   if (pt_conv(i,k)) then
116                      ratqs(i,k)=min(ratqs(i,k),ratqsmax)
117                   else
118                      ratqs(i,k)=min(ratqs(i,k),ratqsmin)
119                   endif
120                enddo
121            enddo
122         else
123            do k=1,klev
124               do i=1,klon
125                  if (pplay(i,k).ge.95000.) then
126                     if (pt_conv(i,k)) then
127                        ratqs(i,k)=ratqsc1
128                     else
129                        ratqs(i,k)=ratqs1
130                     endif
131                  else if (pplay(i,k).ge.75000.) then
132                     if (pt_conv(i,k)) then
133                        ratqs(i,k)=ratqsc2
134                     else
135                        ratqs(i,k)=ratqs2
136                     endif
137                  else if (pplay(i,k).ge.50000.) then
138                     if (pt_conv(i,k)) then
139                        ratqs(i,k)=ratqsc3
140                     else
141                        ratqs(i,k)=ratqs3
142                     endif
143                  else
144                     if (pt_conv(i,k)) then
145                        ratqs(i,k)=ratqsc4
146                     else
147                        ratqs(i,k)=ratqs4
148                     endif
149                  endif
150               enddo
151            enddo
152         endif
153
154      endif
155
156      firstcall=.false.
157
158      return
159      end
Note: See TracBrowser for help on using the repository browser.