Skip to content

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

Open
ayushman1210 wants to merge 9 commits intoPecanProject:masterfrom
ayushman1210:168-coloumn_header
Open

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

Conversation

@ayushman1210
Copy link
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
Contributor Author

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

@Alomir
Copy link
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
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
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!

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

2 participants