Skip to content
Back to skills

Docs

ASecurity

Execute the SFINCS binary with preflight validation, log monitoring, and output verification. SFINCS is a Fortran binary that reads from the current working directory.

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

Security analysis

A100/100

Pro scans all 13 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-80a57be7/badge)](https://www.skillsdirectory.com/skills/lzwei196-docs-80a57be7)

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
# S7: Execution — Skill Document

## Purpose

Execute the SFINCS binary with preflight validation, log monitoring, and output verification. SFINCS is a Fortran binary that reads from the current working directory.

## Prerequisites

- sfincs.inp and ALL referenced files in the run directory
- SFINCS binary compiled and executable at `model/sfincs/bin/sfincs`
- Sufficient disk space for output (estimate: 4 * mmax * nmax * n_output_steps bytes)

## Inputs

| Input | Type | Required |
|-------|------|----------|
| Run directory | directory | Yes |
| SFINCS binary path | file | Yes |
| OMP threads | number | Optional (default: 4) |
| Timeout | number | Optional (default: 7200s) |

## Procedure

1. **Preflight checks** (run_sfincs.py does these automatically):
   - sfincs.inp exists in run_dir
   - All referenced files (dep, msk, ind, man, precip, bnd, src, etc.) exist
   - Mask has active cells > 0 (dt_019)
   - dt satisfies CFL (dt_009)
   - outputformat = net is set (dt_018)

2. **Execute**: `python run_sfincs.py --run_dir <dir>`
   - Sets OMP_NUM_THREADS for parallel execution
   - Sets CWD to run_dir (CRITICAL — dt_017)

3. **Runtime estimation**:
   | Active cells | Period | dt | Estimated runtime |
   |-------------|--------|-----|------------------|
   | 50,000 | 10 days | 10s | ~1 minute |
   | 250,000 | 30 days | 5s | ~10 minutes |
   | 1,000,000 | 30 days | 2s | ~2 hours |
   | 5,000,000 | 10 days | 1s | ~12 hours |

4. **Check outputs**:
   - sfincs_map.nc should exist (gridded output)
   - sfincs_his.nc should exist if observation points were defined
   - sfincs.log should not contain error messages

## Expected Outputs

| Output | Path | Verification |
|--------|------|-------------|
| sfincs_map.nc | `{run_dir}/sfincs_map.nc` | Exists, size > 0 |
| sfincs_his.nc | `{run_dir}/sfincs_his.nc` | Exists if obs points defined |
| sfincs.log | `{run_dir}/sfincs.log` | No error messages |
| run_summary.json | `{run_dir}/run_summary.json` | exit_code = 0 |

## Validation Checks

1. Exit code = 0
2. sfincs_map.nc exists and has non-zero size
3. No NaN values in output (check with `ncdump -h`)
4. Runtime is within expected range (if 10x too long, see dt_011)

## Common Pitfalls

- **dt_017**: Not running from the directory containing sfincs.inp. The tool handles this.
- **dt_009**: NaN crash from CFL violation. Reduce dt in sfincs.inp.
- **dt_019**: Output all zeros because mask has no active cells. Check mask file.
- **dt_018**: No sfincs_map.nc because outputformat was not set to "net".
- Process appears stuck: SFINCS may not print progress for several minutes. Check if it is still running (ps) before killing.

Files in this skill

  • REFERENCES.md1.5 KB
  • format_spec.yaml44.1 KB
  • papers.json5.8 KB
  • s1_domain_skill.md2.5 KB
  • s2_topobathy_skill.md3.4 KB
  • s3_roughness_skill.md2.1 KB
  • s4_forcing_skill.md4.2 KB
  • s5_structures_skill.md2.1 KB
  • s6_config_skill.md2.7 KB
  • s7_execution_skill.md2.6 KB
  • s8_postprocess_skill.md3.1 KB
  • validation_convention.yaml8.6 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…