docs: "Spectral pipelines with pipekit" + barotropic-vorticity reference example

Open
#155 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Read the dependencies #152 and pipekit E1.3 (ScanCycle), then inspect the Graph, Spectral, Enstrophy, and RK4 entry points; the issue gives no file paths. Build the barotropic-vorticity example and stability note, compare gradients against finite differences, and add a CPU CI run under 60 seconds at N=64 with assertions for the printed transform counts.

Written by the indexing model from the issue text.

Description

documentation

Part of epic #148. Depends on: #152 (E4.2), pipekit E1.3 (ScanCycle)

Content

  1. Why the carrier. Show the A / P / S transform-budget table: XLA merges identical transforms of the same array, but does not cancel an inverse→forward pair.
  2. Barotropic vorticity ∂ₜq = −J(ψ, q) − ν(−∇²)²q as a Graph on Spectral(q̂) → RK4 → ScanCycle, with an enstrophy time series from Enstrophy. The model itself lives in somax (#13 moves there); this is the one from-scratch example kept in spectraldiffx.
  3. Stability note (cost the prototype one run): the hyperviscous stiffness at the corner mode is ν(kₓ² + k_y²)²_max. At N = 128 on 2π that is ν·(2·64²)² ≈ 6.7e7·ν, so explicit RK4 needs ν·6.7e7·dt < 2.79. Document the bound and point to IMEX / integrating-factor steppers (#110's hyperviscous Helmholtz inverse) for stiffer settings.
  4. Gradients. ∇ w.r.t. q₀ (4DVar-style) and w.r.t. ν, both against finite differences.

Acceptance criteria

  • Example runs in CI on CPU in under 60 s (N = 64, short window).
  • The printed transform counts are asserted, not just displayed.

Generated by Claude Code

Dominant language
Python
Stars
2
Forks
0
Avg merge
8h 13m
Merged PRs (30d)
8

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jejjohnson/spectraldiffx

All issues in jejjohnson/spectraldiffx

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.