glm-basics — Claude Code skill: GLM setup and installation
The glm-basics skill explains how to run the General Lake Model, read its input files, and adjust configuration values. Use it when setting up a lake temperature simulation.
MIT 14 installs ★ 1,933 updated 2026-10-24
npx skills add benchflow-ai/skillsbench --skill glm-basics -a claude-codeWhat glm-basics does
GLM models vertical temperature and mixing in lakes. The skill covers running the model from its current directory: GLM reads glm3.nml and writes results to output/output.nc. Boundary-condition files in bcs/ provide meteorology, inflows, and outflows.
The configuration uses Fortran namelist sections for settings such as light, mixing, and meteorology. A Python example uses re to replace numeric values in glm3.nml. Namelist syntax matters; invalid formatting can prevent output from being generated.
The guide recommends backing up glm3.nml before editing and running GLM after each change. If the model will not start, check the files in bcs/; a simulation crash calls for checking whether parameter values are within valid ranges.
What it helps with
- run GLM from its working directory
- identify the model's required input files
- edit numeric values in
glm3.nml - diagnose startup and simulation failures
Example prompts for the agent
- Explain how to run GLM and where it writes the results.
- Check which files this setup needs in
bcs/. - Use Python to change
Kwandwind_factoringlm3.nml.
How to install glm-basics
1Skills CLI (Vercel)
npx skills add benchflow-ai/skillsbench --skill glm-basics -a claude-code2Manually: put the files in place
~/.claude/skills/glm-basics/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/glm-basics/
1Skills CLI (Vercel)
npx skills add benchflow-ai/skillsbench --skill glm-basics -a codex2Manually: put the files in place
.agents/skills/glm-basics/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add benchflow-ai/skillsbench --skill glm-basics -a cursor2Manually: put the files in place
.cursor/skills/glm-basics/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install benchflow-ai/skillsbench tasks/glm-lake-mendota/environment/skills/glm-basics2Manually: put the files in place
.github/skills/glm-basics/SKILL.md1Skills CLI (Vercel)
npx skills add benchflow-ai/skillsbench --skill glm-basics -a gemini-cli2Platform CLI
gemini skills install https://github.com/benchflow-ai/skillsbench --path tasks/glm-lake-mendota/environment/skills/glm-basicsManually: put the files in place
.devin/skills/glm-basics/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add benchflow-ai/skillsbench --skill glm-basics -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about glm-basics
How do I install glm-basics in Claude Code?
Run npx skills add benchflow-ai/skillsbench --skill glm-basics -a claude-code. The skill file is located at ~/.claude/skills/glm-basics/SKILL.md.
What does glm-basics do?
It guides you through running the General Lake Model, reading glm3.nml, and changing numeric settings with Python. It also covers common causes of errors.
Which files does GLM use as input?
GLM reads glm3.nml and boundary-condition files from bcs/, including meteorology, inflow, and outflow data.
Source text
SKILL.md · MIT
---
name: glm-basics
description: Basic usage of the General Lake Model (GLM) for lake temperature simulation. Use when you need to run GLM, understand input files, or modify configuration parameters.
license: MIT
---
# GLM Basics Guide
## Overview
GLM (General Lake Model) is a 1D hydrodynamic model that simulates vertical temperature and mixing dynamics in lakes. It reads configuration from a namelist file and produces NetCDF output.
## Running GLM
```bash
cd /root
glm
```
GLM reads `glm3.nml` in the current directory and produces output in `output/output.nc`.
## Input File Structure
| File | Description |
|------|-------------|
| `glm3.nml` | Main configuration file (Fortran namelist format) |
| `bcs/*.csv` | Boundary condition files (meteorology, inflows, outflows) |
## Configuration File Format
`glm3.nml` uses Fortran namelist format with multiple sections:
```fortran
&glm_setup
sim_name = 'LakeName'
max_layers = 500
/
&light
Kw = 0.3
/
&mixing
coef_mix_hyp = 0.5
/
&meteorology
meteo_fl = 'bcs/meteo.csv'
wind_factor = 1
lw_factor = 1
ch = 0.0013
/
&inflow
inflow_fl = 'bcs/inflow1.csv','bcs/inflow2.csv'
/
&outflow
outflow_fl = 'bcs/outflow.csv'
/
```
## Modifying Parameters with Python
```python
import re
def modify_nml(nml_path, params):
with open(nml_path, 'r') as f:
content = f.read()
for param, value in params.items():
pattern = rf"({param}\s*=\s*)[\d\.\-e]+"
replacement = rf"\g<1>{value}"
content = re.sub(pattern, replacement, content)
with open(nml_path, 'w') as f:
f.write(content)
# Example usage
modify_nml('glm3.nml', {'Kw': 0.25, 'wind_factor': 0.9})
```
## Common Issues
| Issue | Cause | Solution |
|-------|-------|----------|
| GLM fails to start | Missing input files | Check bcs/ directory |
| No output generated | Invalid nml syntax | Check namelist format |
| Simulation crashes | Unrealistic parameters | Use values within valid ranges |
## Best Practices
- Always backup `glm3.nml` before modifying
- Run GLM after each parameter change to verify it works
- Check `output/` directory for results after each run
© benchflow-ai · MIT · benchflow-ai/skillsbench