Skip to content

Commit

Permalink
move const outside broadcast expression
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbyrne committed Jul 21, 2023
1 parent 14712c3 commit 9645c9c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/parameterized_tendencies/microphysics/precipitation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,10 @@ function precipitation_tendency!(

# update precip in cache for coupler's use
# 3d rain and snow
T_f = FT(273.15)
@. ᶜT[colidx] = TD.air_temperature(thermo_params, ᶜts[colidx])
@. ᶜ3d_rain[colidx] =
ifelse(ᶜT[colidx] >= FT(273.15), ᶜS_ρq_tot[colidx], FT(0))
@. ᶜ3d_snow[colidx] =
ifelse(ᶜT[colidx] < FT(273.15), ᶜS_ρq_tot[colidx], FT(0))
@. ᶜ3d_rain[colidx] = ifelse(ᶜT[colidx] >= T_f, ᶜS_ρq_tot[colidx], FT(0))
@. ᶜ3d_snow[colidx] = ifelse(ᶜT[colidx] < T_f, ᶜS_ρq_tot[colidx], FT(0))
Operators.column_integral_definite!(
col_integrated_rain[colidx],
ᶜ3d_rain[colidx],
Expand Down

0 comments on commit 9645c9c

Please sign in to comment.