APSIMInitiative / APSIM710

APSIM
https://www.apsim.info
30 stars 47 forks source link

How to change multiple wheat varieties in the same long-term simulation #2161

Open PanxinZhang opened 2 years ago

PanxinZhang commented 2 years ago

If it can only be achieved by writing code, I hope you can give me an example for me to learn.

peter-devoil commented 2 years ago

Yes, manager code is very powerful and can do just as you describe. There is already some logic in the planting rule that switches cultivars depending on date, it's not hard to extend that to lists or tables.

PanxinZhang commented 2 years ago

Thanks for answer.I don't have the basis of the relevant code before, can you provide a part of the management code about the variety replacement for me to learn?

Yes, manager code is very powerful and can do just as you describe. There is already some logic in the planting rule that switches cultivars depending on date, it's not hard to extend that to lists or tables.

peter-devoil commented 2 years ago

Here's the implementation from earlier (from the "new simulation" button: image

There's a partiually written intro to using apsim managers here.