Skip to content
Back to skills

Docs

ASecurity

> **Stage ID**: s8_execution > **Pipeline order**: 8 of 10 > **Depends on**: s2_site_config, s3_setup_modules, s4_climate_prep, s5_airchemistry_prep, s6_management_config, s7_species_params

  • 231 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 11, 2026
testingpythonc++bash

Works with

  • cli

Security analysis

A100/100

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

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

> **Stage ID**: s8_execution
> **Pipeline order**: 8 of 10
> **Depends on**: s2_site_config, s3_setup_modules, s4_climate_prep, s5_airchemistry_prep, s6_management_config, s7_species_params

## Purpose

Run the LDNDC binary with the prepared project configuration. This stage executes the C++ model core which integrates all process modules (microclimate, watercycle, soilchemistry, physiology) over the simulation period. Typical runtime: 1-30 minutes per site depending on period length and output detail.

## Prerequisites

- [ ] All input files generated and validated (S2-S7 complete)
- [ ] LDNDC binary installed and executable
- [ ] project.xml references all input files correctly
- [ ] Sufficient disk space for output (estimate: ~50 MB per site-year at daily resolution)

## Inputs

| Input | Type | Source | Description |
|-------|------|--------|-------------|
| ldndc_binary | file | Installation | Path to `ldndc` executable |
| project_xml | file | S1 | Master project configuration |

## Procedure

### Step 1: Pre-flight checks

Before running, verify all input files exist:
```bash
# Check all source files referenced in project.xml
ls {project_dir}/input/site.xml
ls {project_dir}/input/setup.xml
ls {project_dir}/input/climate.txt
ls {project_dir}/input/airchem.txt
ls {project_dir}/input/mana.xml
ls {project_dir}/input/parameters_species.xml
```

### Step 2: Run LDNDC

```bash
python tools/s8_execution/run_ldndc.py
```

Or directly:
```bash
cd {project_dir}
KISSPATH_HOME/LDNDC/bin/ldndc project.xml
```

**Expected behavior**:
- LDNDC prints initialization messages (reading XML files, loading modules)
- Progress indicators during simulation (year boundaries, daily stepping)
- Exit code 0 on success

**Expected runtime**:
- 1-year simulation, daily output: 1-3 minutes
- 10-year simulation, daily output: 5-15 minutes
- 10-year simulation, subdaily output: 15-30 minutes

### Step 3: Verify output

```bash
ls {project_dir}/output/
```

**Expected files** (depends on setup.xml output modules):
- `soilchemistry-daily.txt` -- daily GHG fluxes and leaching
- `watercycle-daily.txt` -- daily water balance
- `physiology-daily.txt` -- daily vegetation variables
- `ecosystem-yearly.txt` -- annual integrated fluxes
- `soilchemistry-layer-daily.txt` -- per-layer daily values (if configured)

## Expected Outputs

| Output | Path | Verification |
|--------|------|--------------|
| Output directory | `{project_dir}/output/` | Contains .txt output files |
| soilchemistry-daily.txt | `{project_dir}/output/soilchemistry-daily.txt` | Has header + daily data rows |

## Validation Checks

1. **Exit code**: Must be 0. Non-zero indicates error.
2. **Output file existence**: At least the configured output modules produced files
3. **Output file size**: Files are non-empty (>100 bytes)
4. **Row count**: Daily output files have approximately N_days rows (header + 1 per day)
5. **No NaN values**: Spot-check first and last rows for NaN/inf values

## Common Pitfalls

> **PITFALL**: Segfault from invalid soil data
> Zero or negative bulk density, or zero-thickness soil layers, cause segfaults during initialization. The error gives no indication of which parameter is wrong.
> **Do this instead**: Validate site.xml before running (S2 validation checks).
> See diagnostic triplet dt_010.

> **PITFALL**: NaN propagation mid-simulation
> Extreme parameter combinations can cause numerical instability partway through the simulation. Check if output files have NaN values.
> See diagnostic triplet dt_011.

> **PITFALL**: Running from wrong directory
> LDNDC resolves relative paths from the current working directory, not from the project.xml location. Always `cd` to the project directory before running.

> **PITFALL**: Long-running process appears stuck
> LDNDC may produce no stdout for 1-2 minutes during computationally intensive periods. This is normal. Do not kill the process unless it exceeds 2x expected runtime.

---

*This skill document is part of the ldndc-knowledge-infrastructure package.*
*Stage 8 of 10 | Tools used: run_ldndc | Related triplets: dt_010, dt_011*

Files in this skill

  • REFERENCES.md1.3 KB
  • format_spec.yaml34.9 KB
  • model_couplings.yaml9.6 KB
  • papers.json6.7 KB
  • s10_vic_coupling_skill.md5.2 KB
  • s1_installation_skill.md4.9 KB
  • s1_project_setup_skill.md4 KB
  • s2_site_config_skill.md4.7 KB
  • s3_setup_modules_skill.md4.3 KB
  • s4_climate_prep_skill.md4 KB
  • s5_airchemistry_prep_skill.md2.7 KB
  • s6_management_config_skill.md4.2 KB
  • s7_species_params_skill.md3.4 KB
  • s8_execution_skill.md4 KB
  • s9_coupling_skill.md7.3 KB
  • s9_output_parsing_skill.md4.5 KB
  • validation_convention.yaml18.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.

View all in testing →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.