Events: revamp handling of "big delta" events to post-pool-update
Maintainers usually reply within 2 days
@Alomir is already working on this.
Since Oct 27, 2026.
Assessment
This issue has not been assessed yet.
Description
We have issues dealing with events that can potentially cause significant deltas in pools, primarily those that can drive a pool to zero. (Forward Euler methods for first-order DEs typically cannot handle step function changes well). The amount of code we have to deal with the overshoots that these events can cause is a significant contributor of complexity in the model's compute-fluxes->update-pools->repeat paradigm.
Proposal: move handling of these events to a new post-pool-update step, where we can calculate changes based on the resulting pool sizes, and remove the risk of overshooting; limit their effects to the resources available. Process these delayed events in the order that they should get priority, on the off chance more than on is on the same day.
Events to be postponed, and the order to process them:
- leaf on
- harvest
- leaf off
Harvest is after leaf on so that we do not suddenly have a lot of leaves after a harvest occurs. Harvest is before leaf-off to reduce the amount of leaf-off litter that is produced after a harvest (reducing it to zero in the case of a terminating harvest). For that last one, the question is: if we have both on the same day, do we want to harvest the leaves, or let them go to the litter pool? This order says to harvest them.
Hopefully, significant complexity can be removed in checkMortality() and the functions in limitations.c; possibly other places.
Tests will need to be updated, especially those in tests/sipnet/test_system - likely others as well, though.
- Dominant language
- C
- Stars
- 42
- Forks
- 38
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 10
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PecanProject/sipnet
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PecanProject/sipnet#435 · 1 comment ·
Maintainers usually reply within 2 days
-
Make sure that documentation of sipnet.out header reflects implementationPossibly taken @TianHengZhuang claimed this 19 days ago. Opendocumentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
PecanProject/sipnet#345 · 8 comments · 1 reaction ·
Maintainers usually reply within 2 days
-
Remove unused `Tracker` fieldsMay be free again @ANAMASGARD claimed this 9 days ago, and no pull request is open. Opengood first issue on hold
Difficulty 4/5 3-5 days Newbie friendliness 45/100
PecanProject/sipnet#430 · 1 comment · 1 reaction ·
Maintainers usually reply within 2 days
-
Event checks ignore every events.in record after the firstPossibly taken @ANAMASGARD claimed this 9 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 70/100
PecanProject/sipnet#429 · 3 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
Missed event across a year boundary silently blocks later eventsPossibly taken @ANAMASGARD claimed this 11 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 73/100
PecanProject/sipnet#421 · 4 comments · 1 assignee ·
Maintainers usually reply within 2 days
All issues in PecanProject/sipnet
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
kmod-project/kmod#492 ·
Maintainers usually reply within 4 days
-
SDL_GPU Vulkan: wrong screen orientation on OpenHarmony (preTransform set without pre-rotation)Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
libsdl-org/SDL#16670 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
要トリアージ 辞書
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
yksr-melt/Meltype#1625 · 1 reaction ·
Maintainers usually reply within 1 day
-
kind/bug priority/medium qa_automation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
yugabyte/yugabyte-db#37324 ·
Maintainers usually reply within 1 day