-
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
Make it easier to "turn off" the canopy #250
Comments
I am open on this choice - convince me and I'll change my mind! |
I am right there with @AlexisRenchon. Option 1 is easier. |
I also think option 1 sounds more straightforward, and it'll be nice to have a solution that we don't have to re-work in the long term. Is this something that relates only to the canopy model? It sounds like we'll have to define all surface model types across the entire space (canopy, snow, soil, etc? Also, for global runs how will we demarcate where the land model exists? Will we define our space as an entire spherical shell on the surface (and a similar shape with depth for the subsurface) over the whole surface area of the earth, then use a land mask to label which areas are land? And then we would only perform land calculations on these specified land areas? |
Thank you, @braghiere @AlexisRenchon @juliasloan25 ! And youre right, Julia. We will need the canopy to behave well (zero fluxes) as LAI -> 0, and snow to do the same thing as snow water equivalent -> 0. All models in the LSM will be defined everywhere. For global runs, for now, yeah, we need a land mask. our only options for "domain" are a bunch of columns or the whole spherical shell w. depth. It would be nifty to only do the computation where there is land, worst case we do it everywhere but then set the tendencies to zero over the ocean... Does that change your opinion at all? we can discuss more in person. otherwise I am happy to go with Option 1 as well. |
Thanks for the info. That doesn't change my mind - I think option 1 is still good. If the tendencies are just set to zero over the ocean we won't be doing too much extra work. |
238: Zero lai r=kmdeck a=kmdeck ## Purpose In the current codebase, setting the area indices of the plant to zero would result in a 0/0, because, for example, we have: ` d theta_leaf/dt = [stem_flux *LAI - canopy_transpiration]/ (LAI x Delta z)`, where canopy_transpiration involves a multiplication by LAI as well. Because we cannot have a changing number of prognostic variables across the domain, even when there is no vegetation present, we need to have a canopy model with some prognostic variables, parameters, etc. To turn off the canopy, setting LAI = SAI = RAI = 0 will imply zero fluxes and zero root extraction, and no change in the initial conditions of the plant prognostic variables. Therefore, update the codebase so that when LAI=SAI=RAI = 0, `d theta/ dt = 0` and there is no divide by zero. Once we get closer to global runs, we should do some refactoring as it makes sense to make it so you dont need to define all these parameters where there is no vegetation. See Issue #250. ## Content 1. Change "LAI/(LAI x dz)" terms to "LAI/max(LAI x dz, eps(FT))". When LAI = 0, this gives zero flux and does not divide by zero. 2. Add consistency checks to the PlantHydraulics constructor: - if LAI == 0, all area indices should be zero (no plant present) - if LAI is nonzero, RAI must be nonzero (a plant cannot exist without roots) - if n_stem == 0, the stem area index must be zero for consistency. 3. Adds unit tests to make sure consistency checks pass and that when LAI =RAI = SAI = 0, the root extraction and transpiration are both zero. Review checklist I have: - followed the codebase contribution guide: https://clima.github.io/ClimateMachine.jl/latest/Contributing/ - followed the style guide: https://clima.github.io/ClimateMachine.jl/latest/DevDocs/CodeStyle/ - followed the documentation policy: https:/CliMA/policies/wiki/Documentation-Policy - checked that this PR does not duplicate an open PR. In the Content, I have included - relevant unit tests, and integration tests, - appropriate docstrings on all functions, structs, and modules, and included relevant documentation. ---- - [X] I have read and checked the items on the review checklist. Co-authored-by: kmdeck <[email protected]>
238: Zero lai r=kmdeck a=kmdeck ## Purpose In the current codebase, setting the area indices of the plant to zero would result in a 0/0, because, for example, we have: ` d theta_leaf/dt = [stem_flux *LAI - canopy_transpiration]/ (LAI x Delta z)`, where canopy_transpiration involves a multiplication by LAI as well. Because we cannot have a changing number of prognostic variables across the domain, even when there is no vegetation present, we need to have a canopy model with some prognostic variables, parameters, etc. To turn off the canopy, setting LAI = SAI = RAI = 0 will imply zero fluxes and zero root extraction, and no change in the initial conditions of the plant prognostic variables. Therefore, update the codebase so that when LAI=SAI=RAI = 0, `d theta/ dt = 0` and there is no divide by zero. Once we get closer to global runs, we should do some refactoring as it makes sense to make it so you dont need to define all these parameters where there is no vegetation. See Issue #250. ## Content 1. Change "LAI/(LAI x dz)" terms to "LAI/max(LAI x dz, eps(FT))". When LAI = 0, this gives zero flux and does not divide by zero. 2. Add consistency checks to the PlantHydraulics constructor: - if LAI == 0, all area indices should be zero (no plant present) - if LAI is nonzero, RAI must be nonzero (a plant cannot exist without roots) - if n_stem == 0, the stem area index must be zero for consistency. 3. Adds unit tests to make sure consistency checks pass and that when LAI =RAI = SAI = 0, the root extraction and transpiration are both zero. Review checklist I have: - followed the codebase contribution guide: https://clima.github.io/ClimateMachine.jl/latest/Contributing/ - followed the style guide: https://clima.github.io/ClimateMachine.jl/latest/DevDocs/CodeStyle/ - followed the documentation policy: https:/CliMA/policies/wiki/Documentation-Policy - checked that this PR does not duplicate an open PR. In the Content, I have included - relevant unit tests, and integration tests, - appropriate docstrings on all functions, structs, and modules, and included relevant documentation. ---- - [X] I have read and checked the items on the review checklist. Co-authored-by: kmdeck <[email protected]>
Is your feature request related to a problem? Please describe.
In global runs, we will have areas with and without a canopy, but due to software restrictions from using ClimaCore, every point in the domain requires a CanopyModel with the same number of prognostic variables.
Option 1. Run the same model everywhere (i.e. even when there is no canopy present, there will still be a canopy model with prognostic variables, but these will not change in time, and all canopy fluxes will be zero). In this case, make it easier to set up a default with no canopy present (LAI = RAI=0), i.e. dont require the user to set parameters, canopy height information, etc. Currently, PR #238 makes it so setting LAI=RAI=SAI gives zero transpiration, root extraction, absorption of radiation, and zero fluxes with the plant system, but you still need to define the parameters...
Option 2: Alternatively, if we run each column in the simulation independently, we may be able to set up something that has a different # of prognostic variables at each point. This feels more natural (though it wont work when we have lateral flow in the soil, since then each column is not independent; so this is not a long term solution, Option 1 or similar is unavoidable at this point). In this case, we would need to make it so there is a "no canopy" version of the model with no prognostic vars, parameters, etc. TBD if this type of setup would be harder for the coupler to work with for now as well.
Describe the solution you'd like
Let's discuss
The text was updated successfully, but these errors were encountered: