Glm Calibration

Calibrating the General Lake Model (GLM) by modifying parameter bounds for lake simulation.

cxcscmu Updated

File contents

glm-calibration

This skill involves adjusting physical coefficients such as Kw, wind_factor, and sensible heat flux in a model configuration file (e.g., glm3.nml) to optimize the root mean square error (RMSE) against observations.

Example Pattern

import f90nml
import subprocess

def run_simulation(params):
    # Load default settings
    nml = f90nml.read('glm3.nml')

    # Assign new parameters
    nml['light']['Kw'] = params['Kw']
    nml['meteorology']['wind_factor'] = params['wind_factor']

    # Overwrite configuration
    nml.write('glm3_new.nml', force=True)
    
    # Run GLM executable with new parameters
    subprocess.run(['glm', '--nml', 'glm3_new.nml'])

cxcscmu/SkillLearnBench commit 7711b12ba3

Frequently asked questions

npx get-skill add cxcscmu/glm-calibration-3