run2_glm-calibration
How to run and calibrate GLM3 for lake temperature simulation - includes correct parameter effects, grid search strategy, and verified working parameter ranges.
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 93
- Forks
- 7
01 前言 Front Matter
- name
- run2_glm-calibration
- description
- How to run and calibrate GLM3 for lake temperature simulation - includes correct parameter effects, grid search strategy, and verified working parameter ranges.
03 SKILL.md 正文
GLM3 Calibration Skill (Improved)
Setup
cd /root # Must run from directory containing glm3.nml
glm # Reads glm3.nml, writes to out_dir/out_fn.nc
Key Calibration Parameters
| Parameter | Section | Calibration Range | Primary Effect |
|---|---|---|---|
Kw |
&light |
[0.1, 0.5] | Light attenuation; higher = more surface heating, deeper stratification |
coef_mix_hyp |
&mixing |
[0.3, 0.7] | Hypolimnion mixing; lower = cooler deep temps |
wind_factor |
&meteorology |
[0.7, 1.3] | Wind scaling; lower = more stratification, cooler deep |
lw_factor |
&meteorology |
[0.7, 1.3] | Longwave radiation; higher = more surface heat |
ch |
&meteorology |
[0.0005, 0.002] | Sensible heat coef; minor effect |
Do NOT Change
sw_factor,cd,cethe_depths,the_temps,the_sals
Bias Diagnosis
If sim_temp > obs_temp (positive bias) in deep/summer:
- Reduce
coef_mix_hyp(less hypolimnion mixing) - Reduce
wind_factor(less surface mixing → stronger stratification) - Increase
Kw(stronger light attenuation → sharper thermocline)
Verified Working Parameters (Lake Mendota 2009-2015)
Kw = 0.3
coef_mix_hyp = 0.35
wind_factor = 0.9
lw_factor = 1.0
ch = 0.0013
Results: overall_rmse=1.37, annual_deep_rmse=1.35, summer_deep_rmse=1.47
NML Update Pattern
import re
def update_nml(filepath, params):
with open(filepath, 'r') as f:
content = f.read()
for param, value in params.items():
pattern = rf'(\b{param}\s*=\s*)[^\n]+'
replacement = rf'\g<1>{value}'
content = re.sub(pattern, replacement, content)
with open(filepath, 'w') as f:
f.write(content)
Grid Search Strategy
- Focus on
coef_mix_hypandwind_factorfirst (biggest impact on deep temps) - Try
coef_mix_hyp: [0.30, 0.35, 0.40],wind_factor: [0.80, 0.90, 1.00] - Then tune
Kw: [0.25, 0.30, 0.35] - Score = overall_rmse + annual_deep_rmse + summer_deep_rmse + penalties for violations
Key Insight
Reducing wind_factor from 1.0 to 0.9 had the largest single improvement for deep temperature accuracy on Lake Mendota. With Kw=0.3, mix_hyp=0.35, wind=0.9, all three RMSE targets were met comfortably.
04 同仓库更多 Skills
object_counter
Count occurrences of an object in the image using computer vision algorithm.
travel-planning-workflow
Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.
bundled-dataset-search-tool
invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.
glm-output
Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final /root/metrics.json.
glm-calibration
Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.
glm-basics
A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.