It adjusts General Lake Model parameters to reduce simulation errors against observed water temperature data.

Install

mkdir -p .claude/skills/glm-calibration && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2582" && unzip -o skill.zip -d .claude/skills/glm-calibration && rm skill.zip

Installs to .claude/skills/glm-calibration

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Calibrate GLM parameters for water temperature simulation. Use when you need to adjust model parameters to minimize RMSE between simulated and observed temperatures.
165 chars✓ has a “when” trigger
Advanced

Key capabilities

  • Adjust light extinction coefficients
  • Modify hypolimnetic mixing coefficients
  • Scale wind and radiation factors
  • Calculate RMSE for model fit
  • Automate parameter optimization

How it works

The skill uses an optimization loop to iteratively modify GLM input parameters and minimize the difference between simulated and observed water temperatures.

Inputs & outputs

You give it
GLM configuration file and observed data
You get back
Optimized parameter set and RMSE value

When to use glm-calibration

  • Tuning GLM model parameters
  • Reducing RMSE in temperature simulations
  • Analyzing model fit against observed water data
  • Optimizing water quality model accuracy

About this skill

GLM Calibration Guide

Overview

GLM calibration involves adjusting physical parameters to minimize the difference between simulated and observed water temperatures. The goal is typically to achieve RMSE < 2.0°C.

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

    # Modify parameters
    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)

    # Run GLM
    subprocess.run(['glm'], capture_output=True)

    # Calculate RMSE
    rmse = calculate_rmse(sim_df, obs_df)
    return rmse

# Initial values (defaults)
x0 = [0.3, 0.5, 1.0, 1.0, 0.0013]

# Run optimization
result = minimize(
    objective,
    x0,
    method='Nelder-Mead',
    options={'maxiter': 150}
)

Manual Calibration Strategy

  1. Start with default parameters, run GLM, calculate RMSE
  2. Adjust one parameter at a time
  3. If surface too warm → increase wind_factor
  4. If deep water too warm → increase Kw
  5. If stratification too weak → decrease coef_mix_hyp
  6. Iterate until RMSE < 2.0°C

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

Best Practices

  • Change one parameter at a time when manually calibrating
  • Keep parameters within physical ranges
  • Use optimization for fine-tuning after manual adjustment
  • Target RMSE < 2.0°C for good calibration

When not to use it

  • When the model is already calibrated within target RMSE
  • When input data is insufficient for meaningful validation

Prerequisites

GLM model executablePython with scipy.optimizeObserved water temperature dataset

Limitations

  • Optimization is computationally intensive
  • Requires accurate observed data for valid calibration

How it compares

It replaces manual trial-and-error parameter tuning with a systematic, automated optimization process.

Compared to similar skills

glm-calibration side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
glm-calibration (this skill)26moReviewAdvanced
quant-analyst1032moNo flagsAdvanced
umap-learn62moReviewIntermediate
embedding-strategies82moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

quant-analyst

zenobi-us

Expert quantitative analyst specializing in financial modeling, algorithmic trading, and risk analytics. Masters statistical methods, derivatives pricing, and high-frequency trading with focus on mathematical rigor, performance optimization, and profitable strategy development.

103355

umap-learn

K-Dense-AI

UMAP dimensionality reduction. Fast nonlinear manifold learning for 2D/3D visualization, clustering preprocessing (HDBSCAN), supervised/parametric UMAP, for high-dimensional data.

6100

embedding-strategies

wshobson

Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.

890

building-automl-pipelines

jeremylongshore

Build automated machine learning pipelines, including feature engineering, model selection, and performance evaluation.

688

model-compare

rawwerks

Compare 3D CAD models using boolean operations (IoU, Dice, precision/recall). Use when evaluating generated models against gold references, diffing CAD revisions, or computing similarity metrics for ML training. Triggers on: model diff, compare models, IoU, intersection over union, model similarity, CAD comparison, STEP diff, 3D evaluation, gold reference, generated model, precision recall 3D.

783

matchms

davila7

Mass spectrometry analysis. Process mzML/MGF/MSP, spectral similarity (cosine, modified cosine), metadata harmonization, compound ID, for metabolomics and MS data processing.

674

Search skills

Search the agent skills registry