Skip to content
Back to skills

Docs

ASecurity

Set up the HEC-HMS simulation environment: define the basin, simulation period, temporal resolution, file paths, and unit system. This stage produces no model output but establishes the framework for all subsequent stages.

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

Works with

  • cli

Security analysis

A100/100

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

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: Configuration Skill

## Purpose

Set up the HEC-HMS simulation environment: define the basin, simulation period,
temporal resolution, file paths, and unit system. This stage produces no model
output but establishes the framework for all subsequent stages.

## Inputs

| Input | Format | Example |
|-------|--------|---------|
| Basin shapefile | .shp (EPSG:4326) | `bengbu_clip.shp` |
| DEM | GeoTIFF | `china_dem_90m.tif` |
| Simulation period | YYYY-MM-DD | 1980-01-01 to 1990-12-31 |
| Timestep | hours | 24 (daily) |
| Unit system | string | "metric" |
| Forcing directory | path | `/path/to/cmfd/` |
| Observation file | path | `51080_bengbu.txt` |

## Outputs

| Output | Format | Description |
|--------|--------|-------------|
| Project config JSON | `.json` | All paths, dates, parameters |
| Basin info JSON | `.json` | Area (km²), bounds, centroid |

## Procedure

1. **Define project directory**: Create working directory structure:
   ```
   project/
   ├── forcing/       # Converted forcing data
   ├── params/        # Soil and land cover parameters
   ├── output/        # Model simulation output
   └── validation/    # Comparison with observations
   ```

2. **Read basin shapefile**: Load with geopandas, reproject to EPSG:4326 for
   forcing extraction, compute area in km² using equal-area projection (EPSG:6933).

3. **Set simulation period**: Define start/end dates. Include at least 1 year
   of spinup before the validation period. For Bengbu 1981-1990 validation,
   start the simulation at 1980-01-01.

4. **Choose timestep**: Daily (24 hr) for continuous simulation. Sub-daily
   (1-6 hr) for event-based flood analysis. Ensure forcing data resolution
   matches or exceeds the model timestep.

5. **Set unit system**: HEC-HMS supports Metric and US Customary. Use Metric
   for all HydroCraft integrations. Key units: precipitation (mm), temperature
   (°C), area (km²), discharge (m³/s).

6. **Verify data availability**: Check that forcing, soil, landcover, and
   observation files exist and cover the simulation period.

## Verification

- [ ] Basin area is reasonable (Bengbu: ~121,330 km²)
- [ ] Simulation period is within forcing data coverage
- [ ] All input file paths resolve to existing files
- [ ] Output directories are created and writable

## Traps

- **dt_108**: Basin area units. Shapefile `.area` returns m² — divide by 1e6 for km².
  Using projected CRS (EPSG:6933) for area computation, not geographic (EPSG:4326).
- **dt_115**: Simulation period must be within forcing data coverage. CMFD Huai River
  subset covers 1960-2020.
- Spinup: First year of simulation should be discarded. Baseflow and soil moisture
  need time to equilibrate from initial conditions.

## Example

```python
config = {
    "basin_shp": "KISSPATH_ROOT/.../bengbu_clip.shp",
    "forcing_dir": "KISSPATH_ROOT/.../Data_forcing_01dy_025deg/",
    "obs_file": "KISSPATH_ROOT/.../51080_bengbu.txt",
    "start_date": "1980-01-01",
    "end_date": "1990-12-31",
    "spinup_years": 1,
    "validation_start": "1981-01-01",
    "timestep_hr": 24,
    "unit_system": "metric",
    "basin_area_km2": 121330,
}
```

Files in this skill

  • format_spec.yaml22.3 KB
  • papers.json6 KB
  • s0_configuration_skill.md3.1 KB
  • s1_domain_setup_skill.md2.9 KB
  • s2_soil_parameters_skill.md3 KB
  • s4_forcing_conversion_skill.md3.1 KB
  • s5_model_execution_skill.md3.9 KB
  • s6_output_analysis_skill.md3.2 KB
  • s7_calibration_skill.md3.3 KB
  • validation_convention.yaml10.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…