Open byzheng opened 9 months ago
If I try to look at [Canola].Phenology.LateGrainFilling.Stress in a report, it does indeed throw an error about it not existing. Since it's not throwing an error otherwise though, my guess is the canola model isn't using that variable or trying to calculate it.
Will need someone with a bit more knowledge to say if this is an issue that should be fixed and if so, how it should be fixed.
From canola model, I personally think we should remove non-exist reference variables for Stress as they are not used in any places. It causes confusing to read model.
When we play with the model structure, sometimes we remove a reference to a variable to test something, which means it would not be used temporally. Any error thrown in this situation will cause lots of trouble.
I personally think we should remove non-exist reference variables
Agreed. Will have to be done manually through as I can't think of an easy way to write code to do this automatically as there are lots of functions that aren't referenced by the code but are provided as outputs for the users convenience. e.g. StartFloweringDAS, MaturityDAS.
Let's remove the unused "Stress" functions from all GenericPhases's in all resource files or simulations (ie we need a converter). Note: this will soon tell us if someone is actually referring to that stress function in their progression function within the GenericPhase.
This issue has been automatically marked as stale because it has not had any activity in the last 30 days. It will be closed in one week if no further activity occurs. Thank you for your contributions.
What is your question?
In the master branch of canola model, there is a reference variable
[Phenology].Vegetative.PhotoperiodEffect
in several phenology stages.(https://github.com/APSIMInitiative/ApsimX/blob/a161da1008c2cca23c9f437b8d80feafd6d2db14/Models/Resources/Canola.json#L691)
However, this variable doesn't exist in
[Phenology].Vegetative
.Should I expect an error message for missing variable?