Skip to content
Back to skills

Docs

ASecurity

Configure CLM 4.5 as the upper boundary condition. CLM provides evapotranspiration, snow, canopy interception, and radiation balance.

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

Security analysis

A100/100

Pro scans all 14 files and shows the line behind each finding

Scanned November 9, 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-e416c631/badge)](https://www.skillsdirectory.com/skills/lzwei196-docs-e416c631)

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
# S4: CLM Land Surface Setup — Skill Document

## Purpose

Configure CLM 4.5 as the upper boundary condition. CLM provides evapotranspiration, snow, canopy interception, and radiation balance.

## Prerequisites

- Domain definition (s1)
- Surface mask (s1)
- AVHRR land cover data (`data/landcover/AVHRR_1km_LANDCOVER_1981_1994.GLOBAL.tif`)
- HWSD global soil raster + table (`data/soil/HWSD_RASTER/hwsd.bil`, `data/soil/HWSD_DATA.csv`), the same soil s2 uses
- A soil colour class (1-8) that YOU choose (`--soil_color`, required, no default; see below)

## Procedure

1. **Run** `setup_clm_driver.py` with domain JSON, mask, dates and `--soil_color N`.
2. **Verify** drv_vegm.dat has correct IGBP vegetation types (not all zeros/bare soil) and per-cell sand/clay (columns 5-6 vary with the soil map). `clm_provenance.json` records the sources, class counts, sand/clay ranges and the soil colour assumption.
3. **Verify** drv_clmin.dat timestep matches ParFlow timestep.

## drv_vegm.dat: every cell gets real data

Line format (CLM `drv_readvegtf.F90`, two header lines, rows y outer / columns x inner): `x y lat lon sand clay color frac1..frac18`.

- **Every cell of the Box grid**, inside and outside the basin mask, gets its own values: the s7 run script uses Box geometry, so CLM computes every cell. (Outside cells used to be written as IGBP 17 water.)
- **Vegetation**: AVHRR (UMD classes) -> IGBP, one class per cell (fraction 1.0). A cell outside the raster, at nodata, or with a value that has no IGBP mapping stops the tool. There is no default class (the old silent grassland default is gone).
- **sand / clay**: HWSD topsoil (0-30 cm) T_SAND / T_CLAY of the dominant component (largest SHARE, ties -> lowest SEQ), divided by 100 (CLM reads fractions; `drv_clmini.F90` multiplies by 100). Same reader as s2 (`sample_hwsd_topsoil`), so CLM and ParFlow use the same soil. CLM applies the value to all its soil layers. A cell with no HWSD texture (e.g. a water body, ISSOIL 0) stops the tool with the count and the first 10 cells; there is no default (the old fixed 0.40 / 0.20 was made up). In ParFlow-CLM sand/clay set CLM's soil thermal properties (tkm, csol) and its bsw/sucsat/xksat; the soil water itself is ParFlow's.
- **soil colour** (`color`): CLM soil colour class 1 (lightest) .. 8 (darkest); `clm_varcon.F90` gives saturated / dry visible albedo 0.12/0.24 (class 1) down to 0.05/0.10 (class 8), used by `clm_soilalb.F90` for bare-soil albedo. No soil-colour map exists on this server, so the class is **required from the user** (`--soil_color`) and written to every cell. It is a stated assumption, recorded in the tool output (`stated_assumptions`, `provenance.soil_color`) and `clm_provenance.json`. The shipped washita reference (`drv_vegm.alluv.dat`) uses class 2 everywhere. Pick it from local knowledge (dark organic / black soils -> high class; light sandy / desert soils -> low class) and report it with results.

## Critical Knowledge

- **Zero vegetation** (dt_pf_030): All-zero vegmap produces no transpiration (silent error).
- **File naming** (dt_pf_031): CLM forcing files must be named `NLDAS.<run>.NNNNNN.pfb` with sequential numbers starting from IstepStart.
- **IGBP types**: 1-14 are vegetated, 15=snow/ice, 16=barren, 17=water. A realistic basin should have types 1-14 dominant.
- **CLM timestep**: Must match ParFlow base timestep. CLM does not interpolate.
- **LAI seasonality**: Default values are annual means. For seasonal accuracy, provide monthly LAI.

Files in this skill

  • REFERENCES.md1.7 KB
  • format_spec.yaml39.8 KB
  • papers.json5.4 KB
  • s1_domain_skill.md3 KB
  • s2_subsurface_skill.md2.6 KB
  • s3_topography_skill.md1.1 KB
  • s4_clm_skill.md1 KB
  • s5_forcing_skill.md1.3 KB
  • s6_ic_bc_skill.md1.8 KB
  • s7_solver_skill.md1.7 KB
  • s8_execution_skill.md1.5 KB
  • s9_output_skill.md1.8 KB
  • validation_convention.yaml20.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.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.