-
Notifications
You must be signed in to change notification settings - Fork 92
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hydro crashes in sites with no cohorts -> hardening discussion #706
Comments
Hi @rgknox , Is this issue still actual ? If you think it might be related to my problem I would appreciate more details as I am not sure to understand where changes should be made to overwrite fluxes and not run hydro if no roots. Thanks a lot in advance :) Marius |
The specific issue brought up in this thread has been addressed. When calculating the shell volumes, we have provisions in place to generate some nominal values when there are no roots present, see here: |
@mariuslam, how do you enforce hardening? |
@JunyanDing, (To better show the problem I updated the plot for the soil potential). So the low values for water potential are mostly due to freezing of the 4cm soil layer which reaches -40°C (Both in the reference and in the hardening simulations). In my hardening simulations I decrease Kmax between plant compartments incuding between roots and soil. So I keep the water potential of the plant compartments at values above -15Mpa. I increase the gradient between soil and plant which simply makes the problem occur earlier. |
@mariuslam are the units in that plot in MPa? If so, we may have to look through our various functions and perform math on those pressures. It could be that the math operations simply can't handle numbers so large. For instance, in Van Genuchten, we would be raising 150 to a power, that could be bad if the exponents are large. Maybe its not an issue, but worth investigating... I'm looking through FatesHydroWTFMod.F90 and see some functions where psi is raised to a power that could cause problems (at least with VG). What water retention and conductivity hypothesis did you use? https://github.com/NGEET/fates/blob/master/biogeophys/FatesHydroWTFMod.F90 Maybe we should identify a safe range of pressures that these functions can operate on, and then get some code written that will protect them somehow. One option would be to have a hard cap on the lower bound of psi. Or.. maybe the problem is something else. |
Yes Mpa from unchanged output. I reproduced a default run at yakutsk (siberia) with a very recent version : sci.1.48.0_api.17, Showing water potentials reaching -150 in plants and -700 in soil. Potentially much lower when it crashes. I use TFS for plants and CCH for soil. The hardening scheme can keep water potentials high in plants, but would be amazing to have a limit on the soil psi |
I wonder if there is a way to stabilize this by putting a floor on the amount of supercooled liquid water allowed to exist in the soils when they get far below the freezign point? Maybe by putting a with a value of 263K or something like that for |
Thanks Charlie, the solver liked the suggestion :) Here some plots to illustrate what the correction did if I put min_temp_soilfreeze = 263. I am wondering if this value should be a little lower (258K), and if there shouldn't be some complementary fix? It seems like psi still goes to -4000MPa during that extreme year. |
I don't think so, those changes are all really addressing Van Genuchten, which you don't use. Functionally, -8000 MPa is an amazingly small amount of water. I'm imagining someone trying to reproduce that in a lab, it seems like one atom (edit: molecule, sorry) is alone in that cubic meter of soil, refusing to leave, making its last stand, breaking our math. Even -20MPa is bone dry, nothing there... I'm thinking a few things. First, we either want to look at the conductance and P-V functions, and make sure they can operate at very low PSI values. At first, I was thinking that we should enforce a cap on psi, and not let it go below. But I think this would cause problems, because you will not get the same volume back if you translate V -> P, and then P->V. Ie capped functions are not bi-directional. I suppose we could put in a linear regime below -20MPa, and give it some artificial weak slope that approximates a cap but allows the functions to be reversable. Or, it could be an issue with the FTC. On the plant side, we do have a minimum FTC. It was set really low to avoid divide by zeros. But maybe we need to set it even lower. I could be that this minimum fraction of total conductance is slowly generating the steep gradients and forcing water fluxes from pools that are incredibly dry... Maybe try setting it to something incredibly small, like 1e-20? See here: The FTC functions themselves could also be susceptable to underflow at very very large negative PSI... I'm not sure what a good psi_sat value is, but the equation for the derivative has the following term in there (approximating exponent):
And playing around with values of psi_sat (which should be negative small), I'm easily getting ftc values << 1e-25. |
Hi @rgknox, Thanks for the tips! I tried the easiest first: I set the minimum ftc at 1e-20 and saw no difference, so I played a bit with psi_sat. |
I made a test with linear interpolation below -25MPa, the model runs and reacts as expected. Does the method I use seems reasonable to you ? @rgknox , @rosiealice . function psi_from_th_cch(this,th) result(psi)
end function psi_from_th_cch |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
When there are no cohorts in a site/column, the hydro code generates nans and other spurious boundary conditions and crashes simulations. As far as we can tell, this first happens in the attempts to create new rhizosphere shell volumes, where the math doesn't work when there are no fine roots at all.
For instance here we calculate total fine root length by looping over cohorts:
https://github.com/NGEET/fates/blob/master/biogeophys/FatesPlantHydraulicsMod.F90#L1714-L1724
If the variable csite_hydr%l_aroot_layer(:) is zero in any layer, there are problems here (local l_aroot is zero and raised to neg power):
https://github.com/NGEET/fates/blob/master/biogeophys/FatesPlantHydraulicsMod.F90#L4207
The solution should be fairly straight forward, as hydro does not need to be run when there are no roots and can have some nominal place-holder values as well as 0 root uptake fluxes.
@pnlfang @JunyanDing have both confirmed this behavior
The text was updated successfully, but these errors were encountered: