/install glm-lake-mendota-glm-basics
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
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:
&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
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\x3C1>{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.nmlbefore modifying - Run GLM after each parameter change to verify it works
- Check
output/directory for results after each run
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install glm-lake-mendota-glm-basics - 安装完成后,直接呼叫该 Skill 的名称或使用
/glm-lake-mendota-glm-basics触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
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 pa... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 76 次。
如何安装 glm-basics?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install glm-lake-mendota-glm-basics」即可一键安装,无需额外配置。
glm-basics 是免费的吗?
是的,glm-basics 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
glm-basics 支持哪些平台?
glm-basics 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 glm-basics?
由 wu-uk(@wu-uk)开发并维护,当前版本 v0.1.0。