agentsclimarketplace

Run2 glm lake modeling

Skill cxcscmu/SkillLearnBench/skills/b2-self-feedback-claude-opus-4-6/temperature-simulation/run2_glm-lake-modeling

Complete guide to setting up, running, and configuring the General Lake Model (GLM) for 1D lake temperature simulation.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run2_glm-lake-modeling

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

SKILL.md

2.9 KB, 772 tokens by cl100k_base, as published. Nobody here has run it

General Lake Model (GLM) - Setup and Configuration

What is GLM?

GLM is a 1D hydrodynamic model that simulates vertical temperature, salinity, and density profiles in lakes and reservoirs. It solves energy and mass balance equations layer-by-layer.

Prerequisites

  • glm binary installed (check with which glm)
  • Configuration file glm3.nml in working directory
  • Meteorological forcing CSV (bcs/meteo.csv)
  • Inflow/outflow CSVs
  • Output directory must exist (mkdir -p output)

Configuration File Structure (glm3.nml)

The file uses Fortran namelist format with &section ... / blocks:

SectionKey ParametersNotes
&glm_setupmax_layers, layer thicknessLayer resolution
&lightKw (extinction coeff)Controls light penetration depth
&mixingcoef_mix_hyp, coef_mix_conv, etc.Vertical mixing strengths
&morphometryH, A arraysLake bathymetry (elevation-area)
&timestart, stop, dtSimulation period and timestep
&outputout_dir, out_fn, nsaveNetCDF output control
&init_profilesthe_depths, the_tempsInitial conditions
&meteorologywind_factor, lw_factor, ch, cd, ce, sw_factorMet scaling and bulk transfer
&inflow/&outflowinflow_fl, outflow_flHydrological boundary conditions
&sedimentsed_temp_mean, sed_heat_KsoilBottom boundary condition

Running GLM

cd /path/to/config/dir
mkdir -p output
glm   # reads glm3.nml, writes output/output.nc

GLM exits silently on success. Check for output/output.nc existence.

Output Structure (NetCDF)

  • temp[time, z] - water temperature (°C)
  • z[time, z] - height from lake bottom (m) - NOT depth from surface
  • time - time coordinate with units attribute for num2date conversion

Converting height to depth

surface_height = np.max(z[time_idx, :])
depth_from_surface = surface_height - z[time_idx, :]

Parameter Sensitivity for Lake Mendota

From calibration experiments:

  1. Kw (0.1-0.5): Most impactful. Higher values reduce deep heating, improve thermocline.
  2. wind_factor (0.7-1.3): Controls wind-driven mixing intensity. Lower = stronger stratification.
  3. lw_factor (0.7-1.3): Scales longwave radiation. Values < 1 cool the lake.
  4. coef_mix_hyp (0.3-0.7): Hypolimnetic mixing. Moderate values (0.4-0.5) balance deep temperature.
  5. ch (0.0005-0.002): Sensible heat transfer. Lower = less surface heat exchange.

Common Pitfalls

  • Forgetting to create output directory before running
  • Not preserving the exact nml format when editing (Fortran is picky)
  • Confusing z (height from bottom) with depth from surface
  • The ch parameter regex can match catchrain if not careful - use \bch\s*= or match line context

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.