cryotools / cosipy

Coupled snowpack and ice surface energy and mass balance model in Python
GNU General Public License v3.0
52 stars 30 forks source link

Refreezing does not conserve column water content #64

Closed gampnico closed 3 days ago

gampnico commented 9 months ago

Issue: Refreezing does not conserve column water content when $\theta_{i} + \Delta\theta_{i} > 1$.

In the following snippet in refreezing.py:

theta_r = 0.0
[...]

if ((GRID.get_node_ice_fraction(idxNode) + dtheta_i + theta_r) >= 1.0):
    GRID.set_node_liquid_water_content(idxNode, theta_r)
    GRID.set_node_ice_fraction(idxNode, 1.0)
else:
    [...]

So when $\theta_{i} + \Delta\theta_{i}+\theta_{r} \geq 1$, the new liquid water content $\theta_{w}$ is set to $\theta_{r} = 0.0$, and the new ice fraction $\theta_{i} = 1.0$.

However, this means water is not conserved as the excess ice is discarded, therefore the layer regains less mass from refreezing.

This also leads to an overestimate for the refreeze parameter ($\theta_{i}h$) and an underestimate for the returned refrozen water ($\sum{-\Delta\theta_{w}z}$).

Possible Solutions: