Skip to content

successfully implemented the column header requirements for SIPNET ou…#240

Closed
ayushman1210 wants to merge 33 commits intoPecanProject:masterfrom
ayushman1210:168-coloumn_header
Closed

successfully implemented the column header requirements for SIPNET ou…#240
ayushman1210 wants to merge 33 commits intoPecanProject:masterfrom
ayushman1210:168-coloumn_header

Conversation

@ayushman1210
Copy link
Copy Markdown
Contributor

@ayushman1210 ayushman1210 commented Jan 27, 2026

Refactored Main Output Header

Removed: Metadata line with units and notes (e.g., "Notes: (PlantWoodC, PlantLeafC... in g C/m^2...")
Headers now contain only variable names on a single uncommented line:

year day time plantWoodC plantLeafC woodCreation soil microbeC coarseRootC fineRootC litter soilWater soilWetnessFrac snow npp nee cumNEE gpp rAboveground rSoil rRoot ra rh rtot evapotranspiration fluxestranspiration minN n2oFlux nLeachFlux

Added Header Support for Single Output Files ( OutputItems.c and OutputItems.h)

Integrated Headers into Model Output sipnet.c

Test Results
All 12 unit tests pass, including:
Event file handling tests
Event type tests (fertilization, harvest, irrigation, planting, tillage)
Nitrogen cycle modeling
Parameter and climate input validation
The implementation ensures that:

Headers are single-line, not commented
Headers contain only variable names (no metadata/units)
Headers are always written by default
The --print-header flag still allows users to disable headers if needed

FIXES : #168

@ayushman1210
Copy link
Copy Markdown
Contributor Author

hey @dlebauer please review this pr when you have free time
thanks !!

@Alomir
Copy link
Copy Markdown
Collaborator

Alomir commented Jan 29, 2026

@ayushman1210 I don't see the change to sipnet.c:outputHeader() that removes the Notes line

@ayushman1210
Copy link
Copy Markdown
Contributor Author

@Alomir I updated sipnet.c (sipnet.c:outputHeader()) to remove the "Notes" metadata and now print a single uncommented header line of variable names. I ran the test suite: unit tests passed, but the smoke tests showed some expected differences (permission errors on a few smoke runs and an output diff for russell_2) because of the header change

@ayushman1210
Copy link
Copy Markdown
Contributor Author

Hey @Alomir,
Whenever you have some free time, could you please review this PR? I’ve made the changes in the code as suggested.
Thanks!

@Alomir
Copy link
Copy Markdown
Collaborator

Alomir commented Feb 9, 2026

@ayushman Please add these changes (sipnet.out and the single-output header addition) to CHANGELOG.md, and bring this PR up to date with current master. However, please prioritize #203 and #221 over this PR.

Copy link
Copy Markdown
Collaborator

@Alomir Alomir left a comment

Choose a reason for hiding this comment

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

See comments about CHANGELOG.md

dlebauer and others added 17 commits February 14, 2026 15:23
* Require PR approval by Mike, Mike, or David

* fix/expand code owners list
* added changes

* changes as per maintainer suggested

* Apply suggestion from @dlebauer

---------

Co-authored-by: David LeBauer <dlebauer@gmail.com>
* Fix broken / obsolete internal link

Removed reference to Input Files section.

* Update link-check.yml to exclude russelranch

Site doesn't like bots and returns 403

* Remove comment on DOI exclusion in link-check workflow

Remove comment about excluding DOI checks for bot-filtering sites.
* created running-sipnet.md

* changes as suggested
* added changes

* added files

* Update .github/PULL_REQUEST_TEMPLATE.md

Co-authored-by: David LeBauer <dlebauer@gmail.com>

* Update .github/PULL_REQUEST_TEMPLATE.md

Co-authored-by: David LeBauer <dlebauer@gmail.com>

* Update docs/user-guide/model-inputs.md

Co-authored-by: David LeBauer <dlebauer@gmail.com>

* Update docs/CONTRIBUTING.md

Co-authored-by: David LeBauer <dlebauer@gmail.com>

* Update .github/PULL_REQUEST_TEMPLATE.md

Co-authored-by: David LeBauer <dlebauer@gmail.com>

* changes as suggested

* changes as per maintainer suggested

* fixed

* change

* Update .github/PULL_REQUEST_TEMPLATE.md

Co-authored-by: Mike Longfritz <Mike.Longfritz@gmail.com>

* Update .github/PULL_REQUEST_TEMPLATE.md

Co-authored-by: Mike Longfritz <Mike.Longfritz@gmail.com>

* suggested changes

* changes as per maintainer's suggestion

---------

Co-authored-by: David LeBauer <dlebauer@gmail.com>
Co-authored-by: Mike Longfritz <Mike.Longfritz@gmail.com>
Signed-off-by: Aritra Dey <adey01027@gmail.com>
Minor thing, but `arch` is less likely to be present on a system than
`uname -m` (case in point: It was missing in my WSL2 Arch Linux
install). I think they return basically the same information.
…ecanProject#219)

* minor corrections and clarifications to heterotrophic respiration scheme

* additional clarification

* additional clarification

* more fixes

* Update docs/parameters.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/parameters.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/model-structure.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* additional clarifications and fixes

* Update docs/parameters.md

* removed redundant definitions from model structure doc

* Apply suggestion from @dlebauer

Co-authored-by: David LeBauer <dlebauer@gmail.com>

* Apply suggestion from @dlebauer

Co-authored-by: David LeBauer <dlebauer@gmail.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update model-structure.md

Co-authored-by: Mike Longfritz <Mike.Longfritz@gmail.com>

* clarify soil and litter decomp explanation

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mike Longfritz <Mike.Longfritz@gmail.com>
…te (PecanProject#220)

* Update LICENSE link in README.md

* Apply suggestion from @dlebauer

---------

Co-authored-by: David LeBauer <dlebauer@gmail.com>
Labreo and others added 15 commits February 14, 2026 16:55
…ject#222)

* Fix typos and add missing reference in model structure doc

* docs: fix broken LICENSE link in README causing CI failure
…ameter and other critical divisor parameters in sipnet.c (PecanProject#223)
* docs:add Code of Conduct document

This document outlines the Code of Conduct for contributors and maintainers, including pledges, standards, responsibilities, scope, and enforcement policies to ensure a welcoming environment.

* Apply suggestions from code review

Good catch, thanks!

---------

Co-authored-by: David LeBauer <dlebauer@gmail.com>
…PecanProject#214)

* Add org N handling for fert

* Adds fields for org N handling

* Adds organic N pools and params, with output

* Updates for fert org N

* Updates cols list for niwot

* Updates for initial org N implementation

* Updates to eqs 13 and 14

* Adds litter pool req for nitrogen cycle

* Initial implementation for organic N pools plus fert updates

* Updates to fert for org N pools

* Updates for org N pools

* Reorg and updates for org N pools

* Adds CN ration params

* Tweak output spacing for readability

* Fix broken link

* Fix merge errors

* Allow russell ranch link

* Brings russell_1 params up to date

* Updates for organic N calcs

* Removes 'frak' font from some implemented sections

* Updates for nitrogen cycle additions to date

* Interim commit, heterotrophic resp updates

* Removes unused include

* Tests calcXYZEffect dependency functions

* Adds testDependencyFunctions

* Tweaks error msg

* Adds CN dep function, updates soil and litter resp

* Adds kCN param

* Updates for soil/litter resp tweaks

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updates for CN implementation

* C:N impl

* Function rename

* Updates to min N pool

* Updates for mineral N pool update

* Updates for CN impl

* Attempts to fix broken link

* added code symbols to stoichiometry param definitions

* Update docs/README.md

Co-authored-by: David LeBauer <dlebauer@gmail.com>

* Renames param rootCN to fineRootCN

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: David LeBauer <dlebauer@gmail.com>
…oject#234)

* bug:Added term to prevent nitrogen duplication.

* Added fixes to the documentation of litter nitrogen

* fix formating issue

* Test: Update russell_2 reference output to reflect N-balance fix

* git commit -m "Test: Update Russell_2 reference output for N-fix"

* Test: Update unit test expectation to match N-balance fix
* Updates for N limiting and biomass C pool models

* Interim

* Adds minimal JS support

* Adds autonumbering support

* Adds footnotes extension

* Updates doc for plant carbon pools and nitrogen limiting. Also begins conversion to auto-numbered equations

* Apply suggestion from @dlebauer

Co-authored-by: David LeBauer <dlebauer@gmail.com>

* Apply suggestion from @dlebauer

Co-authored-by: David LeBauer <dlebauer@gmail.com>

* Apply suggestion from @dlebauer

Co-authored-by: David LeBauer <dlebauer@gmail.com>

* Apply suggestion from @dlebauer

Co-authored-by: David LeBauer <dlebauer@gmail.com>

* Apply suggestions from dlebauer

* Adds minor tweaks

* Apply suggestion from @dlebauer

* Reformat for autonumbering + added Root Respiration section

---------

Co-authored-by: David LeBauer <dlebauer@gmail.com>
…anProject#226)

* Suggest issue number in title and fixes PULL_REQUEST_TEMPLATE.md

* Update .github/PULL_REQUEST_TEMPLATE.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/PULL_REQUEST_TEMPLATE.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mike Longfritz <Mike.Longfritz@gmail.com>
@Alomir Alomir marked this pull request as draft February 16, 2026 16:04
@Alomir
Copy link
Copy Markdown
Collaborator

Alomir commented Feb 16, 2026

Converting this to draft until it is brought up to date. Please convert back when this PR is ready to be reviewed.

@Alomir
Copy link
Copy Markdown
Collaborator

Alomir commented Feb 16, 2026

Closed in favor of #267

@Alomir Alomir closed this Feb 16, 2026
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.

Write column headers to & remove comments from output

6 participants