source: LMDZ6/trunk/libf/phylmd/lmdz_call_cloud_optics_prop.F90 @ 5260

Last change on this file since 5260 was 4717, checked in by Laurent Fairhead, 14 months ago

There's a bug in icefrac_lsc_mod that did not appear previously because of the
conditions in which it was called. Modifying the lmdz_call_cloud_optics_prop routine waiting for the bug to be corrected

File size: 7.0 KB
Line 
1! $Id$
2MODULE lmdz_call_cloud_optics_prop
3
4CONTAINS
5
6  SUBROUTINE call_cloud_optics_prop(klon, klev, ok_newmicro,&
7       paprs, pplay, temp, radocond, picefra, pclc, &
8    pcltau, pclemi, pch, pcl, pcm, pct, radocondwp, xflwp, xfiwp, xflwc, xfiwc, ok_aie, &
9    mass_solu_aero, mass_solu_aero_pi, pcldtaupi, distcltop, temp_cltop, re, fl, reliq, reice, &
10    reliq_pi, reice_pi, scdnc, cldncl, reffclwtop, lcc, reffclws, &
11    reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra,  &
12    icefrac_optics, dNovrN, ptconv,rnebcon, ccwcon)
13
14  ! Interface between the LMDZ physics monitor and the cloud properties calculation routines
15  ! 2023/10/02: L. Raillard, M. Coulon--Decorzens, A. Idelkadi, L. Fairhead
16  ! (E. Vignon and J.-B. Madeleine in spirit)
17  ! List of arguments
18  !------------------
19
20  USE lmdz_cloud_optics_prop_ini , ONLY : ok_cdnc
21  USE lmdz_cloud_optics_prop_ini , ONLY : bl95_b0, bl95_b1
22  USE lmdz_cloud_optics_prop_ini , ONLY : iflag_ice_thermo, ok_new_lscp, iflag_t_glace
23  USE lmdz_cloud_optics_prop, ONLY : cloud_optics_prop
24 
25  USE icefrac_lsc_mod ! computes ice fraction (JBM 3/14) 
26  USE lmdz_lscp_tools, only: icefrac_lscp
27
28  IMPLICIT NONE
29 
30  ! input:
31  INTEGER, INTENT(IN) :: klon, klev      ! number of horizontal and vertical grid points
32  REAL, INTENT(IN) :: paprs(klon, klev+1)! pressure at bottom interfaces [Pa]
33  REAL, INTENT(IN) :: pplay(klon, klev)  ! pressure at the middle of layers [Pa]
34  REAL, INTENT(IN) :: temp(klon, klev)   ! temperature [K]
35  REAL, INTENT(IN) :: radocond(klon, klev) ! cloud condensed water seen by radiation [kg/kg]
36  REAL, INTENT(IN) :: picefra(klon,klev) ! ice fraction in clouds from large scale condensation scheme [-]
37  REAL, INTENT(IN) :: rnebcon(klon,klev) ! convection cloud fraction [-]
38  REAL, INTENT(IN) :: ccwcon(klon,klev)  ! condensed water from deep convection [kg/kg]
39  ! jq for the aerosol indirect effect
40  ! jq introduced by Johannes Quaas (quaas@lmd.jussieu.fr), 27/11/2003
41  REAL, INTENT(IN) :: mass_solu_aero(klon, klev)    ! total mass concentration for all soluble aerosols [ug m-3]
42  REAL, INTENT(IN) :: mass_solu_aero_pi(klon, klev) ! - (pre-industrial value)
43  REAL, INTENT(IN)  :: dNovrN(klon)         ! enhancement factor for cdnc
44  REAL, INTENT(OUT) :: distcltop(klon,klev) ! distance from large scale cloud top [m]
45  REAL, INTENT(OUT) :: temp_cltop(klon,klev)!temperature at large scale cloud top [K]
46
47  LOGICAL, INTENT(IN) :: ptconv(klon, klev) ! flag for grid points affected by deep convection
48  LOGICAL, INTENT(IN) :: ok_newmicro, ok_aie
49
50  ! inout:
51  REAL, INTENT(INOUT) :: pclc(klon, klev) ! cloud fraction for radiation [-]
52
53  ! out:
54  REAL, INTENT(OUT) :: pct(klon)      ! 2D total cloud cover [-]
55  REAL, INTENT(OUT) :: pcl(klon)      ! 2D low cloud cover [-]
56  REAL, INTENT(OUT) :: pcm(klon)      ! 2D mid cloud cover [-]
57  REAL, INTENT(OUT) :: pch(klon)      ! 2D high cloud cover [-]
58  REAL, INTENT(OUT) :: radocondwp(klon) ! total condensed water path (seen by radiation) [kg/m2]
59  REAL, INTENT(OUT) :: xflwp(klon)    ! liquid water path (seen by radiation) [kg/m2]
60  REAL, INTENT(OUT) :: xfiwp(klon)    ! ice water path (seen by radiation) [kg/m2]
61  REAL, INTENT(OUT) :: xflwc(klon, klev) ! liquid water content seen by radiation [kg/kg]
62  REAL, INTENT(OUT) :: xfiwc(klon, klev) ! ice water content seen by radiation [kg/kg]
63  REAL, INTENT(OUT) :: re(klon, klev) ! cloud droplet effective radius multiplied by fl
64  REAL, INTENT(OUT) :: fl(klon, klev) ! xliq * rneb, denominator to re; fraction of liquid water clouds
65                                      ! introduced to avoid problems in the averaging of the output
66                                      ! water clouds within a grid cell
67
68  REAL, INTENT(OUT) :: pcltau(klon, klev) ! cloud optical depth [m]
69  REAL, INTENT(OUT) :: pclemi(klon, klev) ! cloud emissivity [-]
70  REAL, INTENT(OUT) :: pcldtaupi(klon, klev) ! pre-industrial value of cloud optical thickness, ie.
71                                             ! values of optical thickness that does not account
72                                             ! for aerosol effects on cloud droplet radius [m]
73
74  REAL, INTENT(OUT) :: reliq(klon, klev)   ! liquid droplet effective radius [m]
75  REAL, INTENT(OUT) :: reice(klon, klev)   ! ice effective radius [m]
76  REAL, INTENT(OUT) :: reliq_pi(klon, klev)! liquid droplet effective radius [m], pre-industrial
77  REAL, INTENT(OUT) :: reice_pi(klon, klev)! ice effective radius [m], pre-industrial
78  REAL, INTENT(OUT) :: scdnc(klon, klev)   ! cloud droplet number concentration, mean over the whole mesh [m-3]
79  REAL, INTENT(OUT) :: cldncl(klon)        ! cloud droplet number concentration at top of cloud [m-3]
80  REAL, INTENT(OUT) :: reffclwtop(klon)    ! effective radius of cloud droplet at top of cloud [m]
81  REAL, INTENT(OUT) :: lcc(klon)           ! liquid Cloud Content at top of cloud [kg/kg]
82  REAL, INTENT(OUT) :: reffclws(klon, klev)! stratiform cloud droplet effective radius
83  REAL, INTENT(OUT) :: reffclwc(klon, klev)! convective cloud droplet effective radius
84  REAL, INTENT(OUT) :: cldnvi(klon)        ! column Integrated cloud droplet Number [/m2]
85  REAL, INTENT(OUT) :: lcc3d(klon, klev)   ! cloud fraction for liquid part only [-]
86  REAL, INTENT(OUT) :: lcc3dcon(klon, klev)! cloud fraction for liquid part only, convective clouds [-]
87  REAL, INTENT(OUT) :: lcc3dstra(klon, klev)!cloud fraction for liquid part only, stratiform clouds [-]
88  REAL, INTENT(OUT) :: icc3dcon(klon, klev)! cloud fraction for liquid part only, convective clouds [-]
89  REAL, INTENT(OUT) :: icc3dstra(klon, klev)! cloud fraction for ice part only, stratiform clouds [-]
90  REAL, INTENT(INOUT) :: icefrac_optics(klon, klev)! ice fraction in clouds seen by radiation [-]
91
92  ! Local variables
93  !----------------
94  INTEGER :: k
95  REAL :: dzfice(klon, klev)
96
97  IF (iflag_t_glace .EQ. 0) THEN
98     icefrac_optics(:, :) = 0.
99  ELSE
100     DO k = 1, klev
101        IF (ok_new_lscp) THEN
102          CALL icefrac_lscp(klon,temp(:,k),iflag_ice_thermo,distcltop(:,k),temp_cltop(:,k), &
103   &         icefrac_optics(:,k),dzfice(:,k))
104        ELSE
105          CALL icefrac_lsc(klon,temp(:,k),pplay(1:klon,k)/paprs(1:klon,1),icefrac_optics(:,k))
106        ENDIF
107     ENDDO
108  ENDIF
109 
110
111
112  IF (ok_newmicro) THEN       
113    CALL cloud_optics_prop(klon, klev, paprs, pplay, temp, radocond, picefra, pclc, &
114    pcltau, pclemi, pch, pcl, pcm, pct, radocondwp, xflwp, xfiwp, xflwc, xfiwc, &
115    mass_solu_aero, mass_solu_aero_pi, pcldtaupi, distcltop, temp_cltop, re, fl, reliq, reice, &
116    reliq_pi, reice_pi, scdnc, cldncl, reffclwtop, lcc, reffclws, &
117    reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra,  &
118    icefrac_optics, dNovrN, ptconv,rnebcon, ccwcon)
119  ELSE
120    CALL nuage (paprs, pplay, &
121               temp, radocond, picefra, pclc, pcltau, pclemi, &
122               pch, pcl,pcm, pct, radocondwp, &
123               ok_aie, &
124               mass_solu_aero, mass_solu_aero_pi, &
125               bl95_b0, bl95_b1, distcltop, temp_cltop, &
126               pcldtaupi, re, fl)
127  ENDIF
128  RETURN
129
130END SUBROUTINE call_cloud_optics_prop
131
132END MODULE lmdz_call_cloud_optics_prop
Note: See TracBrowser for help on using the repository browser.