Skip to content

Reorg for proper fluxes -> pools - #154

Merged
Alomir merged 5 commits into
masterfrom
SIPx-pools-and-fluxes-reorg
Sep 17, 2025
Merged

Reorg for proper fluxes -> pools#154
Alomir merged 5 commits into
masterfrom
SIPx-pools-and-fluxes-reorg

Conversation

@Alomir

@Alomir Alomir commented Sep 9, 2025

Copy link
Copy Markdown
Collaborator

This PR reorganizes code to ensure proper fluxes-then-pools processing. No functional changes are made here.

  • Broke up soilDegradation, moving parts into different flux and pool functions
  • Made the "global" state and param variables actually global, putting them in the new state.c file
  • Moved all event handling code into events.c, now that the state definitions are out of sipnet.c
  • Updated tests that relied on previous structure (the tests still all test the same things they used to)

@Alomir
Alomir marked this pull request as ready for review September 12, 2025 17:23

@infotroph infotroph left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This seems much cleaner.

I left one nonblocking question on fn() vs fn(void)

Comment thread src/sipnet/events.h Outdated
Comment on lines +138 to +145
void setupEvents();

/*!
* Set all event fluxes to zero
*
* Reset all event fluxes to zero in preparation for the next climate step.
*/
void resetEventFluxes(void);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is setupEvents() instead of setupEvents(void) intentional here? I remember they have subtle differences but not how often they matter

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm shocked that passed clang_tidy!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't have, good catch. There's no actual difference, but leaving the parens empty is bad form.

@Alomir
Alomir merged commit 73070d5 into master Sep 17, 2025
9 checks passed
@Alomir
Alomir deleted the SIPx-pools-and-fluxes-reorg branch September 17, 2025 19:01
@dlebauer dlebauer mentioned this pull request Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants