-
Notifications
You must be signed in to change notification settings - Fork 16
fix pmodel gpp for c4 #1670
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
Open
AlexisRenchon
wants to merge
3
commits into
main
Choose a base branch
from
ar/fix_gpp_pmodel
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix pmodel gpp for c4 #1670
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -220,9 +220,10 @@ end | |
| function PModel{FT}( | ||
| domain, | ||
| toml_dict::CP.ParamDict; | ||
| is_c3 = clm_photosynthesis_parameters(domain.space.surface).is_c3, | ||
| is_c3 = nothing, | ||
| cstar = toml_dict["pmodel_cstar"], | ||
| β = toml_dict["pmodel_β"], | ||
| β_c3 = toml_dict["pmodel_β_c3"], | ||
| β_c4 = toml_dict["pmodel_β_c4"], | ||
| temperature_dep_yield = true, | ||
| ϕ0_c3 = toml_dict["pmodel_ϕ0_c3"], | ||
| ϕ0_c4 = toml_dict["pmodel_ϕ0_c4"], | ||
|
|
@@ -236,26 +237,30 @@ end | |
| ) where {FT <: AbstractFloat} | ||
|
|
||
| Constructs a P-model (an optimality model for photosynthesis) using default parameters. | ||
| If `is_c3` is not provided, the constructor uses the spatial `c3_fraction` field from | ||
| the CLM artifact when available, and otherwise falls back to the dominant-pathway flag. | ||
|
|
||
| The following default parameters (from the TOML file) are used: | ||
| - cstar = 0.41 (unitless) - 4 * dA/dJmax, assumed to be a constant marginal cost (Wang 2017, Stocker 2020) | ||
| - β = 146 (unitless) - Unit cost ratio of Vcmax to transpiration (Stocker 2020) | ||
| - β_c3 = 146 (unitless) - Unit cost ratio of Vcmax to transpiration for C3 plants (Stocker 2020) | ||
| - β_c4 = 146/9 ≈ 16.222 (unitless) - Unit cost ratio of Vcmax to transpiration for C4 plants (pyrealm) | ||
| - ϕ0_c3 = 0.052 (unitless) - constant intrinsic quantum yield. Skillman (2008) | ||
| - ϕ0_c4 = 0.057 (unitless) - constant intrinsic quantum yield. Skillman (2008) | ||
| - ϕa0_c3 = 0.352*0.087 (unitless) - constant term in quadratic intrinsic quantum yield (Stocker 2020) | ||
| - ϕa1_c3 = 0.022*0.087 (K^-1) - first order term in quadratic intrinsic quantum yield (Stocker 2020) | ||
| - ϕa2_c3 = -0.00034*0.087 (K^-2) - second order term in quadratic intrinsic quantum yield (Stocker 2020) | ||
| - ϕa0_c4 = 0.352*0.087 (unitless) - constant term in quadratic intrinsic quantum yield (Scott and Smith, 2022) | ||
| - ϕa1_c4 = 0.022*0.087 (K^-1) - first order term in quadratic intrinsic quantum yield (Scott and Smith, 2022) | ||
| - ϕa2_c4 = -0.00034*0.087 (K^-2) - second order term in quadratic intrinsic quantum yield (Scott and Smith, 2022) | ||
| - ϕa0_c3 = 0.044 (unitless) - constant term in quadratic intrinsic quantum yield (pyrealm/Bernacchi et al., 2003) | ||
| - ϕa1_c3 = 0.00275 (K^-1) - first order term in quadratic intrinsic quantum yield (pyrealm/Bernacchi et al., 2003) | ||
| - ϕa2_c3 = -0.0000425 (K^-2) - second order term in quadratic intrinsic quantum yield (pyrealm/Bernacchi et al., 2003) | ||
| - ϕa0_c4 = -0.008 (unitless) - constant term in quadratic intrinsic quantum yield (pyrealm/Cai and Prentice, 2020) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this value is very odd to me - it means when T = 0C, quantum yield is negative...but I guess it is from an empirical fit with uncertainty... |
||
| - ϕa1_c4 = 0.00375 (K^-1) - first order term in quadratic intrinsic quantum yield (pyrealm/Cai and Prentice, 2020) | ||
| - ϕa2_c4 = -0.000058 (K^-2) - second order term in quadratic intrinsic quantum yield (pyrealm/Cai and Prentice, 2020) | ||
| - α = 0.933 (unitless) - 1 - 1/T where T is the timescale of Vcmax, Jmax acclimation. Here T = 15 days. (Mengoli 2022) | ||
| """ | ||
| function PModel{FT}( | ||
| domain, | ||
| toml_dict::CP.ParamDict; | ||
| is_c3 = clm_photosynthesis_parameters(domain.space.surface).is_c3, | ||
| is_c3 = nothing, | ||
| cstar = toml_dict["pmodel_cstar"], | ||
| β = toml_dict["pmodel_β"], | ||
| β_c3 = toml_dict["pmodel_β_c3"], | ||
| β_c4 = toml_dict["pmodel_β_c4"], | ||
| temperature_dep_yield = true, | ||
| ϕ0_c3 = toml_dict["pmodel_ϕ0_c3"], | ||
| ϕ0_c4 = toml_dict["pmodel_ϕ0_c4"], | ||
|
|
@@ -267,9 +272,21 @@ function PModel{FT}( | |
| ϕa2_c4 = toml_dict["pmodel_ϕa2_c4"], | ||
| α = toml_dict["pmodel_α"], | ||
| ) where {FT <: AbstractFloat} | ||
| c3_fraction = if isnothing(is_c3) | ||
| photosynthesis_parameters = clm_photosynthesis_parameters(domain.space.surface) | ||
| ( | ||
| hasproperty(photosynthesis_parameters, :c3_fraction) ? | ||
| photosynthesis_parameters.c3_fraction : | ||
| photosynthesis_parameters.is_c3 | ||
| ) | ||
| else | ||
| is_c3 | ||
| end | ||
|
|
||
| parameters = ClimaLand.Canopy.PModelParameters( | ||
| cstar, | ||
| β, | ||
| β_c3, | ||
| β_c4, | ||
| temperature_dep_yield, | ||
| ϕ0_c3, | ||
| ϕ0_c4, | ||
|
|
@@ -282,7 +299,7 @@ function PModel{FT}( | |
| α, | ||
| ) | ||
|
|
||
| return PModel{FT}(is_c3, toml_dict, parameters) | ||
| return PModel{FT}(c3_fraction, toml_dict, parameters) | ||
| end | ||
|
|
||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think these all need to be updated in both parameter toml files