Skip to content

Update Sobol GSA to use sensobol package and validate ensemble design handling#2

Closed
dlebauer wants to merge 26 commits into
divine7022:developfrom
dlebauer:codex/sensobol-gsa
Closed

Update Sobol GSA to use sensobol package and validate ensemble design handling#2
dlebauer wants to merge 26 commits into
divine7022:developfrom
dlebauer:codex/sensobol-gsa

Conversation

@dlebauer
Copy link
Copy Markdown

@dlebauer dlebauer commented Mar 19, 2026

(note: please sync target branch divine7022:develop with pecanproject/develop before review)

Description

This PR replaces the existing Sobol workflow with a sensobol-based implementation and hardens the ensemble design path used to run global sensitivity analyses.

Implementation was generated with ChatGPT based on my specifications and review.

Key changes:

  • generate explicit Sobol A, B, and AB designs with sensobol
  • preserve parent-child alignment in joint ensemble designs
  • validate sampled input IDs and input_design indices
  • compute Sobol indices from standardized ensemble.output.*.Rdata
  • add tests for design expansion, parent behavior, and postprocessing

Motivation and Context

The previous Sobol path relied on implicitly splitting a PEcAn design matrix and passing it to sensitivity::soboljansen(). This introduced implicit assumptions about design structure, run counts, and factor alignment.

This PR makes the Sobol design explicit, aligns run counts with workflow execution, and standardizes postprocessing on PEcAn outputs.

Only the design construction and workflow integration are updated; no change to the original analysis intent (type-level Sobol sensitivity analysis)

Design Notes

  • The issue was not with sensitivity::soboljansen() itself, but with how PEcAn constructed and adapted its design.
  • The previous implementation split a single PEcAn design matrix into X1 and X2, assuming this produced a valid Sobol base design. This assumption was implicit and not validated.
  • Sobol methods require a base sample size N and total runs N * (k + 2); this relationship was ambiguous in the previous workflow.
  • sensobol maps directly to PEcAn’s workflow: explicit Sobol design → PEcAn runs → standardized outputs → Sobol indices.

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 added 16 commits March 4, 2026 23:47
Replace the old sensitivity-based Sobol postprocessing with sensobol and compute indices from PEcAn standardized ensemble.output.*.Rdata files instead of reconstructing responses from runs.txt and raw per-run outputs.

This keeps Sobol analysis aligned with the normal PEcAn workflow and output conventions while saving reproducible Sobol design and index artifacts.
…lidate input_design$param against trait sample bank
…cumentation for generate_joint_ensemble_design: clarify parameters and return value
@dlebauer dlebauer changed the base branch from develop to sobol_gsa March 24, 2026 18:54
@dlebauer dlebauer changed the base branch from sobol_gsa to develop March 24, 2026 18:54
@dlebauer dlebauer closed this Apr 2, 2026
@dlebauer dlebauer deleted the codex/sensobol-gsa branch April 2, 2026 20:34
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.

2 participants