Skip to content

Commit 7c35dac

Browse files
Allow dispatching RRTMGPModel on radiation_mode
1 parent 8180646 commit 7c35dac

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

src/parameterized_tendencies/radiation/RRTMGPInterface.jl

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ array.
404404
- `center_z`: z-coordinate in m at cell centers
405405
- `face_z`: z-coordinate in m at cell faces
406406
"""
407-
function RRTMGPModel(
407+
RRTMGPModel(
408408
params::RRTMGP.Parameters.ARP,
409409
context;
410410
ncol::Int,
@@ -414,6 +414,29 @@ function RRTMGPModel(
414414
bottom_extrapolation::AbstractBottomExtrapolation = SameAsInterpolation(),
415415
use_global_means_for_well_mixed_gases::Bool = false,
416416
kwargs...,
417+
) = _RRTMGPModel(
418+
params,
419+
context,
420+
radiation_mode;
421+
ncol,
422+
domain_nlay,
423+
interpolation,
424+
bottom_extrapolation,
425+
use_global_means_for_well_mixed_gases,
426+
kwargs...,
427+
)
428+
429+
# TODO: make this the new interface for the next breaking release.
430+
function _RRTMGPModel(
431+
params::RRTMGP.Parameters.ARP,
432+
context,
433+
radiation_mode::AbstractRRTMGPMode = ClearSkyRadiation();
434+
ncol::Int,
435+
domain_nlay::Int,
436+
interpolation::AbstractInterpolation = NoInterpolation(),
437+
bottom_extrapolation::AbstractBottomExtrapolation = SameAsInterpolation(),
438+
use_global_means_for_well_mixed_gases::Bool = false,
439+
kwargs...,
417440
)
418441
device = ClimaComms.device(context)
419442
DA = ClimaComms.array_type(device)

0 commit comments

Comments
 (0)