Skip to content

Add Boyd-orientation Stommel demo build script#29

Closed
madsCodeBuddy wants to merge 1 commit intomainfrom
feat/boyd-demo
Closed

Add Boyd-orientation Stommel demo build script#29
madsCodeBuddy wants to merge 1 commit intomainfrom
feat/boyd-demo

Conversation

@madsCodeBuddy
Copy link
Copy Markdown
Collaborator

Summary

Add docs/build_demo_boyd.py — the canonical example of using the package with space_on_x=False (Boyd 2015 orientation: time on x-axis, space on y-axis). Companion to build_desert_farm.py which uses the same orientation.

Why

The package's create_space_time_figure() defaults to space_on_x=True, which is the opposite of the Boyd (2015) and most BGC literature convention. Currently the only end-to-end Boyd-orientation example lives inside tests/test_local_install.py, which is not a documentation surface. Users wanting a Boyd-orientation starting point have nothing to copy from.

What it does

Reads data/datasets/stommel_boyd2015_volumes.csv (14 rows), runs through transform_predefined_processes, builds a figure via create_space_time_figure(space_on_x=False), layers diffusion lines + magnitude labels + processes, and places the legend on the right via add_legend(p, position="right").

Verified orientation:

  • x_range: 0.001 .. 1e12 with axis label Time (s)
  • y_range: 1e-21 .. 1e+21 with axis label Space (m³)

Files added

  • docs/build_demo_boyd.py — 50-line build script (black + flake8 clean)
  • docs/demo_stommel_boyd.html — rendered output (442 KB, CDN mode)

Out of scope

docs/build_demo_boyd.py is the canonical example showing how to use the
package with space_on_x=False (time on x-axis, space on y-axis), the
convention used in Boyd et al. (2015) and most BGC literature.

Renders all 14 rows from data/datasets/stommel_boyd2015_volumes.csv with
diffusion lines, magnitude labels along both axes, and the legend moved
to the right of the plot via add_legend(p, position='right').

Output: docs/demo_stommel_boyd.html (442 KB).
@madsCodeBuddy
Copy link
Copy Markdown
Collaborator Author

Closing — wrong scope. The actual demo is tests/test_local_install.py (run by make test-package), not a new file in docs/. Replacement PR coming with the legend fix on the existing demo.

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