Open marysa opened 3 years ago
Fixed this, moved it to after the "if latent heat evaporates too much water, put the excess into sensible heat flux", so lh and evap should now be consistent. I suppose if I were being more careful it would be useful to also add a balance check at the end that puts evap and lhflx into the same units and makes sure they do indeed match. So I'll leave this open for now until adding that balance check!
@marysa I was running into similar problems when using this file: /glade/work/mlague/simple_land/inputs/mml_1.9x2.5_default.nc. So I'll try it again to see if this might be resolved now. Thanks for fixing this and documenting it here.
I don't know if it will fix all the "on no a nan showed up" problems, but it was definitely wrong (not self-consistent) before.
Right now I'm converting latent heat flux to water units before doing the "did you try to evaporate more water than you have" check (which puts excess latent heat flux into sensible heat flux). It should happen after, otherwise the
evap
variable (in water units) won't match thelhflx
variable (in energy units) if some of lhflx gets transferred to shflx. Quick fix, but if I try to do it right now when I'm tired I'll break something. I then useevap
to subtract water from the bucket, which wouldn't have the adjustment for sensible heat flux included - maybe this is causing some of the soil moisture followed by nan problems. Maybe not. Regardless, it seems wrong, so should be fixed!