source: LMDZ5/branches/testing/libf/phylmd/nuage.F90 @ 2056

Last change on this file since 2056 was 2056, checked in by Laurent Fairhead, 10 years ago

Merged trunk changes r1997:2055 into testing branch

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 12.9 KB
Line 
1! $Id: nuage.F90 2056 2014-06-11 13:46:46Z fairhead $
2
3SUBROUTINE nuage(paprs, pplay, t, pqlwp, pclc, pcltau, pclemi, pch, pcl, pcm, &
4    pct, pctlwp, ok_aie, mass_solu_aero, mass_solu_aero_pi, bl95_b0, bl95_b1, &
5    cldtaupi, re, fl)
6  USE dimphy
7  USE microphys_mod ! cloud microphysics (JBM 3/14)
8  IMPLICIT NONE
9  ! ======================================================================
10  ! Auteur(s): Z.X. Li (LMD/CNRS) date: 19930910
11  ! Objet: Calculer epaisseur optique et emmissivite des nuages
12  ! ======================================================================
13  ! Arguments:
14  ! t-------input-R-temperature
15  ! pqlwp---input-R-eau liquide nuageuse dans l'atmosphere (kg/kg)
16  ! pclc----input-R-couverture nuageuse pour le rayonnement (0 a 1)
17  ! ok_aie--input-L-apply aerosol indirect effect or not
18  ! mass_solu_aero-----input-R-total mass concentration for all soluble
19  ! aerosols[ug/m^3]
20  ! mass_solu_aero_pi--input-R-dito, pre-industrial value
21  ! bl95_b0-input-R-a parameter, may be varied for tests (s-sea, l-land)
22  ! bl95_b1-input-R-a parameter, may be varied for tests (    -"-      )
23
24  ! cldtaupi-output-R-pre-industrial value of cloud optical thickness,
25  ! needed for the diagnostics of the aerosol indirect
26  ! radiative forcing (see radlwsw)
27  ! re------output-R-Cloud droplet effective radius multiplied by fl [um]
28  ! fl------output-R-Denominator to re, introduced to avoid problems in
29  ! the averaging of the output. fl is the fraction of liquid
30  ! water clouds within a grid cell
31
32  ! pcltau--output-R-epaisseur optique des nuages
33  ! pclemi--output-R-emissivite des nuages (0 a 1)
34  ! ======================================================================
35
36  include "YOMCST.h"
37  include "nuage.h" ! JBM 3/14
38
39  ! ym#include "dimensions.h"
40  ! ym#include "dimphy.h"
41  REAL paprs(klon, klev+1), pplay(klon, klev)
42  REAL t(klon, klev)
43
44  REAL pclc(klon, klev)
45  REAL pqlwp(klon, klev)
46  REAL pcltau(klon, klev), pclemi(klon, klev)
47
48  REAL pct(klon), pctlwp(klon), pch(klon), pcl(klon), pcm(klon)
49
50  LOGICAL lo
51
52  REAL cetahb, cetamb
53  PARAMETER (cetahb=0.45, cetamb=0.80)
54
55  INTEGER i, k
56  REAL zflwp, zradef, zfice, zmsac
57
58  REAL radius, rad_chaud
59! JBM (3/14) parameters already defined in nuage.h:
60! REAL rad_froid, rad_chau1, rad_chau2
61! PARAMETER (rad_chau1=13.0, rad_chau2=9.0, rad_froid=35.0)
62  ! cc      PARAMETER (rad_chaud=15.0, rad_froid=35.0)
63  ! sintex initial      PARAMETER (rad_chaud=10.0, rad_froid=30.0)
64  REAL coef, coef_froi, coef_chau
65  PARAMETER (coef_chau=0.13, coef_froi=0.09)
66  REAL seuil_neb
67  PARAMETER (seuil_neb=0.001)
68! JBM (3/14) nexpo is replaced by exposant_glace
69! REAL nexpo ! exponentiel pour glace/eau
70! PARAMETER (nexpo=6.)
71  REAL, PARAMETER :: t_glace_min_old = 258.
72  INTEGER, PARAMETER :: exposant_glace_old = 6
73
74
75  ! jq for the aerosol indirect effect
76  ! jq introduced by Johannes Quaas (quaas@lmd.jussieu.fr), 27/11/2003
77  ! jq
78  LOGICAL ok_aie ! Apply AIE or not?
79
80  REAL mass_solu_aero(klon, klev) ! total mass concentration for all soluble aerosols[ug m-3]
81  REAL mass_solu_aero_pi(klon, klev) ! - " - pre-industrial value
82  REAL cdnc(klon, klev) ! cloud droplet number concentration [m-3]
83  REAL re(klon, klev) ! cloud droplet effective radius [um]
84  REAL cdnc_pi(klon, klev) ! cloud droplet number concentration [m-3] (pi value)
85  REAL re_pi(klon, klev) ! cloud droplet effective radius [um] (pi value)
86
87  REAL fl(klon, klev) ! xliq * rneb (denominator to re; fraction of liquid water clouds
88  ! within the grid cell)
89
90  REAL bl95_b0, bl95_b1 ! Parameter in B&L 95-Formula
91
92  REAL cldtaupi(klon, klev) ! pre-industrial cloud opt thickness for diag
93  ! jq-end
94
95  ! cc      PARAMETER (nexpo=1)
96
97  ! Calculer l'epaisseur optique et l'emmissivite des nuages
98
99  DO k = 1, klev
100    DO i = 1, klon
101      rad_chaud = rad_chau1
102      IF (k<=3) rad_chaud = rad_chau2
103
104      pclc(i, k) = max(pclc(i,k), seuil_neb)
105      zflwp = 1000.*pqlwp(i, k)/rg/pclc(i, k)*(paprs(i,k)-paprs(i,k+1))
106      IF (iflag_t_glace.EQ.0) THEN
107        zfice = 1.0 - (t(i,k)-t_glace_min_old)/(273.13-t_glace_min_old)
108        zfice = min(max(zfice,0.0), 1.0)
109        zfice = zfice**exposant_glace_old
110      ELSE ! of IF (iflag_t_glace.EQ.0)
111! JBM: icefrac_lsc is now a function contained in microphys_mod
112        zfice = icefrac_lsc(t(i,k), t_glace_min, &
113                            t_glace_max, exposant_glace)
114      ENDIF
115
116      IF (ok_aie) THEN
117          ! Formula "D" of Boucher and Lohmann, Tellus, 1995
118          !
119        cdnc(i, k) = 10.**(bl95_b0+bl95_b1*log(max(mass_solu_aero(i,k), &
120          1.E-4))/log(10.))*1.E6 !-m-3
121          ! Cloud droplet number concentration (CDNC) is restricted
122          ! to be within [20, 1000 cm^3]
123          !
124        cdnc(i, k) = min(1000.E6, max(20.E6,cdnc(i,k)))
125        cdnc_pi(i, k) = 10.**(bl95_b0+bl95_b1*log(max(mass_solu_aero_pi(i,k), &
126          1.E-4))/log(10.))*1.E6 !-m-3
127        cdnc_pi(i, k) = min(1000.E6, max(20.E6,cdnc_pi(i,k)))
128          !
129          !
130          ! air density: pplay(i,k) / (RD * zT(i,k))
131          ! factor 1.1: derive effective radius from volume-mean radius
132          ! factor 1000 is the water density
133          ! _chaud means that this is the CDR for liquid water clouds
134          !
135        rad_chaud = 1.1*((pqlwp(i,k)*pplay(i,k)/(rd*t(i,k)))/(4./3.*rpi*1000. &
136          *cdnc(i,k)))**(1./3.)
137          !
138          ! Convert to um. CDR shall be at least 3 um.
139          !
140        rad_chaud = max(rad_chaud*1.E6, 3.)
141
142          ! For output diagnostics
143          !
144          ! Cloud droplet effective radius [um]
145          !
146          ! we multiply here with f * xl (fraction of liquid water
147          ! clouds in the grid cell) to avoid problems in the
148          ! averaging of the output.
149          ! In the output of IOIPSL, derive the real cloud droplet
150          ! effective radius as re/fl
151          !
152        fl(i, k) = pclc(i, k)*(1.-zfice)
153        re(i, k) = rad_chaud*fl(i, k)
154
155          ! Pre-industrial cloud opt thickness
156          !
157          ! "radius" is calculated as rad_chaud above (plus the
158          ! ice cloud contribution) but using cdnc_pi instead of
159          ! cdnc.
160        radius = max(1.1E6*((pqlwp(i,k)*pplay(i,k)/(rd*t(i,k)))/(4./3.*rpi* &
161          1000.*cdnc_pi(i,k)))**(1./3.), 3.)*(1.-zfice) + rad_froid*zfice
162        cldtaupi(i, k) = 3.0/2.0*zflwp/radius
163      END IF ! ok_aie
164
165      radius = rad_chaud*(1.-zfice) + rad_froid*zfice
166      coef = coef_chau*(1.-zfice) + coef_froi*zfice
167      pcltau(i, k) = 3.0/2.0*zflwp/radius
168      pclemi(i, k) = 1.0 - exp(-coef*zflwp)
169      lo = (pclc(i,k)<=seuil_neb)
170      IF (lo) pclc(i, k) = 0.0
171      IF (lo) pcltau(i, k) = 0.0
172      IF (lo) pclemi(i, k) = 0.0
173
174      IF (.NOT. ok_aie) cldtaupi(i, k) = pcltau(i, k)
175    END DO
176  END DO
177  ! cc      DO k = 1, klev
178  ! cc      DO i = 1, klon
179  ! cc         t(i,k) = t(i,k)
180  ! cc         pclc(i,k) = MAX( 1.e-5 , pclc(i,k) )
181  ! cc         lo = pclc(i,k) .GT. (2.*1.e-5)
182  ! cc         zflwp = pqlwp(i,k)*1000.*(paprs(i,k)-paprs(i,k+1))
183  ! cc     .          /(rg*pclc(i,k))
184  ! cc         zradef = 10.0 + (1.-sigs(k))*45.0
185  ! cc         pcltau(i,k) = 1.5 * zflwp / zradef
186  ! cc         zfice=1.0-MIN(MAX((t(i,k)-263.)/(273.-263.),0.0),1.0)
187  ! cc         zmsac = 0.13*(1.0-zfice) + 0.08*zfice
188  ! cc         pclemi(i,k) = 1.-EXP(-zmsac*zflwp)
189  ! cc         if (.NOT.lo) pclc(i,k) = 0.0
190  ! cc         if (.NOT.lo) pcltau(i,k) = 0.0
191  ! cc         if (.NOT.lo) pclemi(i,k) = 0.0
192  ! cc      ENDDO
193  ! cc      ENDDO
194  ! ccccc      print*, 'pas de nuage dans le rayonnement'
195  ! ccccc      DO k = 1, klev
196  ! ccccc      DO i = 1, klon
197  ! ccccc         pclc(i,k) = 0.0
198  ! ccccc         pcltau(i,k) = 0.0
199  ! ccccc         pclemi(i,k) = 0.0
200  ! ccccc      ENDDO
201  ! ccccc      ENDDO
202
203  ! COMPUTE CLOUD LIQUID PATH AND TOTAL CLOUDINESS
204
205  DO i = 1, klon
206    pct(i) = 1.0
207    pch(i) = 1.0
208    pcm(i) = 1.0
209    pcl(i) = 1.0
210    pctlwp(i) = 0.0
211  END DO
212
213  DO k = klev, 1, -1
214    DO i = 1, klon
215      pctlwp(i) = pctlwp(i) + pqlwp(i, k)*(paprs(i,k)-paprs(i,k+1))/rg
216      pct(i) = pct(i)*(1.0-pclc(i,k))
217      IF (pplay(i,k)<=cetahb*paprs(i,1)) pch(i) = pch(i)*(1.0-pclc(i,k))
218      IF (pplay(i,k)>cetahb*paprs(i,1) .AND. pplay(i,k)<=cetamb*paprs(i,1)) &
219        pcm(i) = pcm(i)*(1.0-pclc(i,k))
220      IF (pplay(i,k)>cetamb*paprs(i,1)) pcl(i) = pcl(i)*(1.0-pclc(i,k))
221    END DO
222  END DO
223
224  DO i = 1, klon
225    pct(i) = 1. - pct(i)
226    pch(i) = 1. - pch(i)
227    pcm(i) = 1. - pcm(i)
228    pcl(i) = 1. - pcl(i)
229  END DO
230
231  RETURN
232END SUBROUTINE nuage
233SUBROUTINE diagcld1(paprs, pplay, rain, snow, kbot, ktop, diafra, dialiq)
234  USE dimphy
235  IMPLICIT NONE
236
237  ! Laurent Li (LMD/CNRS), le 12 octobre 1998
238  ! (adaptation du code ECMWF)
239
240  ! Dans certains cas, le schema pronostique des nuages n'est
241  ! pas suffisament performant. On a donc besoin de diagnostiquer
242  ! ces nuages. Je dois avouer que c'est une frustration.
243
244  ! ym#include "dimensions.h"
245  ! ym#include "dimphy.h"
246  include "YOMCST.h"
247
248  ! Arguments d'entree:
249  REAL paprs(klon, klev+1) ! pression (Pa) a inter-couche
250  REAL pplay(klon, klev) ! pression (Pa) au milieu de couche
251  REAL t(klon, klev) ! temperature (K)
252  REAL q(klon, klev) ! humidite specifique (Kg/Kg)
253  REAL rain(klon) ! pluie convective (kg/m2/s)
254  REAL snow(klon) ! neige convective (kg/m2/s)
255  INTEGER ktop(klon) ! sommet de la convection
256  INTEGER kbot(klon) ! bas de la convection
257
258  ! Arguments de sortie:
259  REAL diafra(klon, klev) ! fraction nuageuse diagnostiquee
260  REAL dialiq(klon, klev) ! eau liquide nuageuse
261
262  ! Constantes ajustables:
263  REAL canva, canvb, canvh
264  PARAMETER (canva=2.0, canvb=0.3, canvh=0.4)
265  REAL cca, ccb, ccc
266  PARAMETER (cca=0.125, ccb=1.5, ccc=0.8)
267  REAL ccfct, ccscal
268  PARAMETER (ccfct=0.400)
269  PARAMETER (ccscal=1.0E+11)
270  REAL cetahb, cetamb
271  PARAMETER (cetahb=0.45, cetamb=0.80)
272  REAL cclwmr
273  PARAMETER (cclwmr=1.E-04)
274  REAL zepscr
275  PARAMETER (zepscr=1.0E-10)
276
277  ! Variables locales:
278  INTEGER i, k
279  REAL zcc(klon)
280
281  ! Initialisation:
282
283  DO k = 1, klev
284    DO i = 1, klon
285      diafra(i, k) = 0.0
286      dialiq(i, k) = 0.0
287    END DO
288  END DO
289
290  DO i = 1, klon ! Calculer la fraction nuageuse
291    zcc(i) = 0.0
292    IF ((rain(i)+snow(i))>0.) THEN
293      zcc(i) = cca*log(max(zepscr,(rain(i)+snow(i))*ccscal)) - ccb
294      zcc(i) = min(ccc, max(0.0,zcc(i)))
295    END IF
296  END DO
297
298  DO i = 1, klon ! pour traiter les enclumes
299    diafra(i, ktop(i)) = max(diafra(i,ktop(i)), zcc(i)*ccfct)
300    IF ((zcc(i)>=canvh) .AND. (pplay(i,ktop(i))<=cetahb*paprs(i, &
301      1))) diafra(i, ktop(i)) = max(diafra(i,ktop(i)), max(zcc( &
302      i)*ccfct,canva*(zcc(i)-canvb)))
303    dialiq(i, ktop(i)) = cclwmr*diafra(i, ktop(i))
304  END DO
305
306  DO k = 1, klev ! nuages convectifs (sauf enclumes)
307    DO i = 1, klon
308      IF (k<ktop(i) .AND. k>=kbot(i)) THEN
309        diafra(i, k) = max(diafra(i,k), zcc(i)*ccfct)
310        dialiq(i, k) = cclwmr*diafra(i, k)
311      END IF
312    END DO
313  END DO
314
315  RETURN
316END SUBROUTINE diagcld1
317SUBROUTINE diagcld2(paprs, pplay, t, q, diafra, dialiq)
318  USE dimphy
319  IMPLICIT NONE
320
321  ! ym#include "dimensions.h"
322  ! ym#include "dimphy.h"
323  include "YOMCST.h"
324
325  ! Arguments d'entree:
326  REAL paprs(klon, klev+1) ! pression (Pa) a inter-couche
327  REAL pplay(klon, klev) ! pression (Pa) au milieu de couche
328  REAL t(klon, klev) ! temperature (K)
329  REAL q(klon, klev) ! humidite specifique (Kg/Kg)
330
331  ! Arguments de sortie:
332  REAL diafra(klon, klev) ! fraction nuageuse diagnostiquee
333  REAL dialiq(klon, klev) ! eau liquide nuageuse
334
335  REAL cetamb
336  PARAMETER (cetamb=0.80)
337  REAL cloia, cloib, cloic, cloid
338  PARAMETER (cloia=1.0E+02, cloib=-10.00, cloic=-0.6, cloid=5.0)
339  ! cc      PARAMETER (CLOIA=1.0E+02, CLOIB=-10.00, CLOIC=-0.9, CLOID=5.0)
340  REAL rgammas
341  PARAMETER (rgammas=0.05)
342  REAL crhl
343  PARAMETER (crhl=0.15)
344  ! cc      PARAMETER (CRHL=0.70)
345  REAL t_coup
346  PARAMETER (t_coup=234.0)
347
348  ! Variables locales:
349  INTEGER i, k, kb, invb(klon)
350  REAL zqs, zrhb, zcll, zdthmin(klon), zdthdp
351  REAL zdelta, zcor
352
353  ! Fonctions thermodynamiques:
354  include "YOETHF.h"
355  include "FCTTRE.h"
356
357  ! Initialisation:
358
359  DO k = 1, klev
360    DO i = 1, klon
361      diafra(i, k) = 0.0
362      dialiq(i, k) = 0.0
363    END DO
364  END DO
365
366  DO i = 1, klon
367    invb(i) = klev
368    zdthmin(i) = 0.0
369  END DO
370
371  DO k = 2, klev/2 - 1
372    DO i = 1, klon
373      zdthdp = (t(i,k)-t(i,k+1))/(pplay(i,k)-pplay(i,k+1)) - &
374        rd*0.5*(t(i,k)+t(i,k+1))/rcpd/paprs(i, k+1)
375      zdthdp = zdthdp*cloia
376      IF (pplay(i,k)>cetamb*paprs(i,1) .AND. zdthdp<zdthmin(i)) THEN
377        zdthmin(i) = zdthdp
378        invb(i) = k
379      END IF
380    END DO
381  END DO
382
383  DO i = 1, klon
384    kb = invb(i)
385    IF (thermcep) THEN
386      zdelta = max(0., sign(1.,rtt-t(i,kb)))
387      zqs = r2es*foeew(t(i,kb), zdelta)/pplay(i, kb)
388      zqs = min(0.5, zqs)
389      zcor = 1./(1.-retv*zqs)
390      zqs = zqs*zcor
391    ELSE
392      IF (t(i,kb)<t_coup) THEN
393        zqs = qsats(t(i,kb))/pplay(i, kb)
394      ELSE
395        zqs = qsatl(t(i,kb))/pplay(i, kb)
396      END IF
397    END IF
398    zcll = cloib*zdthmin(i) + cloic
399    zcll = min(1.0, max(0.0,zcll))
400    zrhb = q(i, kb)/zqs
401    IF (zcll>0.0 .AND. zrhb<crhl) zcll = zcll*(1.-(crhl-zrhb)*cloid)
402    zcll = min(1.0, max(0.0,zcll))
403    diafra(i, kb) = max(diafra(i,kb), zcll)
404    dialiq(i, kb) = diafra(i, kb)*rgammas*zqs
405  END DO
406
407  RETURN
408END SUBROUTINE diagcld2
Note: See TracBrowser for help on using the repository browser.