Closed BrianCollinss closed 4 years ago
@jbrider , sorrt for bothering you again.
I think if we change Line 676 in Root.cs to something like:
if (RootFrontCalcSwitch?.Value() >= 1 && CROP IS MAIZE OR SORGHUM)
Then we can use RootAngle and other options for other crops as well. This part of the code is the only part that doesn't let wheat use RootFrontCalcSwitch==1.
What is it in that code that cause Wheat to fail? I would prefer that RootAngle was implemented properly rather than implementing a hack on a hack.
I think the only diffreence between new C4 model and wheat model is under the line I mentioned. Those new models need to calculate Diffusion and MassFlow and wheat does not. Other things related to Root Angle are the same. I am still looking into the code.
I'm assuming that your proposed changes will not be relevant to every model - but you made changes that affected every model except Sorghum/C4Maize. The proper way to do it is to extract the RootAngle functionality into functions that can be added/removed from the model. That is the goal for the sorghum relevant code in the long run.
You're absolutely right. My ultimate goal is to make root angle and root depth (i.e. velocity) mutually dependent. That is, a bigger/wider system (large angle) is shallower than a smaller/taller system (small anlge). Any suggestion is more than welcome.