-
Notifications
You must be signed in to change notification settings - Fork 10
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
Extend plant hydraulics rooting depth to support fields #783
Commits on Oct 1, 2024
-
Change PlantHydraulicsParameters to hold rooting_depth
PlantHydraulicsParameters previously held a root distribution function that had a default value for rooting depth. This function is always the same outside testing, so it was removed as a parameter and placed into src. rooting_depth, an argument to the distribution function is now a parameters that is either a Float or a field. The tests are changed to check passing rooting_depth as a float or a field of floats that are the same everywhere. One test in plant_hydraulics_test.jl only checks the case of when rooting_depth is a float because changing to a field requires extensive changes to the entire test.
Configuration menu - View commit details
-
Copy full SHA for d4dd47d - Browse repository at this point
Copy the full SHA d4dd47dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 099033e - Browse repository at this point
Copy the full SHA 099033eView commit details -
Change plant hydraulics integration test to use fields
The test solves a system of functions which is defined in initial_compute_expected_tendecy!. That function is now changed to support fields, but each equation in the system of equations still outputs a scalar. This is done by taking a mean across the resulting field. This is done because NLsolve does not work of equations on fields.
Configuration menu - View commit details
-
Copy full SHA for 16b5aa3 - Browse repository at this point
Copy the full SHA 16b5aa3View commit details -
Change runs to use spatially varying rooting depth
longruns/land.jl, benchmarks/land.jl and longruns/land_regional.jl are changed to use the root depth map from the clm data
Configuration menu - View commit details
-
Copy full SHA for 4b76f9d - Browse repository at this point
Copy the full SHA 4b76f9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1eb7ad2 - Browse repository at this point
Copy the full SHA 1eb7ad2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e23db8 - Browse repository at this point
Copy the full SHA 1e23db8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7cf6c83 - Browse repository at this point
Copy the full SHA 7cf6c83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d1ee0b - Browse repository at this point
Copy the full SHA 0d1ee0bView commit details -
Change plant_hydraulics_test to follow previous behavior
Previously the Plant hydraulics model integration tests were changed to work with rooting_depth as a field. In the test, the solution of a system of equations is found using NLsolve. The previous change redefined each equation in the system of equations to create a field of values the equation evaluates to, and then takes the mean of the field so the equation still results in a scalar. To better follow the functionality of the previous test, this commit reverts the system of equations to only work on a scalar rooting_depth. The solution to the system of equations is returned as a vector of floats. It is not possible to create a ClimaCore Field of vectors. Instead, the solution is stored as a vector of fields. To implement this, a function that returns a function representing a system of equations is created. This results in a system of equations for each cell. At first, each system of equations was solved once for each variable in the vector of solutions, resulting in many repeated equations solves. To prevent this a dictionary is used. Each variable in the solution must be returned independently in order to create a vector of fields.
Configuration menu - View commit details
-
Copy full SHA for db1363f - Browse repository at this point
Copy the full SHA db1363fView commit details -
Add a constructor that finds rooting_depth from root_distribution
Configuration menu - View commit details
-
Copy full SHA for 43f439f - Browse repository at this point
Copy the full SHA 43f439fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b3246f - Browse repository at this point
Copy the full SHA 9b3246fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5703f1e - Browse repository at this point
Copy the full SHA 5703f1eView commit details -
A previous commit made the change not breaking by making constructor accept a rooting_distribtion parameter, and then calculating rooting_depth from that. That calculation assumes that rooting_distribuion will be in a specific form.
Configuration menu - View commit details
-
Copy full SHA for 0253ee6 - Browse repository at this point
Copy the full SHA 0253ee6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5bb62f7 - Browse repository at this point
Copy the full SHA 5bb62f7View commit details -
Make changes non-breaking (again)
Added support for root_distribution. The PlantHydraulicsParameters struct has root_distribtion again. Both root_distribution and root_depth can be nothing. The constructor uses depwarn when root_distribution is passed in. If neither root_depth or root_distribution are passed in to the constructor, an error is thrown. There were two uses of root_distribution. At these spots, a new function is defined, which takes in the rooting_depth and a z as an argument. If that rooting_depth argument is nothing, then it calls root_distribution form the params. Otherwise it calls from src. Removes breaking change from NEWS.md
Configuration menu - View commit details
-
Copy full SHA for c801e51 - Browse repository at this point
Copy the full SHA c801e51View commit details -
Configuration menu - View commit details
-
Copy full SHA for 418e68b - Browse repository at this point
Copy the full SHA 418e68bView commit details