Closed tierlingj closed 1 year ago
You're right. There should be warnings if necessary configuration parts are missing. It's just a lot of work we won't be able to do right now. That it still works is actually just an implementation detail. The documentation should be improved in this regard. But in general the thinking regarding the sim/crop/site files is that what is there shouldn't be droped without knowing why. So if there is a key "UseSecondaryYields" it should be there, serving as documentation that it is either true or false. In this vein I never thought of it as a particular problem that someone could start omiting parameters from the files. Nevertheless thank you for pointing it out and creating an issue. +1
Preventing users from doing the foolish things is always the hard part, isn't it? I did this just out of curiosity while writing the config files from scratch. As I learned the syntax from the hohenfinow2 example files mainly, you might want to add a comment in those to indicate necessary config thingies.
Anyway, you built a great tool here, I enjoy it a lot.
I ran the minimal example Hohenfinow2/sim-min.json (v 3.2.2) and got meaningful results for AbBiom in return.
However, when I removed the "CropParameters" key from crop.json, the model computed successfully, but the results were utter nonsense.
The same behaviour was observed with the general parameter links in site.json.
I didn't dive into the code to find out which values are used in the latter case, but I think there should be at least a warning thrown if these obviously crucial parameter links are missing/wrong.
//edit Somewhat related: I couldn't find out what the default behaviour of things like "UseSecondaryYields" or "NitrogenResponseOn" (sim.json) would be if those keys were missing.