Skip to content
Back to skills

Docs

ASecurity

> **Stage ID**: s6_management_config > **Pipeline order**: 6 of 10 > **Depends on**: s1_project_setup

  • 200 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 11, 2026
testingpythonbashdatabase

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

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
# Management Events Configuration (mana.xml) — Skill Document

> **Stage ID**: s6_management_config
> **Pipeline order**: 6 of 10
> **Depends on**: s1_project_setup

## Purpose

Define agricultural management operations in `mana.xml` that drive LDNDC's biogeochemistry: when crops are sown, how much fertilizer is applied, when and how tillage occurs, and when harvest happens. Management is the primary human control on soil C/N cycling and GHG emissions.

## Prerequisites

- [ ] Project directory created (S1 complete)
- [ ] Crop type and management schedule known
- [ ] LDNDC species parameter database available (parameters_species.xml)

## Inputs

| Input | Type | Source | Description |
|-------|------|--------|-------------|
| project_dir | directory | S1 | LDNDC project root |
| management_config | config | User/DSSAT/literature | JSON with event definitions |
| simulation_years | list | S1 | Years to generate events for |

## Procedure

### Step 1: Define management events

Create a JSON config with events. Each event has: type, date, and type-specific parameters.

**Event types and parameters:**

| Event | Key Parameters | Example |
|-------|---------------|---------|
| sowing | species (must match parameters_species.xml), seed_amount (kgC/ha) | `{"type": "sowing", "date": "2005-04-15", "species": "maize", "seed_amount": 10}` |
| fertilization | n_amount (kgN/ha), fert_type (urea, ammonium_nitrate, organic), depth_cm | `{"type": "fertilization", "date": "2005-05-01", "n_amount": 120, "fert_type": "urea", "depth_cm": 5}` |
| tillage | depth_cm, intensity (0-1, fraction of residue incorporated) | `{"type": "tillage", "date": "2005-03-20", "depth_cm": 25, "intensity": 0.9}` |
| harvest | residue_fraction (0-1, fraction of aboveground left on field) | `{"type": "harvest", "date": "2005-10-01", "residue_fraction": 0.3}` |
| irrigation | amount_mm | `{"type": "irrigation", "date": "2005-07-15", "amount_mm": 50}` |

### Step 2: Generate mana.xml

```bash
python tools/s6_management_config/generate_management_xml.py
```

**Expected result**: `{project_dir}/input/mana.xml` with structure:

```xml
<ldndcmanagement>
  <event type="tillage" date="2005-03-20" depth="0.25" intensity="0.9"/>
  <event type="sowing" date="2005-04-15" species="maize" seedamount="10"/>
  <event type="fertilization" date="2005-05-01" amount="120" type="urea" depth="0.05"/>
  <event type="harvest" date="2005-10-01" residuefraction="0.3"/>
</ldndcmanagement>
```

**If this fails**: See diagnostic triplet dt_008.

### Step 3: Verify species names

Cross-check every species name in sowing events against `parameters_species.xml`. An exact string match is required. See dt_009 for the consequences of mismatched names.

## Expected Outputs

| Output | Path | Verification |
|--------|------|--------------|
| mana.xml | `{project_dir}/input/mana.xml` | Well-formed XML; events cover all simulation years |

## Validation Checks

1. **Date range**: All event dates within [start_date, end_date] from project.xml
2. **Species match**: Every sowing species name exists in parameters_species.xml
3. **Annual coverage**: At least one sowing event per simulation year (for cropland)
4. **Fertilizer range**: N amounts 0-400 kgN/ha per application (>400 is suspicious)
5. **Event ordering**: Per-year events in chronological order (tillage before sowing before harvest)

## Common Pitfalls

> **PITFALL**: Species name mismatch
> If mana.xml says "wheat" but parameters_species.xml has "winter_wheat", LDNDC silently skips the sowing. No crop grows, yield is zero. No error is raised.
> **Do this instead**: Run validate_species_params (S7) after generating mana.xml.
> See diagnostic triplet dt_009.

> **PITFALL**: Event dates outside simulation period
> LDNDC rejects events with dates outside the project.xml schedule. This is a fatal error, not a silent one.
> See diagnostic triplet dt_008.

> **PITFALL**: Tillage depth in meters instead of centimeters
> LDNDC expects tillage depth in meters in the XML (e.g., 0.25 for 25 cm). If provided in cm (25), tillage reaches 25 meters deep, which is nonsensical but does not cause an error.

---

*This skill document is part of the ldndc-knowledge-infrastructure package.*
*Stage 6 of 10 | Tools used: generate_management_xml | Related triplets: dt_008, dt_009*

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…