geco-bern / rsofun

Implements the Simulating Optimal FUNctioning framework for site-scale simulations of ecosystem processes, including model calibration. It contains Fortran 90 modules for the P-model, SPLASH, and BiomeE models.
https://geco-bern.github.io/rsofun/
GNU General Public License v3.0
25 stars 29 forks source link

Phydro fix le output #221

Closed fabern closed 2 months ago

fabern commented 2 months ago

This branch will be used to fix #220

fabern commented 2 months ago

This commit fixes the consistency check that AET (tot) must be equal to AET_soil and AET_canop.

It does so by reducing AET_canop whenever AET reduced, leaving AET_soil untouched. However, this can yield negative AET_canop fluxes, meaning water is pulled out of the plant into the soil. It would probably be more reasonable to modify AET_soil and AET_canop accordingly.

@stineb Do you see a good solution to assert AET == AET_soil + AET_canopy when AET is reduced to to soil moisture stress?

stineb commented 2 months ago

It could be done by maintaining the fraction (canopy transpiration / ET).

fabern commented 2 months ago

TODO: many tests are currently not working. I fix these before PR merging.

stineb commented 2 months ago

@fabern tests may fail also in phydro. You don't have to fix those before merging phydro-fix-le-output into phydro.