← 返回
未分类 中文

glm-calibration

Calibrate GLM parameters for water temperature simulation. Use when you need to adjust model parameters to minimize RMSE between simulated and observed tempe...
对水温模拟的GLM参数进行校准。适用于需要调整模型参数以最小化模拟与观测温度之间RMSE的情况。
wu-uk wu-uk 来源
未分类 clawhub v0.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 305
下载
💾 0
安装
1
版本
#latest

概述

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

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-07 22:20 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Tavily 搜索

jacky1n7
通过 Tavily API 进行网页搜索(Brave 替代方案)。当用户要求搜索网页、查找来源或链接,且 Brave 网页搜索不可用时使用。
★ 276 📥 101,379
data-analysis

AdMapix

fly0pants
AdMapix 原始数据层,提供广告创意、应用、排名、下载/收入及市场元数据。返回 AdMapix API 的结构化 JSON;调用方...
★ 297 📥 142,705
office-efficiency

pdf

wu-uk
全面PDF工具,支持文本/表格提取、新PDF创建、合并/拆分文档、表单处理。当Claude需要...
★ 0 📥 756