Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add benchflow-ai/skillsbench --skill glm-basics -a claude-code
Open on GitHub

What 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 Kw and wind_factor in glm3.nml.

How to install glm-basics

1Skills CLI (Vercel)

npx skills add benchflow-ai/skillsbench --skill glm-basics -a claude-code

2Manually: put the files in place

~/.claude/skills/glm-basics/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/glm-basics/

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

Similar skills

All skills for Science and research →

From the same set22

The whole set →
fjsp-baseline-repair-with-downtime-and-policy fjsp-baseline-repair-with-downtime-and-policy repairs flexible job shop schedules by resolving downtime conflicts, operation precedence issues, and budget constraints. CX Codex +1 32installs search-driving-distance search-driving-distance gives driving or taxi time, distance and a rough price between two cities, using the distance matrix CSV that comes with the skill. CX Codex +1 31installs pymatgen pymatgen handles crystal structure transformations, file conversions between CIF and POSCAR, symmetry analysis, and Materials Project queries. CX Codex +1 12installs trend-analysis trend-analysis guides agents in evaluating time series trends using linear regression and Sen's slope. CX Codex +1 8installs threejs This skill maps Three.js scene groups to parts, then prepares per-part OBJ files or URDF links. Use it when a scene needs structured geometry export. CX Codex +1 8installs reflow-machine-maintenance-guidance reflow-machine-maintenance-guidance handles reflow oven upkeep questions by computing ramp rates, time above liquidus and conveyor limits from thermocouple logs, MES data and the handbook. CX Codex +1 5installs text-to-speech The text-to-speech skill guides TTS cleanup, loudness matching, and segment timing for video audio exports. CX Codex +1 4installs civ6lib civ6lib validates Civilization 6 district placement and computes adjacency bonuses. Use it when an agent needs to reason about city layouts and game rules. CX Codex +1 2installs

Project sponsors

Companies that keep this analytics open