Skip to content
Back to skills

Docs

ASecurity

Define the simulation site, period, forcing source, crop schedule, and output options. This stage establishes all parameters needed to assemble a complete SWAP .swp file.

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

Security analysis

A100/100

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

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
# S0: SWAP Configuration

## Purpose
Define the simulation site, period, forcing source, crop schedule, and output options. This stage establishes all parameters needed to assemble a complete SWAP .swp file.

## Inputs
- **Site location**: Latitude (°N), longitude (°E)
- **Simulation period**: Start date (YYYY-MM-DD), end date (YYYY-MM-DD)
- **Forcing source**: CMFD, MSWX, or local met station data
- **Crop schedule**: Crop type(s), emergence/harvest dates, CROPTYPE (1=simple, 2=WOFOST, 3=grass)
- **Soil type**: USDA texture class or HWSD lookup
- **Bottom boundary**: Type (free drainage, prescribed GWL, etc.)
- **Drainage**: Method (none, Hooghoudt, multi-level)

## Outputs
- Configuration dictionary or JSON with all parameters
- Validated parameter ranges

## Procedure
1. Select study site and extract coordinates
2. Define simulation period (ensure meteorological data coverage)
3. Choose forcing dataset (CMFD for China, MSWX for global)
4. Define crop rotation: CROPSTART, CROPEND, CROPFIL, CROPTYPE for each crop
5. Set soil profile: number of layers, compartment sizes (HSUBLAY, HCOMP, NCOMP)
6. Choose bottom boundary condition (SWBOTB = 7 for free drainage is simplest)
7. Set output options: SWBLC=1, SWINC=1, SWVAP=1 recommended minimum
8. Set numerical parameters: DTMIN=1e-6, DTMAX=0.04, MAXIT=30

## Verification
- All dates within forcing data coverage
- Crop dates do not overlap
- Soil layer thicknesses sum to profile depth
- NCOMP = HSUBLAY / HCOMP for each sub-layer

## Traps
- **TSTART before met data**: SWAP will crash with "meteorological data not available"
- **Overlapping crop dates**: Causes array overflow or incorrect rotation
- **NPRINTDAY > 1 with SWMETDETAIL=0**: Sub-daily output with daily forcing gives interpolation artifacts
- **Missing PATHWORK trailing slash**: SWAP may fail to find output directory

## Example
```
TSTART = 2002-01-01
TEND = 2004-12-31
METFIL = '283.met'
LAT = 52.0
SWETR = 0        ! Use Penman-Monteith
ALT = 10.0
ALTW = 10.0
SWCROP = 1
SWBOTB = 7       ! Free drainage
DTMIN = 0.000001
DTMAX = 0.04
```

Files in this skill

  • format_spec.yaml33.5 KB
  • papers.json7.1 KB
  • s0_configuration_skill.md2 KB
  • s1_met_forcing_skill.md3 KB
  • s2_soil_parameters_skill.md3 KB
  • s4_execution_skill.md3.2 KB
  • s5_output_parsing_skill.md3.1 KB
  • s6_visualization_skill.md2.8 KB
  • validation_convention.yaml19.2 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…