Add more rigorous balance checks for energy
- Dominant language
- Fortran
- Stars
- 352
- Forks
- 361
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
_From @billsacks on March 17, 2017 20:58_
BalanceCheckMod has rigorous balance checks for water - comparing the (endwb - begwb) difference with the fluxes in and out. However, if I understand our energy balance checks correctly, they are somewhat less rigorous: They compare various energy fluxes (which is good), but don't go so far as to compare the net energy flux with the change in energy content of the column. So, for example, we could have some bug that causes soil temperatures to constantly increase (i.e., an artificial source of energy), and as far as I can tell, the current balance checks would not catch that.
The new routines in BalanceCheckMod that are about to come to the trunk - ComputeHeatLake and ComputeHeatNonLake (adapted from some code that @dlawren put in place a few years ago, and with great help from both @dlawren and @olyson ) - could facilitate adding more rigorous energy balance checks: comparing the change in total column energy content with the net fluxes.
In addition to having column-level energy balance checks like this, we would likely also want gridcell-level energy balance checks bracketing the entire run loop - similar to what's discussed for gridcell-level water balance checks in #201 .
For these energy balance checks to pass, we'd probably need to address some of the `TODO` notes in BalanceCheckMod:
```Fortran
! TODO(wjs, 2017-03-11) Canopy water currently doesn't have an explicit
! temperature; thus, we only add its latent heat of fusion. Eventually, we should
! probably track its temperature explicitly - or at least give it an implicit
! temperature for the sake of these energy calculations (I think that's needed for
! full conservation).
```
```Fortran
! TODO(wjs, 2017-03-11) Include heat content of water in lakes, once we include
! lake water as an explicit water state (https://github.com/NCAR/CLM/issues/2)
```
Also, we'd probably need to track the temperature of water lost via runoff. And there may be some other sources of unaccounted-for energy as well which we would need to address.
_Copied from original issue: NCAR/CLM#4_
Contributor guide
Assessment
This issue has not been assessed yet.