Skip to content

docs(tutorial): config-level impact studies#1263

Open
sunt05 wants to merge 2 commits intomasterfrom
tutorial/impact-study-oop-config
Open

docs(tutorial): config-level impact studies#1263
sunt05 wants to merge 2 commits intomasterfrom
tutorial/impact-study-oop-config

Conversation

@sunt05
Copy link
Copy Markdown

@sunt05 sunt05 commented Mar 24, 2026

Summary

  • Replaces the pd.concat DataFrame-hacking pattern in tutorial 04 (Impact Studies) with direct config-level modification
  • Both Part 1 (albedo sweep) and Part 2 (climate scenarios) now use the same loop pattern: load config, modify parameter, run, collect results
  • This approach generalises naturally to multi-site YAML configurations (e.g. gridded setups with 15+ sites)

Motivation

The previous tutorial abused the grid index as a scenario ID, which confused users with real multi-grid setups (see community discussion). The config-level approach works identically for single-site and multi-site configurations.

Test plan

  • Tutorial renders correctly via sphinx-gallery
  • Albedo sweep produces expected temperature response
  • Climate scenario results unchanged from previous version

🤖 Generated with Claude Code

…in impact studies

The albedo sweep in tutorial 04 previously abused the grid index as a
scenario ID via pd.concat, which doesn't generalise to multi-site
setups. Replace with a loop that modifies site config directly — the
same pattern already used in Part 2 for forcing modifications.

This makes the tutorial work identically for single-site and multi-site
(e.g. gridded) YAML configurations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 24, 2026

CI Build Plan

Changed Files

Documentation (1 file)

  • docs/source/tutorials/tutorial_04_impact_studies.py

Build Configuration

No code build required -- changes are docs/site/non-code only.

Rationale

  • No build-triggering changes detected -> builds skipped

Updated by CI on each push. See path-filters.yml for category definitions.

@github-actions
Copy link
Copy Markdown

Preview Deployed

Content Preview URL
Site https://suews.io/preview/pr-1263/
Docs https://suews.io/preview/pr-1263/docs/

Note

This preview is ephemeral. It will be lost when:

  • Another PR with site/ or docs/ changes is pushed
  • Changes are merged to master
  • A manual workflow dispatch runs

To restore, push any commit to this PR.

@sunt05 sunt05 marked this pull request as draft March 24, 2026 20:53
Review fixes for tutorial_04_impact_studies:
- Replace sim._config with sim.config (public property) throughout
- Remove unused sim_test cell (dead code never referenced downstream)
- Update api-approach.md and conventions.md to recognise config-level
  as the prescribed pattern for impact study tutorials
- Replace em dashes with ASCII -- per project conventions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sunt05 sunt05 marked this pull request as ready for review March 25, 2026 21:06
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.

1 participant