40 USE rad_pcf,
ONLY: ip_cloud_mix_max, ip_cloud_mix_random, &
41 ip_cloud_triple, ip_cloud_part_corr, ip_cloud_part_corr_cnv, &
42 ip_cloud_mcica, ip_cloud_clear, &
43 ip_solver_homogen_direct, ip_solver_mix_direct_hogan, &
44 ip_solver_triple_hogan, ip_solver_triple_app_scat, &
45 ip_solver_mix_app_scat, ip_solver_no_scat, &
46 ip_cloud_homogen, ip_cloud_ice_water, ip_cloud_conv_strat, &
48 ip_scaling, ip_mcica, &
49 ip_max_rand, ip_exponential_rand, ip_rand, &
50 ip_scatter_approx, ip_no_scatter_abs, ip_no_scatter_ext
51 USE ereport_mod,
ONLY: ereport
52 USE def_control,
ONLY: strctrl
60 type(model_state_type),
target,
intent(inout) :: current_state
62 TYPE(StrCtrl),
INTENT(INOUT) :: lw_control
66 INTEGER :: namelist_unit
68 REAL(KIND=
jprb) :: zhook_handle
70 CHARACTER(LEN=*) :: RoutineName
71 parameter( routinename=
'lw_rad_input_mod')
72 CHARACTER(LEN=errormessagelength) :: CMessage
74 IF (
lhook)
CALL dr_hook(
'LW_INPUT',zhook_in,zhook_handle)
78 CALL lw_control_default(lw_control)
80 lw_control%spectral_file = &
82 lw_control%i_gas_overlap = &
84 lw_control%i_cloud_representation = &
86 lw_control%i_st_water = &
88 lw_control%i_st_ice = &
90 lw_control%i_scatter_method = &
95 IF (lw_control%i_cloud_representation == ip_cloud_homogen)
THEN
97 lw_control%i_solver=ip_solver_homogen_direct
98 IF (lw_control%i_inhom == ip_mcica)
THEN
101 lw_control%i_cloud=ip_cloud_mcica
103 IF (lw_control%i_overlap == ip_max_rand)
THEN
104 lw_control%i_cloud=ip_cloud_mix_max
105 ELSE IF (lw_control%i_overlap == ip_exponential_rand)
THEN
106 lw_control%i_cloud=ip_cloud_part_corr
107 ELSE IF (lw_control%i_overlap == ip_rand)
THEN
108 lw_control%i_cloud=ip_cloud_mix_random
111 cmessage =
'The selected cloud overlap is not available'
112 CALL ereport(routinename, errorstatus, cmessage)
116 ELSE IF (lw_control%i_cloud_representation == ip_cloud_ice_water)
THEN
118 IF (lw_control%i_inhom == ip_mcica)
THEN
119 lw_control%i_cloud=ip_cloud_mcica
120 IF ( (lw_control%i_scatter_method == ip_no_scatter_abs) .OR. &
121 (lw_control%i_scatter_method == ip_no_scatter_ext) )
THEN
124 lw_control%i_solver =ip_solver_no_scat
125 lw_control%i_solver_clear=ip_solver_no_scat
127 lw_control%i_solver=ip_solver_homogen_direct
130 IF (lw_control%i_scatter_method == ip_scatter_approx)
THEN
131 lw_control%i_solver=ip_solver_mix_app_scat
133 lw_control%i_solver=ip_solver_mix_direct_hogan
135 IF (lw_control%i_overlap == ip_max_rand)
THEN
136 lw_control%i_cloud=ip_cloud_mix_max
137 ELSE IF (lw_control%i_overlap == ip_exponential_rand)
THEN
138 lw_control%i_cloud=ip_cloud_part_corr
139 ELSE IF (lw_control%i_overlap == ip_rand)
THEN
140 lw_control%i_cloud=ip_cloud_mix_random
143 cmessage =
'The selected cloud overlap is not available'
144 CALL ereport(routinename, errorstatus, cmessage)
148 ELSE IF ((lw_control%i_cloud_representation == ip_cloud_conv_strat) .OR. &
149 (lw_control%i_cloud_representation == ip_cloud_csiw))
THEN
151 IF (lw_control%i_inhom == ip_mcica)
THEN
153 cmessage =
'McICA is not compatible with the selected'// &
154 ' cloud representation'
155 CALL ereport(routinename, errorstatus, cmessage)
157 IF (lw_control%i_scatter_method == ip_scatter_approx)
THEN
158 lw_control%i_solver=ip_solver_triple_app_scat
160 lw_control%i_solver=ip_solver_triple_hogan
162 IF (lw_control%i_overlap == ip_max_rand)
THEN
163 lw_control%i_cloud=ip_cloud_triple
164 ELSE IF (lw_control%i_overlap == ip_exponential_rand)
THEN
165 lw_control%i_cloud=ip_cloud_part_corr_cnv
166 ELSE IF (lw_control%i_overlap == ip_rand)
THEN
167 lw_control%i_cloud=ip_cloud_mix_random
170 cmessage =
'The selected cloud overlap is not available'
171 CALL ereport(routinename, errorstatus, cmessage)
178 lw_control%l_cloud=.false.
179 lw_control%i_cloud=ip_cloud_clear
180 IF ( (lw_control%i_scatter_method == ip_no_scatter_abs) .OR. &
181 (lw_control%i_scatter_method == ip_no_scatter_ext) )
THEN
182 lw_control%i_solver =ip_solver_no_scat
183 lw_control%i_solver_clear=ip_solver_no_scat
185 lw_control%i_solver=ip_solver_homogen_direct
187 lw_control%l_microphysics=.false.
190 IF (
lhook)
CALL dr_hook(
'LW_INPUT',zhook_out,zhook_handle)