@@ -69,10 +69,16 @@ subroutine setup_radiation(config)
69
69
! Load the look-up tables from files in the specified directory
70
70
if (config% i_gas_model_sw == IGasModelMonochromatic) then
71
71
call setup_gas_optics_mono(config, trim (config% directory_name))
72
- else if (config% i_gas_model_sw == IGasModelIFSRRTMG .or. config% i_gas_model_lw == IGasModelIFSRRTMG) then
73
- call setup_gas_optics_rrtmg(config, trim (config% directory_name))
74
- else if (config% i_gas_model_sw == IGasModelECCKD .or. config% i_gas_model_lw == IGasModelECCKD) then
75
- call setup_gas_optics_ecckd(config)
72
+ else
73
+ ! Note that we can run RRTMG and ECCKD for different parts of
74
+ ! the spectrum: the setup routines only configure the relevant
75
+ ! part.
76
+ if (config% i_gas_model_sw == IGasModelIFSRRTMG .or. config% i_gas_model_lw == IGasModelIFSRRTMG) then
77
+ call setup_gas_optics_rrtmg(config, trim (config% directory_name))
78
+ end if
79
+ if (config% i_gas_model_sw == IGasModelECCKD .or. config% i_gas_model_lw == IGasModelECCKD) then
80
+ call setup_gas_optics_ecckd(config)
81
+ end if
76
82
end if
77
83
78
84
if (config% do_lw_aerosol_scattering &
@@ -121,7 +127,7 @@ subroutine setup_radiation(config)
121
127
end if
122
128
123
129
if (config% do_clouds) then
124
- if (config% i_gas_model == IGasModelMonochromatic) then
130
+ if (config% i_gas_model_sw == IGasModelMonochromatic) then
125
131
! call setup_cloud_optics_mono(config)
126
132
elseif (config% use_general_cloud_optics) then
127
133
call setup_general_cloud_optics(config)
@@ -131,7 +137,7 @@ subroutine setup_radiation(config)
131
137
end if
132
138
133
139
if (config% use_aerosols) then
134
- if (config% i_gas_model == IGasModelMonochromatic) then
140
+ if (config% i_gas_model_sw == IGasModelMonochromatic) then
135
141
! call setup_aerosol_optics_mono(config)
136
142
else
137
143
call setup_aerosol_optics(config)
@@ -166,12 +172,13 @@ subroutine set_gas_units(config, gas)
166
172
type (config_type), intent (in ) :: config
167
173
type (gas_type), intent (inout ) :: gas
168
174
169
- if (config% i_gas_model == IGasModelMonochromatic) then
175
+ if (config% i_gas_model_sw == IGasModelMonochromatic) then
170
176
call set_gas_units_mono(gas)
171
- elseif (config% i_gas_model == IGasModelECCKD) then
172
- call set_gas_units_ecckd(gas)
173
- else
177
+ elseif (config% i_gas_model_sw == IGasModelIFSRRTMG &
178
+ & .or. config% i_gas_model_lw == IGasModelIFSRRTMG) then
174
179
call set_gas_units_ifs(gas)
180
+ else
181
+ call set_gas_units_ecckd(gas)
175
182
end if
176
183
177
184
end subroutine set_gas_units
@@ -195,7 +202,7 @@ subroutine radiation(ncol, nlev, istartcol, iendcol, config, &
195
202
196
203
use radiation_io, only : nulout
197
204
use radiation_config, only : config_type, &
198
- & IGasModelMonochromatic, IGasModelIFSRRTMG, &
205
+ & IGasModelMonochromatic, IGasModelIFSRRTMG, IGasModelECCKD, &
199
206
& ISolverMcICA, ISolverSpartacus, ISolverHomogeneous, &
200
207
& ISolverTripleclouds
201
208
use radiation_single_level, only : single_level_type
@@ -320,23 +327,28 @@ subroutine radiation(ncol, nlev, istartcol, iendcol, config, &
320
327
! extinction due to Rayleigh scattering), Planck functions and
321
328
! incoming shortwave flux at each g-point, for the specified
322
329
! range of atmospheric columns
323
- if (config% i_gas_model == IGasModelMonochromatic) then
330
+ if (config% i_gas_model_sw == IGasModelMonochromatic) then
324
331
call gas_optics_mono(ncol,nlev,istartcol,iendcol, config, &
325
332
& single_level, thermodynamics, gas, lw_albedo, &
326
333
& od_lw, od_sw, ssa_sw, &
327
334
& planck_hl, lw_emission, incoming_sw)
328
- else if (config% i_gas_model == IGasModelIFSRRTMG) then
329
- call gas_optics_rrtmg(ncol,nlev,istartcol,iendcol, config, &
330
- & single_level, thermodynamics, gas, &
331
- & od_lw, od_sw, ssa_sw, lw_albedo= lw_albedo, &
332
- & planck_hl= planck_hl, lw_emission= lw_emission, &
333
- & incoming_sw= incoming_sw)
334
335
else
335
- call gas_optics_ecckd(ncol,nlev,istartcol,iendcol, config, &
336
- & single_level, thermodynamics, gas, &
337
- & od_lw, od_sw, ssa_sw, lw_albedo= lw_albedo, &
338
- & planck_hl= planck_hl, lw_emission= lw_emission, &
339
- & incoming_sw= incoming_sw)
336
+ if (config% i_gas_model_sw == IGasModelIFSRRTMG &
337
+ & .or. config% i_gas_model_lw == IGasModelIFSRRTMG) then
338
+ call gas_optics_rrtmg(ncol,nlev,istartcol,iendcol, config, &
339
+ & single_level, thermodynamics, gas, &
340
+ & od_lw, od_sw, ssa_sw, lw_albedo= lw_albedo, &
341
+ & planck_hl= planck_hl, lw_emission= lw_emission, &
342
+ & incoming_sw= incoming_sw)
343
+ end if
344
+ if (config% i_gas_model_sw == IGasModelECCKD &
345
+ & .or. config% i_gas_model_lw == IGasModelECCKD) then
346
+ call gas_optics_ecckd(ncol,nlev,istartcol,iendcol, config, &
347
+ & single_level, thermodynamics, gas, &
348
+ & od_lw, od_sw, ssa_sw, lw_albedo= lw_albedo, &
349
+ & planck_hl= planck_hl, lw_emission= lw_emission, &
350
+ & incoming_sw= incoming_sw)
351
+ end if
340
352
end if
341
353
342
354
if (config% do_clouds) then
@@ -349,7 +361,7 @@ subroutine radiation(ncol, nlev, istartcol, iendcol, config, &
349
361
350
362
! Compute hydrometeor absorption/scattering properties in each
351
363
! shortwave and longwave band
352
- if (config% i_gas_model == IGasModelMonochromatic) then
364
+ if (config% i_gas_model_sw == IGasModelMonochromatic) then
353
365
call cloud_optics_mono(nlev, istartcol, iendcol, &
354
366
& config, thermodynamics, cloud, &
355
367
& od_lw_cloud, ssa_lw_cloud, g_lw_cloud, &
@@ -368,7 +380,7 @@ subroutine radiation(ncol, nlev, istartcol, iendcol, config, &
368
380
end if ! do_clouds
369
381
370
382
if (config% use_aerosols) then
371
- if (config% i_gas_model == IGasModelMonochromatic) then
383
+ if (config% i_gas_model_sw == IGasModelMonochromatic) then
372
384
! call add_aerosol_optics_mono(nlev,istartcol,iendcol, &
373
385
! & config, thermodynamics, gas, aerosol, &
374
386
! & od_lw, ssa_lw, g_lw, od_sw, ssa_sw, g_sw)
0 commit comments