Skip to content

Commit 9b12bde

Browse files
authored
always unpack vor_tend
1 parent f8de49d commit 9b12bde

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/stochastic_stirring.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ function SpeedyWeather.forcing!(
138138
end
139139
end
140140

141+
# add stochastic stirring term S to vorticity tendency
142+
# with masked or without (=skip additional transform)
143+
(; vor_tend) = diagn.tendencies
141144
if forcing.mask
142145
# to grid-point space
143146
S_grid = diagn.dynamics_variables.a_grid # reuse general work array
@@ -147,7 +150,6 @@ function SpeedyWeather.forcing!(
147150
RingGrids._scale_lat!(S_grid, forcing.lat_mask)
148151

149152
# back to spectral space, write directly into vorticity tendency
150-
(; vor_tend) = diagn.tendencies
151153
SpeedyTransforms.spectral!(vor_tend, S_grid, spectral_transform)
152154
else
153155
vor_tend .= S # copy forcing S over into vor_tend

0 commit comments

Comments
 (0)