Skip to content
Back to skills

Docs

ASecurity

> **Stage ID**: s4_initial_conditions > **Pipeline order**: 4 of 10 > **Depends on**: s2_soil_profile

  • 231 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 11, 2026
testingpython

Security analysis

A100/100

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

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
# Initial Water Content -- Skill Document

> **Stage ID**: s4_initial_conditions
> **Pipeline order**: 4 of 10
> **Depends on**: s2_soil_profile

## Purpose

Define the soil water content at the start of the simulation. Initial water content affects early-season crop germination and establishment. If set too low (below wilting point), the crop may fail to germinate. If set unrealistically high (above saturation), early drainage dynamics are distorted.

## Prerequisites

- [ ] Soil profile defined (S2 complete) -- needed to know number of layers
- [ ] Decision on initial moisture level (field observations, VIC output, or default FC)

## Inputs

| Input | Type | Source | Description |
|-------|------|--------|-------------|
| wc_type | string | User decision | 'Prop' (property name), 'Num' (volumetric m3/m3), 'Pct' (% of TAW) |
| method | string | User decision | 'Layer' (per soil layer) or 'Depth' (interpolate depth points) |
| depth_layer | list | Matches soil layers | Layer numbers [1, 2, ...] or depths [0.1, 0.5, ...] |
| value | list | User / VIC soil moisture | Values at each location |

## Procedure

### Step 1: Choose specification method

**Recommended default**: Field Capacity
```python
from aquacrop import InitialWaterContent
iwc = InitialWaterContent(wc_type='Prop', method='Layer', depth_layer=[1], value=['FC'])
```

**From VIC soil moisture output**:
```python
# VIC provides volumetric soil moisture (m3/m3) per soil layer
iwc = InitialWaterContent(wc_type='Num', method='Layer',
                          depth_layer=[1, 2],
                          value=[0.25, 0.30])  # m3/m3 from VIC
```

**As percentage of Total Available Water**:
```python
iwc = InitialWaterContent(wc_type='Pct', method='Layer',
                          depth_layer=[1], value=[70])  # 70% TAW
```

### Step 2: Match layers to soil profile

For multi-layer custom soils, the number of layers in IWC **must match** the soil.

**If single value given for multi-layer soil**: All layers silently default to FC. This is not an error but may not represent reality. See dt_012.

### Step 3: Validate ranges

- For `wc_type='Num'`: values must be between th_dry and th_s for the corresponding layer
- For `wc_type='Pct'`: values must be 0-100
- For `wc_type='Prop'`: values must be one of 'WP', 'FC', 'SAT'

## Expected Outputs

| Output | Path | Verification |
|--------|------|--------------|
| iwc object | in-memory | `iwc.wc_type` is valid, `len(iwc.value)` matches expectation |

## Validation Checks

1. **Type validity**: `iwc.wc_type in ['Prop', 'Num', 'Pct']`
2. **Property names**: If `wc_type='Prop'`, each value must be 'WP', 'FC', or 'SAT'
3. **Layer match**: For multi-layer soil, `len(iwc.depth_layer)` should equal `soil.nLayer`

## Common Pitfalls

> **PITFALL**: Single-layer IWC with multi-layer soil
> AquaCrop silently defaults all layers to FC if IWC has fewer layers than soil. No warning is raised.
> **Do this instead**: Specify IWC for each soil layer explicitly.
> See diagnostic triplet dt_012.

> **PITFALL**: Initial water below wilting point
> Setting IWC below WP causes the crop to fail germination (GermThr threshold not met). The crop never emerges and yield is zero.
> **Do this instead**: Use at least 'WP' or preferably 'FC' as initial condition.
> See diagnostic triplet dt_004.

---

*This skill document is part of the aquacrop-ospy-knowledge infrastructure.*
*Stage 4 of 10 | Tools used: create_initial_water_content | Related triplets: dt_004, dt_012*

Files in this skill

  • REFERENCES.md1.6 KB
  • format_spec.yaml35.8 KB
  • model_couplings.yaml13.5 KB
  • papers.json4.9 KB
  • s10_water_productivity_skill.md7.1 KB
  • s1_crop_selection_skill.md4.5 KB
  • s2_soil_profile_skill.md4 KB
  • s3_weather_prep_skill.md5.7 KB
  • s4_initial_conditions_skill.md3.4 KB
  • s5_irrigation_skill.md5.7 KB
  • s6_field_management_skill.md2.9 KB
  • s7_model_assembly_skill.md4 KB
  • s8_execution_skill.md3.3 KB
  • s9_output_analysis_skill.md5.3 KB
  • validation_convention.yaml23 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.