Skip to content

respect site.pft$soil - #4289

Open
divine7022 wants to merge 4 commits into
PecanProject:developfrom
divine7022:segmented-soil-pft
Open

divine7022 wants to merge 4 commits into
PecanProject:developfrom
divine7022:segmented-soil-pft

Conversation

@divine7022

Copy link
Copy Markdown
Member

Description

Segmented runs always got their soil params from the PFT named soil, no matter what site.pft$soil said. So a site with its own soil PFT (soil_flooded for our rice sites) got the dryland soil params in every segment, even though the unsegmented config for the same run had the right ones.

This reads the soil PFT from site.pft$soil once per run and falls back to "soil" when it isn't set, so runs that don't set it don't change. Fallow segments (where the segment PFT is soil) now send just the site's soil PFT, so the two sets of soil params don't get mixed together.

I ran into this while tracking down why our flooded soil params never showed up in rice runs.

Motivation and Context

Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • My name is in the list of CITATION.cff
  • I agree that PEcAn Project may distribute my contribution under any or all of
    • the same license as the existing code,
    • and/or the BSD 3-clause license.
  • I have updated the CHANGELOG.md.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@dlebauer dlebauer 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.

Looks good to me, thanks!

@dlebauer
dlebauer enabled auto-merge November 29, 2026 03:46

@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.

I'm OK with this as a quick fix, but FTR I think medium-term we should be moving the opposite direction and finding a way to avoid relying on the names in site.pft at all.

That might need some deeper changes to segmentation though (maybe including ability to change the soil PFT through time?)

@dlebauer
dlebauer added this pull request to the merge queue Nov 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 29, 2026
@infotroph
infotroph added this pull request to the merge queue Nov 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants