error in errsol computation in BalanceCheckMod reports the wrong albedo values
Brief summary of bug
When an error occurs in BalanceCheckMod for errsol - the wrong albedo values are reported.
General bug information
The reason for this is the following. In in clm_driver.F90 the following call sequence occurs:
call SurfaceRadiation()
! Determine albedos for NEXT TIME STEP
if (doalb) then
call SurfaceAlbedo()
endif
call BalanceCheck()
In BalanceCheck the albedos that are reported for the energy balance error are those obtained from SurfaceAlbedo for the next time step - and NOT the ones used in SurfaceRadiation. This gives misleading information as to the cause of the balance error. I believe that the correct solution is to have a separate routine to check energy balance errors that is called directly at the end of SurfaceRadiation - either from SurfaceRadiation or from clm_driver.
Does this bug cause significantly incorrect results in the model's science? no
Configurations affected: All
I think the proposed solution makes sense @mvertens