source: LMDZ6/trunk/libf/phylmd/ecrad/ifs/ice_effective_radius.F90 @ 5450

Last change on this file since 5450 was 4773, checked in by idelkadi, 13 months ago
  • Update of Ecrad in LMDZ The same organization of the Ecrad offline version is retained in order to facilitate the updating of Ecrad in LMDZ and the comparison between online and offline results. version 1.6.1 of Ecrad (https://github.com/lguez/ecrad.git)
  • Implementation of the double call of Ecrad in LMDZ


File size: 5.9 KB
Line 
1SUBROUTINE ICE_EFFECTIVE_RADIUS &
2     & (YDERAD,KIDIA, KFDIA, KLON, KLEV, &
3     &  PPRESSURE, PTEMPERATURE, PCLOUD_FRAC, PQ_ICE, PQ_SNOW, PGEMU, &
4     &  PRE_UM) !, PPERT)
5
6! ICE_EFFECTIVE_RADIUS
7!
8! (C) Copyright 2016- ECMWF.
9!
10! This software is licensed under the terms of the Apache Licence Version 2.0
11! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
12!
13! In applying this licence, ECMWF does not waive the privileges and immunities
14! granted to it by virtue of its status as an intergovernmental organisation
15! nor does it submit to any jurisdiction.
16!
17! PURPOSE
18! -------
19!   Calculate effective radius of ice clouds
20!
21! AUTHOR
22! ------
23!   Robin Hogan, ECMWF (using code extracted from radlswr.F90)
24!   Original: 2016-02-24
25!
26! MODIFICATIONS
27! -------------
28!
29!
30! -------------------------------------------------------------------
31
32USE PARKIND1 , ONLY : JPIM, JPRB
33USE YOMHOOK  , ONLY : LHOOK, DR_HOOK, JPHOOK
34USE YOERAD   , ONLY : TERAD
35USE YOMLUN   , ONLY : NULERR
36USE YOMCST   , ONLY : RD, RTT
37
38! -------------------------------------------------------------------
39
40IMPLICIT NONE
41
42! INPUT ARGUMENTS
43
44! *** Array dimensions and ranges
45TYPE(TERAD)       ,INTENT(IN) :: YDERAD
46INTEGER(KIND=JPIM),INTENT(IN) :: KIDIA    ! Start column to process
47INTEGER(KIND=JPIM),INTENT(IN) :: KFDIA    ! End column to process
48INTEGER(KIND=JPIM),INTENT(IN) :: KLON     ! Number of columns
49INTEGER(KIND=JPIM),INTENT(IN) :: KLEV     ! Number of levels
50
51! *** Variables on model levels
52REAL(KIND=JPRB),   INTENT(IN) :: PPRESSURE(KLON,KLEV)    ! (Pa)
53REAL(KIND=JPRB),   INTENT(IN) :: PTEMPERATURE(KLON,KLEV) ! (K)
54REAL(KIND=JPRB),   INTENT(IN) :: PCLOUD_FRAC(KLON,KLEV)  ! (kg/kg)
55REAL(KIND=JPRB),   INTENT(IN) :: PQ_ICE(KLON,KLEV)       ! (kg/kg)
56REAL(KIND=JPRB),   INTENT(IN) :: PQ_SNOW(KLON,KLEV)      ! (kg/kg)
57
58! *** Single level variable
59REAL(KIND=JPRB),   INTENT(IN) :: PGEMU(KLON) ! Sine of latitude
60
61! OUTPUT ARGUMENT
62! Effective radius
63REAL(KIND=JPRB),  INTENT(OUT) :: PRE_UM(KLON,KLEV) ! (microns)
64
65! OPTIONAL INPUT ARGUMENT
66! SPP perturbation pattern
67! REAL(KIND=JPRB),  INTENT(IN), OPTIONAL :: PPERT(KLON,YSPP%N2DRAD)
68
69! LOCAL VARIABLES
70
71REAL(KIND=JPRB) :: ZIWC_INCLOUD_GM3 ! In-cloud ice+snow water content in g m-3
72REAL(KIND=JPRB) :: ZAIR_DENSITY_GM3 ! Air density in g m-3
73
74REAL(KIND=JPRB) :: ZTEMPERATURE_C   ! Temperature, degrees Celcius
75REAL(KIND=JPRB) :: ZAIWC, ZBIWC     ! Factors in empirical relationship
76REAL(KIND=JPRB) :: ZDEFAULT_RE_UM   ! Default effective radius in microns
77REAL(KIND=JPRB) :: ZDIAMETER_UM     ! Effective diameter in microns
78
79! Min effective diameter in microns; may vary with latitude
80REAL(KIND=JPRB) :: ZMIN_DIAMETER_UM(KLON)
81
82INTEGER(KIND=JPIM) :: JL, JK
83
84REAL(KIND=JPHOOK) :: ZHOOK_HANDLE
85
86! -------------------------------------------------------------------
87
88#include "abor1.intfb.h"
89
90! -------------------------------------------------------------------
91
92IF (LHOOK) CALL DR_HOOK('ICE_EFFECTIVE_RADIUS',0,ZHOOK_HANDLE)
93
94! -------------------------------------------------------------------
95
96SELECT CASE(YDERAD%NRADIP)
97CASE(0)
98  ! Ice effective radius fixed at 40 microns
99  PRE_UM(KIDIA:KFDIA,:) = 40.0_JPRB 
100
101CASE(1,2)
102  ! Ice effective radius from Liou and Ou (1994)
103  DO JK = 1,KLEV
104    DO JL = KIDIA,KFDIA
105      ! Convert Kelvin to Celcius, preventing positive numbers
106      ZTEMPERATURE_C = MIN(PTEMPERATURE(JL,JK) - RTT, -0.1_JPRB)
107      ! Liou and Ou's empirical formula
108      PRE_UM(JL,JK) = 326.3_JPRB + ZTEMPERATURE_C * (12.42_JPRB&
109           &  + ZTEMPERATURE_C * (0.197_JPRB + ZTEMPERATURE_C * 0.0012_JPRB))
110      IF (YDERAD%NRADIP == 1) THEN
111        ! Original Liou and Ou (1994) bounds of 40-130 microns
112        PRE_UM(JL,JK) = MAX(PRE_UM(JL,JK), 40.0_JPRB)
113        PRE_UM(JL,JK) = MIN(PRE_UM(JL,JK),130.0_JPRB)
114      ELSE
115        ! Formulation following Jakob, Klein modifications to ice
116        ! content
117        PRE_UM(JL,JK) = MAX(PRE_UM(JL,JK), 30.0_JPRB)
118        PRE_UM(JL,JK) = MIN(PRE_UM(JL,JK), 60.0_JPRB)
119      ENDIF
120    ENDDO
121  ENDDO
122
123CASE(3)
124  ! Ice effective radius = f(T,IWC) from Sun and Rikus (1999), revised
125  ! by Sun (2001)
126
127  ! Default effective radius is computed from an effective diameter of
128  ! 80 microns; note that multiplying by re2de actually converts from
129  ! effective diameter to effective radius.
130  ZDEFAULT_RE_UM = 80.0_JPRB * YDERAD%RRE2DE
131
132  ! Minimum effective diameter may vary with latitude
133  IF (YDERAD%NMINICE == 0) THEN
134    ! Constant effective diameter
135    ZMIN_DIAMETER_UM(KIDIA:KFDIA) = YDERAD%RMINICE
136  ELSE
137    ! Ice effective radius varies with latitude, smaller at poles
138    DO JL = KIDIA,KFDIA
139      ZMIN_DIAMETER_UM(JL) = 20.0_JPRB + (YDERAD%RMINICE - 20.0_JPRB)&
140           &                          * COS(ASIN(PGEMU(JL)))
141    ENDDO
142  ENDIF
143
144  DO JK = 1,KLEV
145    DO JL = KIDIA,KFDIA
146      IF (PCLOUD_FRAC(JL,JK) > 0.001_JPRB&
147           &  .AND. (PQ_ICE(JL,JK)+PQ_SNOW(JL,JK)) > 0.0_JPRB) THEN
148        ZAIR_DENSITY_GM3 = 1000.0_JPRB * PPRESSURE(JL,JK) / (RD*PTEMPERATURE(JL,JK))
149        ZIWC_INCLOUD_GM3 = ZAIR_DENSITY_GM3 * (PQ_ICE(JL,JK) + PQ_SNOW(JL,JK))&
150             &           / PCLOUD_FRAC(JL,JK)
151        ZTEMPERATURE_C = PTEMPERATURE(JL,JK) - RTT
152        ! Sun, 2001 (corrected from Sun & Rikus, 1999)
153        ZAIWC = 45.8966_JPRB * ZIWC_INCLOUD_GM3**0.2214_JPRB
154        ZBIWC = 0.7957_JPRB  * ZIWC_INCLOUD_GM3**0.2535_JPRB
155        ZDIAMETER_UM = (1.2351_JPRB + 0.0105_JPRB * ZTEMPERATURE_C)&
156             & * (ZAIWC + ZBIWC*(PTEMPERATURE(JL,JK) - 83.15_JPRB))
157
158        ZDIAMETER_UM = MIN ( MAX( ZDIAMETER_UM, ZMIN_DIAMETER_UM(JL)), 155.0_JPRB)
159        PRE_UM(JL,JK) = ZDIAMETER_UM * YDERAD%RRE2DE
160      ELSE
161        PRE_UM(JL,JK) = ZDEFAULT_RE_UM
162      ENDIF
163    ENDDO
164  ENDDO
165 
166CASE DEFAULT
167  WRITE(NULERR,'(A,I0,A)') 'ICE EFFECTIVE RADIUS OPTION NRADLP=',YDERAD%NRADIP,' NOT AVAILABLE'
168  CALL ABOR1('ERROR IN ICE_EFFECTIVE_RADIUS')
169
170END SELECT
171
172! -------------------------------------------------------------------
173
174IF (LHOOK) CALL DR_HOOK('ICE_EFFECTIVE_RADIUS',1,ZHOOK_HANDLE)
175 
176END SUBROUTINE ICE_EFFECTIVE_RADIUS
Note: See TracBrowser for help on using the repository browser.