source: LMDZ6/branches/contrails/libf/phylmd/lmdz_cloud_optics_prop.f90 @ 5488

Last change on this file since 5488 was 5488, checked in by aborella, 3 weeks ago

Added dependance of rei to contrail fraction

  • 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: 28.0 KB
Line 
1! $Id: lmdz_cloud_optics_prop.f90 5488 2025-01-17 17:12:48Z aborella $
2MODULE lmdz_cloud_optics_prop
3
4CONTAINS
5
6SUBROUTINE cloud_optics_prop(klon, klev, paprs, pplay, temp, radocond, picefra, pclc, &
7    pcltau, pclemi, pch, pcl, pcm, pct, radocondwp, xflwp, xfiwp, xflwc, xfiwc, &
8    mass_solu_aero, mass_solu_aero_pi, pcldtaupi, distcltop, temp_cltop, re, fl, reliq, reice, &
9    reliq_pi, reice_pi, scdnc, cldncl, reffclwtop, lcc, reffclws, &
10    reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra,  &
11    icefrac_optics, dNovrN, ptconv, rnebcon, ccwcon, rcontrail)
12
13  USE lmdz_cloud_optics_prop_ini , ONLY : flag_aerosol, ok_cdnc
14  USE lmdz_cloud_optics_prop_ini , ONLY : lunout
15  USE lmdz_cloud_optics_prop_ini , ONLY : bl95_b0, bl95_b1
16  USE lmdz_cloud_optics_prop_ini , ONLY : latitude_deg
17  USE lmdz_cloud_optics_prop_ini , ONLY : iflag_t_glace
18  USE lmdz_cloud_optics_prop_ini , ONLY : cdnc_max, cdnc_max_m3
19  USE lmdz_cloud_optics_prop_ini , ONLY : cdnc_min, cdnc_min_m3
20  USE lmdz_cloud_optics_prop_ini , ONLY : thres_tau, thres_neb
21  USE lmdz_cloud_optics_prop_ini , ONLY : prmhc, prlmc
22  USE lmdz_cloud_optics_prop_ini , ONLY : coef_froi, coef_chau
23  USE lmdz_cloud_optics_prop_ini , ONLY : seuil_neb
24  USE lmdz_cloud_optics_prop_ini , ONLY : t_glace_min_old, t_glace_max_old
25  USE lmdz_cloud_optics_prop_ini , ONLY : k_ice0, df
26  USE lmdz_cloud_optics_prop_ini , ONLY : rg, rd, rpi
27  USE lmdz_cloud_optics_prop_ini , ONLY : rad_chau1, rad_chau2, rad_froid, iflag_rei
28  USE lmdz_cloud_optics_prop_ini , ONLY : ok_icefra_lscp, rei_max, rei_min
29  USE lmdz_cloud_optics_prop_ini , ONLY : zepsec, novlp, iflag_ice_thermo, ok_new_lscp
30  USE lmdz_cloud_optics_prop_ini , ONLY : ok_plane_contrail, re_ice_crystals_contrails
31 
32
33
34
35  IMPLICIT NONE
36  ! ======================================================================
37  ! Authors: Z.X. Li (LMD/CNRS) date: 19930910
38  !          O.Boucher (LMD/CNRS) mise a jour en 201212
39  !          I. Musat (LMD/CNRS) : prise en compte de la meme hypothese
40  !                              de recouvrement pour les nuages que pour
41  !                              le rayonnement rrtm via le parametre
42  !                               novlp de radopt.h : 20160721
43  !          L.Fairheard, E.Vignon, JB Madeleine, L. Raillard, A. Idelkadi
44  !          M. Coulon-Decorzens: replayisation of the routine + cleaning
45  !                               and commentaries
46  !
47  ! Aim: compute condensate optical properties,
48  !      cloud optical depth and emissivity
49  ! ======================================================================
50 
51  ! List of arguments
52  !------------------
53
54  ! input:
55  INTEGER, INTENT(IN) :: klon, klev      ! number of horizontal and vertical grid points
56  REAL, INTENT(IN) :: paprs(klon, klev+1)! pressure at bottom interfaces [Pa]
57  REAL, INTENT(IN) :: pplay(klon, klev)  ! pressure at the middle of layers [Pa]
58  REAL, INTENT(IN) :: temp(klon, klev)   ! temperature [K]
59  REAL, INTENT(IN) :: radocond(klon, klev) ! cloud condensed water seen by radiation [kg/kg]
60  REAL, INTENT(IN) :: picefra(klon,klev) ! ice fraction in clouds from large scale condensation scheme [-]
61  REAL, INTENT(IN) :: rnebcon(klon,klev) ! convection cloud fraction [-]
62  REAL, INTENT(IN) :: ccwcon(klon,klev)  ! condensed water from deep convection [kg/kg]
63  ! jq for the aerosol indirect effect
64  ! jq introduced by Johannes Quaas (quaas@lmd.jussieu.fr), 27/11/2003
65  REAL, INTENT(IN) :: mass_solu_aero(klon, klev)    ! total mass concentration for all soluble aerosols [ug m-3]
66  REAL, INTENT(IN) :: mass_solu_aero_pi(klon, klev) ! - (pre-industrial value)
67  REAL, INTENT(IN)  :: dNovrN(klon)         ! enhancement factor for cdnc
68  REAL, INTENT(OUT) :: distcltop(klon,klev) ! distance from large scale cloud top [m]
69  REAL, INTENT(OUT) :: temp_cltop(klon,klev)!temperature at large scale cloud top [K]
70
71  LOGICAL, INTENT(IN) :: ptconv(klon, klev) ! flag for grid points affected by deep convection
72
73  REAL, INTENT(IN) :: rcontrail(klon, klev) ! ratio of contrails to total cloud fraction, used only if ok_plane_contrail=y [-]
74
75  ! inout:
76  REAL, INTENT(INOUT) :: pclc(klon, klev) ! cloud fraction for radiation [-]
77
78  ! out:
79  REAL, INTENT(OUT) :: pct(klon)      ! 2D total cloud cover [-]
80  REAL, INTENT(OUT) :: pcl(klon)      ! 2D low cloud cover [-]
81  REAL, INTENT(OUT) :: pcm(klon)      ! 2D mid cloud cover [-]
82  REAL, INTENT(OUT) :: pch(klon)      ! 2D high cloud cover [-]
83  REAL, INTENT(OUT) :: radocondwp(klon) ! total condensed water path (seen by radiation) [kg/m2]
84  REAL, INTENT(OUT) :: xflwp(klon)    ! liquid water path (seen by radiation) [kg/m2]
85  REAL, INTENT(OUT) :: xfiwp(klon)    ! ice water path (seen by radiation) [kg/m2]
86  REAL, INTENT(OUT) :: xflwc(klon, klev) ! liquid water content seen by radiation [kg/kg]
87  REAL, INTENT(OUT) :: xfiwc(klon, klev) ! ice water content seen by radiation [kg/kg]
88  REAL, INTENT(OUT) :: re(klon, klev) ! cloud droplet effective radius multiplied by fl
89  REAL, INTENT(OUT) :: fl(klon, klev) ! xliq * rneb, denominator to re; fraction of liquid water clouds
90                                      ! introduced to avoid problems in the averaging of the output
91                                      ! water clouds within a grid cell
92
93  REAL, INTENT(OUT) :: pcltau(klon, klev) ! cloud optical depth [m]
94  REAL, INTENT(OUT) :: pclemi(klon, klev) ! cloud emissivity [-]
95  REAL, INTENT(OUT) :: pcldtaupi(klon, klev) ! pre-industrial value of cloud optical thickness, ie.
96                                             ! values of optical thickness that does not account
97                                             ! for aerosol effects on cloud droplet radius [m]
98
99  REAL, INTENT(OUT) :: reliq(klon, klev)   ! liquid droplet effective radius [m]
100  REAL, INTENT(OUT) :: reice(klon, klev)   ! ice effective radius [m]
101  REAL, INTENT(OUT) :: reliq_pi(klon, klev)! liquid droplet effective radius [m], pre-industrial
102  REAL, INTENT(OUT) :: reice_pi(klon, klev)! ice effective radius [m], pre-industrial
103  REAL, INTENT(OUT) :: scdnc(klon, klev)   ! cloud droplet number concentration, mean over the whole mesh [m-3]
104  REAL, INTENT(OUT) :: cldncl(klon)        ! cloud droplet number concentration at top of cloud [m-3]
105  REAL, INTENT(OUT) :: reffclwtop(klon)    ! effective radius of cloud droplet at top of cloud [m]
106  REAL, INTENT(OUT) :: lcc(klon)           ! liquid Cloud Content at top of cloud [kg/kg]
107  REAL, INTENT(OUT) :: reffclws(klon, klev)! stratiform cloud droplet effective radius
108  REAL, INTENT(OUT) :: reffclwc(klon, klev)! convective cloud droplet effective radius
109  REAL, INTENT(OUT) :: cldnvi(klon)        ! column Integrated cloud droplet Number [/m2]
110  REAL, INTENT(OUT) :: lcc3d(klon, klev)   ! cloud fraction for liquid part only [-]
111  REAL, INTENT(OUT) :: lcc3dcon(klon, klev)! cloud fraction for liquid part only, convective clouds [-]
112  REAL, INTENT(OUT) :: lcc3dstra(klon, klev)!cloud fraction for liquid part only, stratiform clouds [-]
113  REAL, INTENT(OUT) :: icc3dcon(klon, klev)! cloud fraction for liquid part only, convective clouds [-]
114  REAL, INTENT(OUT) :: icc3dstra(klon, klev)! cloud fraction for ice part only, stratiform clouds [-]
115  REAL, INTENT(INOUT) :: icefrac_optics(klon, klev)! ice fraction in clouds seen by radiation [-]
116
117  ! Local variables
118  !----------------
119
120  LOGICAL, SAVE :: first = .TRUE.
121  !$OMP THREADPRIVATE(first)
122  INTEGER flag_max
123
124  ! threshold PARAMETERs
125  REAL phase3d(klon, klev)
126  REAL tcc(klon), ftmp(klon), lcc_integrat(klon), height(klon)
127  LOGICAL lo
128  INTEGER i, k
129  REAL radius
130
131
132  REAL rel, tc, rei, iwc, dei, deimin, deimax
133  REAL k_ice
134
135  ! jq for the aerosol indirect effect
136  ! jq introduced by Johannes Quaas (quaas@lmd.jussieu.fr), 27/11/2003
137  REAL cdnc(klon, klev) ! cloud droplet number concentration [m-3]
138  REAL cdnc_pi(klon, klev) ! cloud droplet number concentration [m-3] (pi value)
139  REAL re_pi(klon, klev) ! cloud droplet effective radius [um] (pi value)
140
141  ! IM cf. CR:parametres supplementaires
142  REAL dzfice(klon,klev)
143  REAL zclear(klon)
144  REAL zcloud(klon)
145  REAL zcloudh(klon)
146  REAL zcloudm(klon)
147  REAL zcloudl(klon)
148  REAL rhodz(klon, klev) !--rho*dz pour la couche
149  REAL zrho(klon, klev) !--rho pour la couche
150  REAL dh(klon, klev) !--dz pour la couche
151  REAL rad_chaud(klon, klev) !--rayon pour les nuages chauds
152  REAL rad_chaud_pi(klon, klev) !--rayon pour les nuages chauds pre-industriels
153  REAL zflwp_var, zfiwp_var
154  REAL d_rei_dt
155
156
157  ! FH : 2011/05/24
158  ! rei = ( rei_max - rei_min ) * T(°C) / 81.4 + rei_max
159  ! to be used for a temperature in celcius T(°C) < 0
160  ! rei=rei_min for T(°C) < -81.4
161  ! Calcul de la pente de la relation entre rayon effective des cristaux
162  ! et la température Pour retrouver les résultats numériques de la version d'origine,
163  ! on impose 0.71 quand on est proche de 0.71
164  d_rei_dt = (rei_max-rei_min)/81.4
165  IF (abs(d_rei_dt-0.71)<1.E-4) d_rei_dt = 0.71
166
167  ! Calculer l'epaisseur optique et l'emmissivite des nuages
168  ! IM inversion des DO
169
170  xflwp = 0.D0
171  xfiwp = 0.D0
172  xflwc = 0.D0
173  xfiwc = 0.D0
174
175  reliq = 0.
176  reice = 0.
177  reliq_pi = 0.
178  reice_pi = 0.
179
180  IF (iflag_t_glace.EQ.0) THEN
181    DO k = 1, klev
182      DO i = 1, klon
183        ! -layer calculation
184        rhodz(i, k) = (paprs(i,k)-paprs(i,k+1))/rg ! kg/m2
185        zrho(i, k) = pplay(i, k)/temp(i, k)/rd ! kg/m3
186        dh(i, k) = rhodz(i, k)/zrho(i, k) ! m
187        ! -Fraction of ice in cloud using a linear transition
188        icefrac_optics(i, k) = 1.0 - (temp(i,k)-t_glace_min_old)/(t_glace_max_old-t_glace_min_old)
189        icefrac_optics(i, k) = min(max(icefrac_optics(i,k),0.0), 1.0)
190        ! -IM Total Liquid/Ice water content
191        xflwc(i, k) = (1.-icefrac_optics(i,k))*radocond(i, k)
192        xfiwc(i, k) = icefrac_optics(i, k)*radocond(i, k)
193      ENDDO
194    ENDDO
195  ELSE ! of IF (iflag_t_glace.EQ.0)
196    DO k = 1, klev
197
198
199!!$      IF (ok_new_lscp) THEN
200!!$          CALL icefrac_lscp(klon,temp(:,k),iflag_ice_thermo,distcltop(:,k),temp_cltop(:,k),icefrac_optics(:,k),dzfice(:,k))
201!!$      ELSE
202!!$          CALL icefrac_lsc(klon,temp(:,k),pplay(:,k)/paprs(:,1),icefrac_optics(:,k))
203!!$      ENDIF
204
205      DO i = 1, klon
206       
207        IF ((.NOT. ptconv(i,k)) .AND. ok_new_lscp .AND. ok_icefra_lscp) THEN
208        ! EV: take the ice fraction directly from the lscp code
209        ! consistent only for non convective grid points
210        ! critical for mixed phase clouds
211            icefrac_optics(i,k)=picefra(i,k)
212        ENDIF
213
214        ! -layer calculation
215        rhodz(i, k) = (paprs(i,k)-paprs(i,k+1))/rg ! kg/m2
216        zrho(i, k) = pplay(i, k)/temp(i, k)/rd ! kg/m3
217        dh(i, k) = rhodz(i, k)/zrho(i, k) ! m
218        ! -IM Total Liquid/Ice water content
219        xflwc(i, k) = (1.-icefrac_optics(i,k))*radocond(i, k)
220        xfiwc(i, k) = icefrac_optics(i, k)*radocond(i, k)
221      ENDDO
222    ENDDO
223  ENDIF
224
225
226
227
228
229
230  IF (ok_cdnc) THEN
231
232    ! --we compute cloud properties as a function of the aerosol load
233
234    DO k = 1, klev
235      DO i = 1, klon
236        ! Formula "D" of Boucher and Lohmann, Tellus, 1995
237        ! Cloud droplet number concentration (CDNC) is restricted
238        ! to be within [20, 1000 cm^3]
239
240        ! --pre-industrial case
241        cdnc_pi(i, k) = 10.**(bl95_b0+bl95_b1*log(max(mass_solu_aero_pi(i,k), &
242          1.E-4))/log(10.))*1.E6 !-m-3
243        cdnc_pi(i, k) = min(cdnc_max_m3, max(cdnc_min_m3,cdnc_pi(i,k)))
244
245      ENDDO
246    ENDDO
247
248    !--flag_aerosol=7 => MACv2SP climatology
249    !--in this case there is an enhancement factor
250    IF (flag_aerosol .EQ. 7) THEN
251
252      !--present-day
253      DO k = 1, klev
254        DO i = 1, klon
255          cdnc(i, k) = cdnc_pi(i,k)*dNovrN(i)
256        ENDDO
257      ENDDO
258
259    !--standard case
260    ELSE
261
262      DO k = 1, klev
263        DO i = 1, klon
264
265          ! Formula "D" of Boucher and Lohmann, Tellus, 1995
266          ! Cloud droplet number concentration (CDNC) is restricted
267          ! to be within [20, 1000 cm^3]
268
269          ! --present-day case
270          cdnc(i, k) = 10.**(bl95_b0+bl95_b1*log(max(mass_solu_aero(i,k), &
271            1.E-4))/log(10.))*1.E6 !-m-3
272          cdnc(i, k) = min(cdnc_max_m3, max(cdnc_min_m3,cdnc(i,k)))
273
274        ENDDO
275      ENDDO
276
277    ENDIF !--flag_aerosol
278
279    !--computing cloud droplet size
280    DO k = 1, klev
281      DO i = 1, klon
282
283        ! --present-day case
284        rad_chaud(i, k) = 1.1*((radocond(i,k)*pplay(i, &
285          k)/(rd*temp(i,k)))/(4./3*rpi*1000.*cdnc(i,k)))**(1./3.)
286        rad_chaud(i, k) = max(rad_chaud(i,k)*1.E6, 5.)
287
288        ! --pre-industrial case
289        rad_chaud_pi(i, k) = 1.1*((radocond(i,k)*pplay(i, &
290          k)/(rd*temp(i,k)))/(4./3.*rpi*1000.*cdnc_pi(i,k)))**(1./3.)
291        rad_chaud_pi(i, k) = max(rad_chaud_pi(i,k)*1.E6, 5.)
292
293        ! --pre-industrial case
294        ! --liquid/ice cloud water paths:
295        IF (pclc(i,k)<=seuil_neb) THEN
296
297          pcldtaupi(i, k) = 0.0
298
299        ELSE
300
301          zflwp_var = 1000.*(1.-icefrac_optics(i,k))*radocond(i, k)/pclc(i, k)* &
302            rhodz(i, k)
303          zfiwp_var = 1000.*icefrac_optics(i, k)*radocond(i, k)/pclc(i, k)*rhodz(i, k)
304          ! Calculation of ice cloud effective radius in micron
305          IF (iflag_rei .EQ. 1) THEN
306            ! when we account for precipitation in the radiation scheme,
307            ! It is recommended to use the rei formula from Sun and Rikkus 1999 with a revision
308            ! from Sun 2001 (as in the IFS model)
309            iwc=icefrac_optics(i, k)*radocond(i, k)/pclc(i,k)*zrho(i,k)*1000. !in cloud ice water content in g/m3
310            dei=(1.2351+0.0105*(temp(i,k)-273.15))*(45.8966*(iwc**0.2214) + &
311               & 0.7957*(iwc**0.2535)*(temp(i,k)-83.15))
312            !deimax=155.0
313            !deimin=20.+40*cos(abs(latitude_deg(i))/180.*RPI)
314            !Etienne: deimax and deimin controled by rei_max and rei_min in physiq.def
315            deimax=rei_max*2.0
316            deimin=2.0*rei_min+40*cos(abs(latitude_deg(i))/180.*RPI)
317            dei=min(dei,deimax)
318            dei=max(dei,deimin)
319            rei=3.*sqrt(3.)/8.*dei
320           ELSE
321            ! Default
322            ! for ice clouds: as a function of the ambiant temperature
323            ! [formula used by Iacobellis and Somerville (2000), with an
324            ! asymptotical value of 3.5 microns at T<-81.4 C added to be
325            ! consistent with observations of Heymsfield et al. 1986]:
326            ! 2011/05/24 : rei_min = 3.5 becomes a free PARAMETER as well as
327            ! rei_max=61.29
328            tc = temp(i, k) - 273.15
329            rei = d_rei_dt*tc + rei_max
330            IF (tc<=-81.4) rei = rei_min
331           ENDIF
332
333          ! -- cloud optical thickness :
334          ! [for liquid clouds, traditional formula,
335          ! for ice clouds, Ebert & Curry (1992)]
336
337          IF (zfiwp_var==0. .OR. rei<=0.) rei = 1.
338          IF ( ok_plane_contrail ) THEN
339            !--If contrails are activated, rei is a weighted average between the natural
340            !--rei and the contrails rei, with the weights being the fraction of natural
341            !--vs contrail cirrus in the gridbox
342            rei = rei * ( 1. - rcontrail(i,k) ) + re_ice_crystals_contrails * rcontrail(i,k)
343          ENDIF
344          pcldtaupi(i, k) = 3.0/2.0*zflwp_var/rad_chaud_pi(i, k) + &
345            zfiwp_var*(3.448E-03+2.431/rei)
346
347        ENDIF
348
349      ENDDO
350    ENDDO
351
352  ELSE !--not ok_cdnc
353
354    ! -prescribed cloud droplet radius
355
356    DO k = 1, min(3, klev)
357      DO i = 1, klon
358        rad_chaud(i, k) = rad_chau2
359        rad_chaud_pi(i, k) = rad_chau2
360      ENDDO
361    ENDDO
362    DO k = min(3, klev) + 1, klev
363      DO i = 1, klon
364        rad_chaud(i, k) = rad_chau1
365        rad_chaud_pi(i, k) = rad_chau1
366      ENDDO
367    ENDDO
368
369  ENDIF !--ok_cdnc
370
371  ! --computation of cloud optical depth and emissivity
372  ! --in the general case
373
374  DO k = 1, klev
375    DO i = 1, klon
376
377      IF (pclc(i,k)<=seuil_neb) THEN
378
379        ! effective cloud droplet radius (microns) for liquid water clouds:
380        ! For output diagnostics cloud droplet effective radius [um]
381        ! we multiply here with f * xl (fraction of liquid water
382        ! clouds in the grid cell) to avoid problems in the averaging of the
383        ! output.
384        ! In the output of IOIPSL, derive the REAL cloud droplet
385        ! effective radius as re/fl
386
387        fl(i, k) = seuil_neb*(1.-icefrac_optics(i,k))
388        re(i, k) = rad_chaud(i, k)*fl(i, k)
389        rel = 0.
390        rei = 0.
391        pclc(i, k) = 0.0
392        pcltau(i, k) = 0.0
393        pclemi(i, k) = 0.0
394
395      ELSE
396
397        ! -- liquid/ice cloud water paths:
398
399        zflwp_var = 1000.*(1.-icefrac_optics(i,k))*radocond(i, k)/pclc(i, k)*rhodz(i, k)
400        zfiwp_var = 1000.*icefrac_optics(i, k)*radocond(i, k)/pclc(i, k)*rhodz(i, k)
401
402        ! effective cloud droplet radius (microns) for liquid water clouds:
403        ! For output diagnostics cloud droplet effective radius [um]
404        ! we multiply here with f Effective radius of cloud droplet at top of cloud (m)* xl (fraction of liquid water
405        ! clouds in the grid cell) to avoid problems in the averaging of the
406        ! output.
407        ! In the output of IOIPSL, derive the REAL cloud droplet
408        ! effective radius as re/fl
409
410        fl(i, k) = pclc(i, k)*(1.-icefrac_optics(i,k))
411        re(i, k) = rad_chaud(i, k)*fl(i, k)
412
413        rel = rad_chaud(i, k)
414
415        ! Calculation of ice cloud effective radius in micron
416
417
418        IF (iflag_rei .GT. 0) THEN
419
420            ! when we account for precipitation in the radiation scheme,
421            ! we use the rei formula from Sun and Rikkus 1999 with a revision
422            ! from Sun 2001 (as in the IFS model)
423            iwc=icefrac_optics(i, k)*radocond(i, k)/pclc(i,k)*zrho(i,k)*1000. !in cloud ice water content in g/m3
424            dei=(1.2351+0.0105*(temp(i,k)-273.15))*(45.8966*(iwc**0.2214) + &
425               &0.7957*(iwc**0.2535)*(temp(i,k)-83.15))
426            !deimax=155.0
427            !deimin=20.+40*cos(abs(latitude_deg(i))/180.*RPI)
428            !Etienne: deimax and deimin controled by rei_max and rei_min in physiq.def
429            deimax=rei_max*2.0
430            deimin=2.0*rei_min+40*cos(abs(latitude_deg(i))/180.*RPI)
431            dei=min(dei,deimax)
432            dei=max(dei,deimin)
433            rei=3.*sqrt(3.)/8.*dei
434       
435        ELSE
436            ! Default
437            ! for ice clouds: as a function of the ambiant temperature
438            ! [formula used by Iacobellis and Somerville (2000), with an
439            ! asymptotical value of 3.5 microns at T<-81.4 C added to be
440            ! consistent with observations of Heymsfield et al. 1986]:
441            ! 2011/05/24 : rei_min = 3.5 becomes a free PARAMETER as well as
442            ! rei_max=61.29
443            tc = temp(i, k) - 273.15
444            rei = d_rei_dt*tc + rei_max
445            IF (tc<=-81.4) rei = rei_min
446        ENDIF
447        ! -- cloud optical thickness :
448        ! [for liquid clouds, traditional formula,
449        ! for ice clouds, Ebert & Curry (1992)]
450
451        IF (zflwp_var==0.) rel = 1.
452        IF (zfiwp_var==0. .OR. rei<=0.) rei = 1.
453        IF ( ok_plane_contrail ) THEN
454          !--If contrails are activated, rei is a weighted average between the natural
455          !--rei and the contrails rei, with the weights being the fraction of natural
456          !--vs contrail cirrus in the gridbox
457          rei = rei * ( 1. - rcontrail(i,k) ) + re_ice_crystals_contrails * rcontrail(i,k)
458        ENDIF
459        pcltau(i, k) = 3.0/2.0*(zflwp_var/rel) + zfiwp_var*(3.448E-03+2.431/ &
460          rei)
461
462        ! -- cloud infrared emissivity:
463        ! [the broadband infrared absorption coefficient is PARAMETERized
464        ! as a function of the effective cld droplet radius]
465        ! Ebert and Curry (1992) formula as used by Kiehl & Zender (1995):
466
467        k_ice = k_ice0 + 1.0/rei
468
469        pclemi(i, k) = 1.0 - exp(-coef_chau*zflwp_var-df*k_ice*zfiwp_var)
470
471      ENDIF
472
473      reice(i, k) = rei
474
475      xflwp(i) = xflwp(i) + xflwc(i, k)*rhodz(i, k)
476      xfiwp(i) = xfiwp(i) + xfiwc(i, k)*rhodz(i, k)
477
478    ENDDO
479  ENDDO
480
481  ! --if cloud droplet radius is fixed, then pcldtaupi=pcltau
482
483  IF (.NOT. ok_cdnc) THEN
484    DO k = 1, klev
485      DO i = 1, klon
486        pcldtaupi(i, k) = pcltau(i, k)
487        reice_pi(i, k) = reice(i, k)
488      ENDDO
489    ENDDO
490  ENDIF
491
492  DO k = 1, klev
493    DO i = 1, klon
494      reliq(i, k) = rad_chaud(i, k)
495      reliq_pi(i, k) = rad_chaud_pi(i, k)
496      reice_pi(i, k) = reice(i, k)
497    ENDDO
498  ENDDO
499
500  ! COMPUTE CLOUD LIQUID PATH AND TOTAL CLOUDINESS
501  ! IM cf. CR:test: calcul prenant ou non en compte le recouvrement
502  ! initialisations
503
504  DO i = 1, klon
505    zclear(i) = 1.
506    zcloud(i) = 0.
507    zcloudh(i) = 0.
508    zcloudm(i) = 0.
509    zcloudl(i) = 0.
510    pch(i) = 1.0
511    pcm(i) = 1.0
512    pcl(i) = 1.0
513    radocondwp(i) = 0.0
514  ENDDO
515
516  ! --calculation of liquid water path
517
518  DO k = klev, 1, -1
519    DO i = 1, klon
520      radocondwp(i) = radocondwp(i) + radocond(i, k)*rhodz(i, k)
521    ENDDO
522  ENDDO
523
524  ! --calculation of cloud properties with cloud overlap
525  ! choix de l'hypothese de recouvrement nuageuse via radopt.h (IM, 19.07.2016)
526  ! !novlp=1: max-random
527  ! !novlp=2: maximum
528  ! !novlp=3: random
529
530
531  IF (novlp==1) THEN
532    DO k = klev, 1, -1
533      DO i = 1, klon
534        zclear(i) = zclear(i)*(1.-max(pclc(i,k),zcloud(i)))/(1.-min(real( &
535          zcloud(i),kind=8),1.-zepsec))
536        pct(i) = 1. - zclear(i)
537        IF (paprs(i,k)<prmhc) THEN
538          pch(i) = pch(i)*(1.-max(pclc(i,k),zcloudh(i)))/(1.-min(real(zcloudh &
539            (i),kind=8),1.-zepsec))
540          zcloudh(i) = pclc(i, k)
541        ELSE IF (paprs(i,k)>=prmhc .AND. paprs(i,k)<prlmc) THEN
542          pcm(i) = pcm(i)*(1.-max(pclc(i,k),zcloudm(i)))/(1.-min(real(zcloudm &
543            (i),kind=8),1.-zepsec))
544          zcloudm(i) = pclc(i, k)
545        ELSE IF (paprs(i,k)>=prlmc) THEN
546          pcl(i) = pcl(i)*(1.-max(pclc(i,k),zcloudl(i)))/(1.-min(real(zcloudl &
547            (i),kind=8),1.-zepsec))
548          zcloudl(i) = pclc(i, k)
549        ENDIF
550        zcloud(i) = pclc(i, k)
551      ENDDO
552    ENDDO
553  ELSE IF (novlp==2) THEN
554    DO k = klev, 1, -1
555      DO i = 1, klon
556        zcloud(i) = max(pclc(i,k), zcloud(i))
557        pct(i) = zcloud(i)
558        IF (paprs(i,k)<prmhc) THEN
559          pch(i) = min(pclc(i,k), pch(i))
560        ELSE IF (paprs(i,k)>=prmhc .AND. paprs(i,k)<prlmc) THEN
561          pcm(i) = min(pclc(i,k), pcm(i))
562        ELSE IF (paprs(i,k)>=prlmc) THEN
563          pcl(i) = min(pclc(i,k), pcl(i))
564        ENDIF
565      ENDDO
566    ENDDO
567  ELSE IF (novlp==3) THEN
568    DO k = klev, 1, -1
569      DO i = 1, klon
570        zclear(i) = zclear(i)*(1.-pclc(i,k))
571        pct(i) = 1 - zclear(i)
572        IF (paprs(i,k)<prmhc) THEN
573          pch(i) = pch(i)*(1.0-pclc(i,k))
574        ELSE IF (paprs(i,k)>=prmhc .AND. paprs(i,k)<prlmc) THEN
575          pcm(i) = pcm(i)*(1.0-pclc(i,k))
576        ELSE IF (paprs(i,k)>=prlmc) THEN
577          pcl(i) = pcl(i)*(1.0-pclc(i,k))
578        ENDIF
579      ENDDO
580    ENDDO
581  ENDIF
582
583  DO i = 1, klon
584    pch(i) = 1. - pch(i)
585    pcm(i) = 1. - pcm(i)
586    pcl(i) = 1. - pcl(i)
587  ENDDO
588
589  ! ========================================================
590  ! DIAGNOSTICS CALCULATION FOR CMIP5 PROTOCOL
591  ! ========================================================
592  ! change by Nicolas Yan (LSCE)
593  ! Cloud Droplet Number Concentration (CDNC) : 3D variable
594  ! Fractionnal cover by liquid water cloud (LCC3D) : 3D variable
595  ! Cloud Droplet Number Concentration at top of cloud (CLDNCL) : 2D variable
596  ! Droplet effective radius at top of cloud (REFFCLWTOP) : 2D variable
597  ! Fractionnal cover by liquid water at top of clouds (LCC) : 2D variable
598
599  IF (ok_cdnc) THEN
600
601    DO k = 1, klev
602      DO i = 1, klon
603        phase3d(i, k) = 1 - icefrac_optics(i, k)
604        IF (pclc(i,k)<=seuil_neb) THEN
605          lcc3d(i, k) = seuil_neb*phase3d(i, k)
606        ELSE
607          lcc3d(i, k) = pclc(i, k)*phase3d(i, k)
608        ENDIF
609        scdnc(i, k) = lcc3d(i, k)*cdnc(i, k) ! m-3
610      ENDDO
611    ENDDO
612
613    DO i = 1, klon
614      lcc(i) = 0.
615      reffclwtop(i) = 0.
616      cldncl(i) = 0.
617      IF (novlp.EQ.3 .OR. novlp.EQ.1) tcc(i) = 1.
618      IF (novlp.EQ.2) tcc(i) = 0.
619    ENDDO
620
621    DO i = 1, klon
622      DO k = klev - 1, 1, -1 !From TOA down
623
624          ! Test, if the cloud optical depth exceeds the necessary
625          ! threshold:
626
627        IF (pcltau(i,k)>thres_tau .AND. pclc(i,k)>thres_neb) THEN
628
629          IF (novlp.EQ.2) THEN
630            IF (first) THEN
631              WRITE (*, *) 'Hypothese de recouvrement: MAXIMUM'
632              first = .FALSE.
633            ENDIF
634            flag_max = -1.
635            ftmp(i) = max(tcc(i), pclc(i,k))
636          ENDIF
637
638          IF (novlp.EQ.3) THEN
639            IF (first) THEN
640              WRITE (*, *) 'Hypothese de recouvrement: RANDOM'
641              first = .FALSE.
642            ENDIF
643            flag_max = 1.
644            ftmp(i) = tcc(i)*(1-pclc(i,k))
645          ENDIF
646
647          IF (novlp.EQ.1) THEN
648            IF (first) THEN
649              WRITE (*, *) 'Hypothese de recouvrement: MAXIMUM_ &
650                &                                             &
651                &                                          RANDOM'
652              first = .FALSE.
653            ENDIF
654            flag_max = 1.
655            ftmp(i) = tcc(i)*(1.-max(pclc(i,k),pclc(i,k+1)))/(1.-min(pclc(i, &
656              k+1),1.-thres_neb))
657          ENDIF
658          ! Effective radius of cloud droplet at top of cloud (m)
659          reffclwtop(i) = reffclwtop(i) + rad_chaud(i, k)*1.0E-06*phase3d(i, &
660            k)*(tcc(i)-ftmp(i))*flag_max
661          ! CDNC at top of cloud (m-3)
662          cldncl(i) = cldncl(i) + cdnc(i, k)*phase3d(i, k)*(tcc(i)-ftmp(i))* &
663            flag_max
664          ! Liquid Cloud Content at top of cloud
665          lcc(i) = lcc(i) + phase3d(i, k)*(tcc(i)-ftmp(i))*flag_max
666          ! Total Cloud Content at top of cloud
667          tcc(i) = ftmp(i)
668
669        ENDIF ! is there a visible, not-too-small cloud?
670      ENDDO ! loop over k
671
672      IF (novlp.EQ.3 .OR. novlp.EQ.1) tcc(i) = 1. - tcc(i)
673
674    ENDDO ! loop over i
675
676    ! ! Convective and Stratiform Cloud Droplet Effective Radius (REFFCLWC
677    ! REFFCLWS)
678    DO i = 1, klon
679      DO k = 1, klev
680        ! Weight to be used for outputs: eau_liquide*couverture nuageuse
681        lcc3dcon(i, k) = rnebcon(i, k)*phase3d(i, k)*ccwcon(i, k) ! eau liquide convective
682        lcc3dstra(i, k) = pclc(i, k)*radocond(i, k)*phase3d(i, k)
683        lcc3dstra(i, k) = lcc3dstra(i, k) - lcc3dcon(i, k) ! eau liquide stratiforme
684        lcc3dstra(i, k) = max(lcc3dstra(i,k), 0.0)
685        !FC pour la glace (CAUSES)
686        icc3dcon(i, k) = rnebcon(i, k)*(1-phase3d(i, k))*ccwcon(i, k) !  glace convective
687        icc3dstra(i, k)= pclc(i, k)*radocond(i, k)*(1-phase3d(i, k))
688        icc3dstra(i, k) = icc3dstra(i, k) - icc3dcon(i, k) ! glace stratiforme
689        icc3dstra(i, k) = max( icc3dstra(i, k), 0.0)
690        !FC (CAUSES)
691
692        ! Compute cloud droplet radius as above in meter
693        radius = 1.1*((radocond(i,k)*pplay(i,k)/(rd*temp(i,k)))/(4./3*rpi*1000.* &
694          cdnc(i,k)))**(1./3.)
695        radius = max(radius, 5.E-6)
696        ! Convective Cloud Droplet Effective Radius (REFFCLWC) : variable 3D
697        reffclwc(i, k) = radius
698        reffclwc(i, k) = reffclwc(i, k)*lcc3dcon(i, k)
699        ! Stratiform Cloud Droplet Effective Radius (REFFCLWS) : variable 3D
700        reffclws(i, k) = radius
701        reffclws(i, k) = reffclws(i, k)*lcc3dstra(i, k)
702      ENDDO !klev
703    ENDDO !klon
704
705    ! Column Integrated Cloud Droplet Number (CLDNVI) : variable 2D
706
707    DO i = 1, klon
708      cldnvi(i) = 0.
709      lcc_integrat(i) = 0.
710      height(i) = 0.
711      DO k = 1, klev
712        cldnvi(i) = cldnvi(i) + cdnc(i, k)*lcc3d(i, k)*dh(i, k)
713        lcc_integrat(i) = lcc_integrat(i) + lcc3d(i, k)*dh(i, k)
714        height(i) = height(i) + dh(i, k)
715      ENDDO ! klev
716      lcc_integrat(i) = lcc_integrat(i)/height(i)
717      IF (lcc_integrat(i)<=1.0E-03) THEN
718        cldnvi(i) = cldnvi(i)*lcc(i)/seuil_neb
719      ELSE
720        cldnvi(i) = cldnvi(i)*lcc(i)/lcc_integrat(i)
721      ENDIF
722    ENDDO ! klon
723
724    DO i = 1, klon
725      DO k = 1, klev
726        IF (scdnc(i,k)<=0.0) scdnc(i, k) = 0.0
727        IF (reffclws(i,k)<=0.0) reffclws(i, k) = 0.0
728        IF (reffclwc(i,k)<=0.0) reffclwc(i, k) = 0.0
729        IF (lcc3d(i,k)<=0.0) lcc3d(i, k) = 0.0
730        IF (lcc3dcon(i,k)<=0.0) lcc3dcon(i, k) = 0.0
731        IF (lcc3dstra(i,k)<=0.0) lcc3dstra(i, k) = 0.0
732!FC (CAUSES)
733        IF (icc3dcon(i,k)<=0.0) icc3dcon(i, k) = 0.0
734        IF (icc3dstra(i,k)<=0.0) icc3dstra(i, k) = 0.0
735!FC (CAUSES)
736      ENDDO
737      IF (reffclwtop(i)<=0.0) reffclwtop(i) = 0.0
738      IF (cldncl(i)<=0.0) cldncl(i) = 0.0
739      IF (cldnvi(i)<=0.0) cldnvi(i) = 0.0
740      IF (lcc(i)<=0.0) lcc(i) = 0.0
741    ENDDO
742
743  ENDIF !ok_cdnc
744
745  first=.false. !to be sure
746
747  RETURN
748
749END SUBROUTINE cloud_optics_prop
750
751END MODULE lmdz_cloud_optics_prop
Note: See TracBrowser for help on using the repository browser.