bioepic-data/ecosim-agent / .agents/skills/gapon-coefficient-estimator
gapon-coefficient-estimator
VerifiedEstimate calcium-normalized Gapon selectivity coefficients from paired exchange and solution chemistry, or initialize depth-explicit EcoSIM Gapon inputs from the closest bundled ecosystem template when paired chemistry is unavailable. Use when deriving or checking EcoSIM GKC4, GKCH, GKCA, GKCM, GKCN, or GKCK values; matching a target ecosystem, climate, vegetation, and management regime to a starting profile; remapping template values to target soil layers; or documenting that template-based values require calibration or tuning.
references/template-fallback.md
View on GitHub# Ecosystem-Template Fallback
## Purpose
The bundled cases provide depth-explicit starting values for EcoSIM when paired
exchange-phase and solution-phase chemistry is unavailable. They are
initialization templates, not measurements for the target site and not a
replacement for calibration.
The copied source cases are stored under
`assets/ecosystem_templates/`. `template_catalog.csv` indexes one row per soil
profile, including ecosystem, climate, vegetation, water regime, management,
region, and source-file provenance.
## Selection Order
1. Match ecosystem family: cropland, forest, pasture, grassland, tundra,
wetland, peatland, or rainforest.
2. Refine by climate.
3. Refine by dominant species, vegetation type, or crop rotation.
4. Refine by water regime and management, especially dryland versus irrigated
agriculture.
5. Prefer the case default only as a final tie-breaker.
Automatic matching must not cross ecosystem families just because climate is
similar. If no same-family case exists, choose an explicit `--template-id`,
record why it is ecologically closest, and retain the low-confidence warning.
## Depth Mapping
Source layers are retained when target depths are not supplied. For requested
EcoSIM layer-bottom depths, the selector assigns the source layer containing
each target bottom depth. A target below the deepest source layer receives the
deepest source value and is marked through the provenance depth map.
The current source profiles generally repeat coefficients by depth, but their
layer structure is intentionally preserved. This keeps output depth-explicit
and allows future horizon-varying templates without changing the workflow.
## EcoSIM Mapping
| CSV field | EcoSIM field | Exchange pair |
|---|---|---|
| `gkc4` | `GKC4` | Ca-NH4 |
| `gkch` | `GKCH` | Ca-H |
| `gkca` | `GKCA` | Ca-Al |
| `gkcm` | `GKCM` | Ca-Mg |
| `gkcn` | `GKCN` | Ca-Na |
| `gkck` | `GKCK` | Ca-K |
Transfer the six fields as a set. Do not silently combine coefficients from
different templates.
## Required Provenance
The selector writes `gapon_source_method=ecosystem_template_fallback`, the
template ID, source case, source soil profile, source layer, source depth, and
`qc_flags=template_based;subject_to_tuning`. Keep the generated provenance JSON
with any Excel, JSON, or NetCDF input derived from it. Add equivalent global
attributes or report fields when the destination format supports them.
Always state:
> Gapon coefficients are initialized from the closest ecosystem template, not
> derived from site-specific paired exchange and solution chemistry. They are
> starting values and are subject to calibration or tuning when needed.
Paired chemistry supersedes the template. Useful tuning constraints include
exchangeable-cation composition, soil-solution cations, pH and sodicity,
nutrient response, leaching, and cation mass balance.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |