用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cxcscmu/SkillLearnBench --skill glm-simulation命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | glm-simulation |
| description | Running the General Lake Model (GLM) with configuration files and parameter calibration |
The General Lake Model (GLM) is a 1-D hydrodynamic lake model that simulates vertical water temperature and mixing. It reads configuration from a Fortran namelist file (.nml) and produces NetCDF output.
.nml)The GLM configuration file contains multiple namelist sections:
&glm_setup
sim_name = 'Lake Name'
max_layers = 500
min_layer_vol = 0.025
min_layer_thick = 0.10
max_layer_thick = 0.50
/
&light
Kw = 0.3 ! Light extinction coefficient [0.1-0.5]
/
&mixing
coef_mix_hyp = 0.5 ! Hypolimnetic mixing coefficient [0.3-0.7]
/
&meteorology
wind_factor = 1.0 ! Wind speed scaling [0.7-1.3]
lw_factor = 1.0 ! Longwave radiation scaling [0.7-1.3]
ch = 0.0013 ! Heat transfer coefficient [0.0005-0.002]
/
&time
start = '2009-01-01 12:00:00'
stop = '2015-12-30 12:00:00'
dt = 3600
/
&init_profiles
the_depths = 0, 1, 2, ...
the_temps = 5.1, 5.1, 5.1, ...
/
glm -f glm3.nml
The model reads the configuration and produces output (typically NetCDF) to the directory specified in &output.
These 5 parameters can be modified within specified ranges:
To modify a parameter in the .nml file:
import re
def update_nml_parameter(nml_file, section, param, value):
"""Update a parameter in a Fortran namelist file"""
with open(nml_file, 'r') as f:
content = f.read()
# Find the section and update the parameter
pattern = r'(&' + section + r'.*?)(\s+' + param + r'\s*=\s*)([^,\n]+)'
replacement = r'\g<1>\g<2>' + str(value)
content = re.sub(pattern, replacement, content, flags=re.DOTALL)
with open(nml_file, 'w') as f:
f.write(content)