V1.2 science updates and bug fixes#27
Open
hhughes92 wants to merge 94 commits intocirevo/initial-improvementsfrom
Open
V1.2 science updates and bug fixes#27hhughes92 wants to merge 94 commits intocirevo/initial-improvementsfrom
hhughes92 wants to merge 94 commits intocirevo/initial-improvementsfrom
Conversation
…rors in duplication
…_TREES" could be confused with stand density, but here means number of species or cohorts.
…ed and are not available in IPCC 2019, the values were not changed.
… (y) as input, rather than mix of x (age) and y. tree_model.py gives the derivative functions agb (line 331: t_NPP[i] = derivative_functions[tree_growth.best](tree_growth.fit_params, agb))
- updated formulae in input sheet to use INDEX(MATCH()) instead of specific cell pull-throughs - tidied up questionnaire to make sure all answers are used in the input sheet and that formatting indicating where to add data for additional plots is related to the same logic in the input sheet (i.e. whether the value is a plot or intervention level data point) - updated link in initial_info sheet - applied formatting more consistently to show where users are expected to complete information - still to do: confirm which data points are plot vs intervention level, confirm all cells currently highlighted in red.
…_sources\climate.py
…late has not yet been updated with instructions on how to add more cohorts.
…tanding of the calculation
…require users to include the versions they want to use in the source directory. The necessary updates to crop_params.py and tree_params.py may slow the model runs: this would only be noticeable if a large number of runs were queued.
…ed with TRP reviewer
…t of residue calculation is only applied when crop yield >0
…1. Previously it represented whichever year was the first in the data the user provided.
…nd the model documentation were aligned, but the method as written is not valid for the parameters provided. In brief, allocation to root and leaf pools should be based on the total woody AGB pool, not the change in woody biomass. The updated code calculates WOODY_POOLS and DEPENDENT_POOLS separately.
…gistic_function_inverse. Also add bounds to curve fitting, and change initial hyperbolic parameter values: Hyp was often not returning a successful fit due to initial parameter values.
…than setting to zero.
…exponential_function"/"exp" becomes "exponential_1param_function"/"exp1", new function is "exponential_2param_function"/"exp2". SHAMBA model description update to do, so equation numbers are missing for new function. Add ValueErrors where no finite and real solution exists for inverse functions.
- ensure initial_WAGB_tree is not < 0 - Reverse part of recently updated approach to biomass pool allocation: flux from last year's growth is applied to all pools at the same time, as in previous versions of SHAMBA. The recent correction to how DEPENDENT_POOLS are allocated remains.
…bers, np.log works for arrays and is slower than math.log for single numbers.
…Was (AG residues left) * (1- proportion left), fixed to be based on (total AG residues) * (1- proportion left)
…mortality, turnover) so that proportions are applied to remaining biomass after each flux. This allows all proportions 0-1 to be entered into the model (and avoids issues where sum(flux) > biomass available)
…approach to allometry.
…_off_base and burn_off_project is True (conservative), but input data should be used where available.
1. Add base_plant_yr so that baseline tree cohort isn't assumed to be planted in yr 0 2. Update guidance for thinning years: these are applied as 'project years' not 'years since planting' 3. Update guidance for planting year: year 0 should be used when saplings are planted at the start of the project.
Fix biomass flux
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
DO NOT ACCEPT PR UNTIL REVIEWED BY PLAN VIVO REVIEWER.
Key changes compared to v1.1, from versions.md. Some of these changes were made on the target branch cirevo\initial-improvements, though may have been further refined on this branch.
DATA & DEFAULT UPDATES:
BUG FIXES: