ESCOMP / SimpleLand

Simple Land Model for CESM --- *** IN DEVELOPMENT *** --- please contact for more info. See supplemental information of https://journals.ametsoc.org/doi/abs/10.1175/JCLI-D-18-0812.1 for a description of SLIM physics. Implementation of SLIM into the main CESM trunk is ongoing. SLIM currently works with the CESM2.1 release, but must be downloaded from this repository until we finish implementing it properly into the main CESM code.
Other
14 stars 7 forks source link

Convert LH to evap (kg) AFTER doing SH correction #8

Open marysa opened 3 years ago

marysa commented 3 years ago

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 the lhflx 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 use evap 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!

marysa commented 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!

ekluzek commented 3 years ago

@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.

marysa commented 3 years ago

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.