Closed taddyb closed 1 year ago
The code works for the whole month December for 2001 if run by itself. It looks to be a stability issue
Here is the self.top_layer.print()
that showed me there was an issue:
self.print()
[2023-07-17 14:30:01,932][models.physics.layers.Layer][INFO] - Printing the top_layer for rank: 4
[2023-07-17 14:30:01,933][models.physics.layers.Layer][INFO] - [ Depth Theta Layer_num dzdt k_cm_hr psi ]
[2023-07-17 14:30:01,933][models.physics.layers.WettingFront][INFO] - [10.0000, 0.1561597759, 0, 0.000000, 0.000000, 2011.4011]
[2023-07-17 14:30:01,934][models.physics.layers.WettingFront][INFO] - [25.0000, 0.1561597759, 1, 0.000000, 0.000000, 2011.4011]
[2023-07-17 14:30:01,934][models.physics.layers.WettingFront][INFO] - [109.2912, 0.1561597759, 2, 0.000000, 0.000000, 2011.4011]
If you look at the theta values, they are all the same. This means that inserting water will affect the whole column, which isn't what happens.
A proposed solution is to create a NN to estimate Van Genuchten params from soil %. This can give heterogeneity for the whole column!
Closing this for now. Not sure how to address in the scope of this project
What is going on:
It looks like the layer homogeneity is causing a problem when inserting water. When trying this code with another basin, it was found that this bug occurs when the
wetting_front_free_drainage
, or the deepest front effected by wetting, is the last layer.When this happens, the code dies since you can't calculate a d_theta. This code wasn't built for a homogeneous soil column.
The fix is super sneaky... ~This implies there is some model blow up at this timestep~
Error Traceback:
Steps to reproduce:
01031500