Skip to content

[N/A] Update sipnet.output precision and doc#281

Open
Alomir wants to merge 3 commits intomasterfrom
update-outputs
Open

[N/A] Update sipnet.output precision and doc#281
Alomir wants to merge 3 commits intomasterfrom
update-outputs

Conversation

@Alomir
Copy link
Collaborator

@Alomir Alomir commented Feb 27, 2026

Summary

  • What: Quick tweak to increase output precision to minimum 4 digits, and update output doc

How was this change tested?

Smoke and unit tests; testOutputHeader updated.

Checklist

  • PR title has the issue number in it ("[#] <concise description of proposed change>")
  • Tests added/updated for new features (if applicable)
  • Documentation updated (if applicable)
  • docs/CHANGELOG.md updated with noteworthy changes
  • Code formatted with clang-format (run git clang-format if needed)

@Alomir Alomir marked this pull request as ready for review February 27, 2026 17:13
fprintf(out, "%8.2f ", envi.soilC);
fprintf(out, "%11.2f %9.2f", envi.coarseRootC, envi.fineRootC);
fprintf(out, " %8.2f %10.2f %15.3f %8.2f ", envi.litterC, envi.soilWater,
fprintf(out, "%8.4f ", envi.soilC);
Copy link
Member

Choose a reason for hiding this comment

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

Here's the one I'll nitpick: I doubt we need more decimal places for soil C. Given it's always greater than zero (usually thousands of g/m2, sometimes hundreds, hardly ever tens) and highly variable, differences smaller than a gram aren't usually meaningful.

Suggested change
fprintf(out, "%8.4f ", envi.soilC);
fprintf(out, "%8.2f ", envi.soilC);

Copy link
Member

Choose a reason for hiding this comment

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

It's possible the same argument applies to other C pools, but I'm less sure which ones. Keeping higher precision for trackers/fluxes than for pools does make sense to me, to avoid truncation at short timesteps.

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