Skip to content
Skills Library
Science & research · Learning & explanation

glm-basics

/glm-basics

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.

Repository
skillsbench ↗
Licence
Apache-2.0
Last repository change
12.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 12.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

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.

Original author 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.

How it works

  1. Overview
  2. Running GLM
  3. Input File Structure
  4. Configuration File Format
  5. Modifying Parameters with Python
  6. Common Issues
  7. Best Practices
Original SKILL.md headings · 82 lines, 271 words
SKILL.md preview
---
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

Versions

RepositoryScoreLicence
This page · benchflow-ai/skillsbench100Apache-2.0
cxcscmu/SkillLearnBench100MIT
cxcscmu/SkillLearnBench95MIT

Database snapshot: 13.11.2026 · package version 2ebe7ce5eeb6 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100glm-lake-calibration
    Calibrate the General Lake Model (GLM) for lake temperature simulation. Use this skill whenever calibrating GLM parameters, running GLM simulations, or tuning Kw, coef_mix_hyp, wind_factor, lw_factor, or ch to match observed water temperature profiles. Covers Lake Mendota and similar dimictic lakes.
  • 100glm-fundamentals
    How to run the General Lake Model (GLM) for lake water temperature simulation. Use this skill whenever you need to execute GLM simulations, understand GLM configuration files (*.nml), interpret GLM output (NetCDF), or troubleshoot GLM execution. Essential for lake modeling and…
  • 100glm-calibration
    Calibrate GLM parameters for water temperature simulation. Use when you need to adjust model parameters to minimize RMSE between simulated and observed temperatures.
  • 100glm-output
    Read and process GLM output files. Use when you need to extract temperature data from NetCDF output, convert depth coordinates, or calculate RMSE against observations.
  • 100glm
    ☕️ cafe · Legacy instructions for delegating work to GLM, a sunset model that runs headless inside Claude Code. Use only when the user explicitly says "/glm", "ask glm", "have glm build/do this", "let glm", or "delegate to glm"; never invoke it automatically for frontend/UI or other work.
  • 90collaborate-with-glm-5
    Use when you work with a Z.ai GLM-5 model (GLM-5.3, GLM-5.3 Flash) as a worker or reviewer: choosing the member, deciding what to give it, briefing it and checking what it returns. Applies through any harness; to run it through Claude Code, also load `claude-code`.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.