-
Notifications
You must be signed in to change notification settings - Fork 321
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
change where stem_biomass is set #1284
Comments
Here's a suggestion from @swensosc to make the code easier to read... the only thing I don't like about the first version is all the if-blocks, which I think makes it harder to read. If it just started with
|
For code efficiency it's better to use "else" statements rather than set something and then overwrite it for most cases. And actually we should be able to get away with setting biomass to zero just at initialization when use_biomass_heat_storage is off. |
We talked about this a bit, and for this case really the best thing to do is to make sure when BHS is off that biomass is set to zero at initialization. Then it doesn't need to be updated each time-step. There's no real reason we should set this to zero each time-step. That will simplify the code a bit. As a general philosophy we agreed with the following statement "Our #1 priority should be code readability, unless we have a strong reason to think that efficiency matters for that part of the code." |
…eat_storage is false because they are already initialized to zero in InitCold this fixes ESCOMP#1284
These are changes that @olyson is running with for the PPE work. Because stem_biomass should be set to zero in the InitCold method, I think it's equivalent to what's currently being done. But I need to check for sure. This moves the setting of stem_biomass as well as the if woody statement up to where leaf_biomass is set. It also clearly sets stem_biomass to zero there. So it looks like this...
The text was updated successfully, but these errors were encountered: