Skip to content

Commit ab0026b

Browse files
authored
Merge pull request #3792 from CliMA/gb/nogw
Make nogw_callback no-op when there's no GW
2 parents 52734d3 + f4592c3 commit ab0026b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/callbacks/callbacks.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,11 @@ NVTX.@annotate function nogw_model_callback!(integrator)
407407
Y = integrator.u
408408
p = integrator.p
409409

410-
non_orographic_gravity_wave_compute_tendency!(Y, p)
410+
non_orographic_gravity_wave_compute_tendency!(
411+
Y,
412+
p,
413+
p.atmos.non_orographic_gravity_wave,
414+
)
411415
return nothing
412416
end
413417

src/parameterized_tendencies/gravity_wave_drag/non_orographic_gravity_wave.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,13 @@ function non_orographic_gravity_wave_cache(Y, gw::NonOrographicGravityWave)
131131
end
132132
end
133133

134-
function non_orographic_gravity_wave_compute_tendency!(Y, p)
134+
non_orographic_gravity_wave_compute_tendency!(Y, p, ::Nothing) = nothing
135+
136+
function non_orographic_gravity_wave_compute_tendency!(
137+
Y,
138+
p,
139+
::NonOrographicGravityWave,
140+
)
135141
#unpack
136142
ᶜT = p.scratch.ᶜtemp_scalar
137143
(; ᶜts) = p.precomputed

0 commit comments

Comments
 (0)