agentsclimarketplace

Glm calibration

Skill cxcscmu/SkillLearnBench/skills/human_authored/temperature-simulation/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.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill glm-calibration

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.5 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it

GLM Calibration Guide

Overview

GLM calibration involves adjusting physical parameters to minimize the difference between simulated and observed water temperatures. The goal is to satisfy the task's stated evaluation metrics, not just to lower a single aggregate RMSE.

Suggested Skill Flow

This skill works best after glm-basics has confirmed the file layout and editable parameters. The job of this skill is to find a candidate parameter set that passes the task metrics. Once a candidate setting appears to pass, stop calibration and hand off immediately to glm-output for the final verifier-matching metrics and /root/metrics.json.

Task Checklist

For tasks that restrict the editable parameter set and require an exact self-evaluation:

  • Only adjust the parameters explicitly allowed by the task
  • Leave protected parameters and initialization profiles unchanged
  • Stop only when every required task metric passes; do not use global RMSE alone as the stopping condition
  • If a configuration already passes every required task metric, stop the calibration search immediately
  • Do not launch a broad refinement search after finding a passing configuration
  • If the task requires /root/metrics.json, hand the final reporting step to glm-output instead of a separately improvised evaluator

Important Tips

  • In many case, the surface fit becomes acceptable before the deep water is fixed.
  • Single-knob moves can improve whole-lake RMSE while leaving the task-defining deep subsets too warm.
  • Do not optimize only the global RMSE. Recompute the full task metric set after each promising run.

Key Calibration Parameters

ParameterSectionDescriptionDefaultRange
Kw&lightLight extinction coefficient (m⁻¹)0.30.1 - 0.5
coef_mix_hyp&mixingHypolimnetic mixing coefficient0.50.3 - 0.7
wind_factor&meteorologyWind speed scaling factor1.00.7 - 1.3
lw_factor&meteorologyLongwave radiation scaling1.00.7 - 1.3
ch&meteorologySensible heat transfer coefficient0.00130.0005 - 0.002

Parameter Effects

ParameterIncrease EffectDecrease Effect
KwLess light penetration, cooler deep waterMore light penetration, warmer deep water
coef_mix_hypMore deep mixing, weaker stratificationLess mixing, stronger stratification
wind_factorMore surface mixingLess surface mixing
lw_factorMore heat inputLess heat input
chMore sensible heat exchangeLess heat exchange

Calibration with Optimization

from scipy.optimize import minimize

def objective(x):
    Kw, coef_mix_hyp, wind_factor, lw_factor, ch = x

    params = {
        'Kw': round(Kw, 4),
        'coef_mix_hyp': round(coef_mix_hyp, 4),
        'wind_factor': round(wind_factor, 4),
        'lw_factor': round(lw_factor, 4),
        'ch': round(ch, 6)
    }
    modify_nml('glm3.nml', params)
    subprocess.run(['glm'], capture_output=True)
    return calculate_task_metrics(sim_df, obs_df)['overall_rmse']

result = minimize(
    objective,
    [0.3, 0.5, 1.0, 1.0, 0.0013],
    method='Nelder-Mead',
    options={'maxiter': 150}
)

Manual Calibration Strategy

  1. Start from the provided seed and compute the exact deep-band metrics, not just overall RMSE.
  2. First test changes that improve the deep layer over the full record rather than only cooling the whole lake; Kw and coef_mix_hyp are usually the first levers to inspect.
  3. Once the annual deep metric improves, use smaller adjustments to wind_factor and lw_factor to reduce whole-lake bias without undoing the deep-water gains.
  4. Leave ch for final fine-tuning after the main structure is already close.
  5. Prefer a short hypothesis-driven search: keep candidates that improve both deep metrics together, discard one-knob moves that only make the global RMSE look better, and stop as soon as one candidate passes every required task metric.
  6. After the first passing configuration is found, rerun GLM once at that setting, switch to glm-output, write /root/metrics.json, and end the task if the exact final metrics also pass.

Common Issues

IssueLikely CauseSolution
Surface too warmLow wind mixingIncrease wind_factor
Deep water too warmToo much light penetrationIncrease Kw
Weak stratificationToo much mixingDecrease coef_mix_hyp
Overall warm biasHeat budget too highDecrease lw_factor or ch
Annual deep improves but summer deep still failsDeep water cooled too weakly during stratified monthsKeep Kw high and lower lw_factor slightly

Best Practices

  • Keep parameters within the published ranges
  • Use the deep-band metrics as the stopping condition, not surface fit alone
  • Save time by evaluating a few structured candidates instead of a long blind optimizer
  • After you find a passing parameter set, do not keep refining it blindly
  • Rerun GLM once at the chosen setting, then use glm-output to write the exact metrics file immediately
  • If glm-output confirms that the exact final metrics pass, stop there instead of reopening calibration

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.