-
Notifications
You must be signed in to change notification settings - Fork 9
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
base: main
Are you sure you want to change the base?
Conversation
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.
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.
longruns/land.jl, benchmarks/land.jl and longruns/land_regional.jl are changed to use the root depth map from the clm data
c19eb7e
to
7f28b39
Compare
- ![][badge-💥breaking] Remove root_distribution from PlantHydraulicsParameters and add rooting_depth, | ||
which supports fields | ||
PR[#783](https://github.com/CliMA/ClimaLand.jl/pull/783) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If something is breaking, it is always a good idea to describe how it is breaking and what users might need to do to fix it
), | ||
) * AI[plant_hydraulics.compartment_labels[i]] | ||
end | ||
F[i] = mean(fa .- T0A) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss this. I would have expected F
to be a Field
here too
Purpose
Towards spatially varying canopy parameters
Move the root_distribution function to src
Make rooting_depth, an argument to root_distribution, a parameter of PlantHydraulicsParameters
Make rooting depth support ClimaCore fields.
Closes #772
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.
To-do
Content
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.
The rooting_depth map can be seen here: