Skip to content
Back to skills

Docs

ASecurity

> **Stage ID**: s5_airchemistry_prep > **Pipeline order**: 5 of 10 > **Depends on**: s1_project_setup

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

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-8d08fac5/badge)](https://www.skillsdirectory.com/skills/lzwei196-docs-8d08fac5)

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
# Air Chemistry Data Preparation — Skill Document

> **Stage ID**: s5_airchemistry_prep
> **Pipeline order**: 5 of 10
> **Depends on**: s1_project_setup

## Purpose

Prepare atmospheric boundary conditions for LDNDC: ambient CO2 concentration and nitrogen deposition rates (NH4 and NO3, wet + dry). These drive the background N input to soils (affecting N2O emissions and N leaching) and the CO2 fertilization effect on photosynthesis.

## Prerequisites

- [ ] Project directory created (S1 complete)
- [ ] Atmospheric N deposition data available for the region (or use defaults)
- [ ] CO2 concentration known (historical or scenario)

## Inputs

| Input | Type | Source | Description |
|-------|------|--------|-------------|
| output_path | file | S1 | Target airchem.txt path |
| co2_ppm | number | Mauna Loa / SSP scenario | Ambient CO2 (default: 400 ppm) |
| nh4_dep_kgNha | number | EMEP / regional data | NH4 deposition rate (default: 5.0 kgN/ha/yr) |
| no3_dep_kgNha | number | EMEP / regional data | NO3 deposition rate (default: 3.0 kgN/ha/yr) |

## Procedure

### Step 1: Determine atmospheric inputs

**CO2 concentration** (approximate values by decade):
- 1980s: 340 ppm
- 1990s: 360 ppm
- 2000s: 380 ppm
- 2010s: 400 ppm
- 2020s: 420 ppm

**N deposition** (typical ranges by region):
- Western Europe: 10-30 kgN/ha/yr
- Eastern China: 15-40 kgN/ha/yr
- North America: 5-15 kgN/ha/yr
- Tropical regions: 2-8 kgN/ha/yr
- Remote/pristine: 1-3 kgN/ha/yr

### Step 2: Generate airchem.txt

```bash
python tools/s5_airchemistry_prep/generate_airchemistry_file.py
```

**Expected result**: `airchem.txt` with tab-separated format:

```
#	co2	nh4_dep	no3_dep
2000-01-01	370.0	5.0	3.0
```

If `airchemistry endless="yes"` is set in project.xml, a single row is repeated for all simulation years.

## Expected Outputs

| Output | Path | Verification |
|--------|------|--------------|
| airchem.txt | `{project_dir}/input/airchem.txt` | Header + data rows; CO2 in [280-600] ppm |

## Validation Checks

1. **CO2 range**: 280-600 ppm for historical simulations, up to 1200 ppm for future scenarios
2. **N deposition range**: 0-50 kgN/ha/yr (values > 50 are suspicious -- see dt_007)
3. **File format**: Tab-separated with header row

## Common Pitfalls

> **PITFALL**: N deposition in wrong units (g/m2 instead of kgN/ha)
> 1 g/m2/yr = 10 kgN/ha/yr. Providing values in g/m2 inflates N input by 10x, producing excessive N2O emissions. The model gives no warning.
> **Do this instead**: Verify units match kgN/ha/yr. Typical values: 1-30 kgN/ha/yr.
> See diagnostic triplet dt_007.

---

*This skill document is part of the ldndc-knowledge-infrastructure package.*
*Stage 5 of 10 | Tools used: generate_airchemistry_file | Related triplets: dt_007*

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.

Comments

Loading comments…