-
Notifications
You must be signed in to change notification settings - Fork 241
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
Bug in query.trait.data in relation to FRC_LC trait #2269
Comments
Possible that PR is a red herring, though I suspect there is something up with the species record clashing with that cultivar PR. @dlebauer @infotroph any thoughts? |
OK, hmm...
now I am not so sure what the issue is and why the call to query traits returns an error? |
Aha!
Stem respiration rate? |
Perhaps this is it:
Covariate options are leafT or airT BUT many of these entries for stem respiration use stem temperature (stemT), e.g. https://modex.bnl.gov/bety/traits/41237 This can be addressed by added stemT as an option to this scale, and removing leafT (since I dont see how that is relevant) but raises my questions about covariates. we may need to make sure uploading includes the correct temp covariate where right now most of the time leafT is the only required. @dlebauer? |
Looks like my problem is that there is 1 Quercus rubra value and that species is in my PFT but as mentioned the covariate scaling does not include stemT |
Updating the function like this:
results in the expected results:
|
@serbinsh To make sure I'm following right: You're concluding that this is fully explained by the copy-paste error in stem resp scaling and doesn't need any changes to the |
LOL! yeah probably was a copy-paste error! Originally i thought it may be something else, but yeah, I think it was just the wrong covariates listed for stem respiration and my small PR seems to have fixed it |
Closing since the fix was merged |
Bug Description
I have hit an error when running query.trait.data() with trait "FRC_LC."
Specific to this line in the function:
pecan/base/db/R/query.trait.data.R
Line 541 in 7e7b70a
But for other traits,
All good.
Looking at "blame" I think it has to do with this change from 11 months ago: #1826
And perhaps others haven't run into this since not many PFTs actually have FRC data available. It just so happens that my new pine barrens PFT does.
To Reproduce
Steps to reproduce the behavior:
query.trait.data("FRC_LC", "30", con = con)
https://modex.bnl.gov/bety/species/30 ; Acer rubrum
BUT
others DO work, e.g.
query.trait.data("FRC_LC", "32", con = con)
query.trait.data("FRC_LC", "1130", con = con)
The text was updated successfully, but these errors were encountered: