Skip to content
Back to skills

Docs

ASecurity

Parse CE-QUAL-W2 output files and generate visualizations. The signature output is the **curtain plot**: a 2D longitudinal-vertical cross-section showing temperature (or other variables) from upstream to dam at different depths.

  • 200 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 11, 2026
datapythonbashspringgit

Security analysis

A100/100

Pro scans all 11 files and shows the line behind each finding

Scanned September 11, 2026

npx -y skills add lzwei196/KISS---Knowledge-Infrastructure-for-Scientific-Simulation --skill docs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docs?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Docs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lzwei196-docs-1bb9d8ad/badge)](https://www.skillsdirectory.com/skills/lzwei196-docs-1bb9d8ad)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# s11: Output Analysis and Visualization — Skill Document

## Purpose

Parse CE-QUAL-W2 output files and generate visualizations. The signature output is the **curtain plot**: a 2D longitudinal-vertical cross-section showing temperature (or other variables) from upstream to dam at different depths.

## Prerequisites

- [ ] CE-QUAL-W2 run completed successfully (s10)
- [ ] Output files exist: snp_*.opt, tsr_*.opt, spr_*.opt
- [ ] reservoir_grid.json available (for spatial coordinates)

## Inputs

| Input | Type | Source | Description |
|-------|------|--------|-------------|
| Run directory | Path | s10 | Directory with output files |
| Grid JSON | File | s1 | Segment distances and layer elevations |

## Procedure

### Step 1: Parse output files

```bash
python tools/s11_output_analysis/parse_w2_output.py \
    --run_dir <run_dir> \
    --grid_json reservoir_grid.json \
    --output results_summary.json
```

This extracts:
- Snapshot data (2D temperature/velocity fields at key times)
- Time series data (temperature/DO at specific locations)
- Spreadsheet data (summary tables)

### Step 2: Generate curtain plot

```bash
python tools/s11_output_analysis/plot_w2_curtain.py \
    --run_dir <run_dir> \
    --grid_json reservoir_grid.json \
    --variable temperature \
    --output curtain_plot.png \
    --title "Reservoir Temperature Curtain"
```

Generates multi-panel plot with up to 4 snapshots (quarterly).

### Step 3: Generate time series

```bash
python tools/s11_output_analysis/plot_w2_timeseries.py \
    --run_dir <run_dir> \
    --output timeseries.png \
    --title "Reservoir Time Series"
```

### Step 4: Interpret results

Key things to check:
- **Thermal stratification**: Summer curtain should show warm surface layer, cool deep layer
- **Longitudinal gradient**: Upstream should be slightly different from dam (temperature, turbidity)
- **Seasonal cycle**: Summer warming, winter cooling, spring/fall mixing
- **Dam release temperature**: Should reflect withdrawal elevation and stratification

## Expected Outputs

| Output | Path | Description |
|--------|------|-------------|
| Summary JSON | `results_summary.json` | Parsed data statistics |
| Curtain plot | `curtain_plot.png` | 2D lon-vert temperature sections |
| Time series | `timeseries.png` | Temperature/DO at key locations |

## Validation Checks

1. Surface temperature range: 0-35 C (typical for most reservoirs)
2. Bottom temperature: should be cooler than surface in summer (stratification)
3. Seasonal amplitude: 15-30 C range for temperate reservoirs
4. Dam release temperature: should be intermediate (between surface and bottom)

## Common Pitfalls

| Pitfall | Triplet | Detection |
|---------|---------|-----------|
| No output to parse | dt_025 | results_summary shows 0 snapshots |
| Unrealistically warm everywhere | dt_001 | Cloud cover wrong (tenths vs fraction) |
| No stratification | dt_016/EXH2O | Light extinction too high or WSC too high |

Files in this skill

  • REFERENCES.md1.1 KB
  • format_spec.yaml31.6 KB
  • papers.json6.4 KB
  • s0_configuration_skill.md3.1 KB
  • s10_execution_skill.md2.4 KB
  • s11_output_analysis_skill.md2.9 KB
  • s1_bathymetry_skill.md3.9 KB
  • s3_met_forcing_skill.md3.7 KB
  • s9_control_file_skill.md4.9 KB
  • validation_convention.yaml16.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…