Closed billsacks closed 5 years ago
@swensosc supports doing the extra update that I mention here. In fact, based on his input, I'll probably go a step further, and ensure that any routine that uses h2osno_total updates this value locally before using it.
Sorry for being late to the party, but I agree with these changes and with the general overhaul of the h2osno
variable in ctsm1.0.dev046. I've always found the double bookkeeping unnecessary and confusing
SnowCapping decides whether to remove excess snow based on h2osno. However, at the point where this is called, it looks like h2osno is out of sync with (h2osoi_liq + h2osoi_ice): Those variables can be changed slightly in SnowWater (which is called before SnowCapping), yet h2osno isn't recalculated based on those changes.
I don't think this causes a big problem in practice, but it seems like it would improve code understandability if we had the general rule that any code that references h2osno is using a version of h2osno that is in sync with (h2osoi_liq + h2osoi_ice). So in this particular case, I propose updating h2osno at the end of subroutine SnowWater.
I have confirmed that doing so will change answers, by running a one-year test with and without the following change (
SMS_Ly1.f09_g17.I2000Clm50SpGs.cheyenne_intel.clm-monthly
):@swensosc and @lvankampenhout can you please let me know if you see any problems with doing this extra update of h2osno before calling SnowCapping?