Code is repeated both inside if and in its else statement #1818
Labels
bfb
bit-for-bit
code health
improving internal code structure to make easier to maintain (sustainability)
The calculation of xmf in SoilTemperatureMod has an if statement where the if and else both contain the same expression. Thus the if statement should just be removed.
@mvdebolskiy noticed this.
It looks like this goes back to this commit:
Previous to that there was a difference and the else statement included a bit about frac_sno_eff
and looked like this...
xmf(c) = xmf(c) + frac_sno_eff(c)*hfus*(wice0(c,j)-h2osoi_ice(c,j))/dtime
From the commit log this difference was causing an energy imbalance.
The text was updated successfully, but these errors were encountered: