hydrocraft-glm-lake

Automates GLM lake and reservoir thermodynamics simulation from forcing data to validated output.

155|6|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/lzwei196/KISS-Knowledge-Infrastructure-for-Scientific-Simulation --skill hydrocraft-glm-lake-lzwei196
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hydrocraft-glm-lake
Source: https://github.com/lzwei196/KISS-Knowledge-Infrastructure-for-Scientific-Simulation/tree/main/models/GLM
Command: npx skills add https://github.com/lzwei196/KISS-Knowledge-Infrastructure-for-Scientific-Simulation --skill hydrocraft-glm-lake-lzwei196

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires netCDF4, numpy, pandas, xarray, geopandas, shapely, matplotlib, and includes scripts (resource) and references (resource) components.

What problem does it solve? Running the GLM (General Lake Model) for a lake or reservoir requires scattered operational expertise: converting meteorological forcing into GLM's strict CSV units (m/day rain, percent humidity), building depth-area morphometry, writing Fortran namelists, and diagnosing silent failures like a disabled ice model. This Skill packages that expertise into a validated 11-stage Python pipeline so an agent can run GLM v3.3.3 with AED2 water quality on any lake without manual data preparation. ## Core Features & Use Cases - End-to-end pipeline: 17 tools covering lake identification in HydroLAKES, morphometry construction, CMFD/MSWX/VIC forcing conversion, inflow/outflow setup, namelist generation, AED2 water quality configuration, execution, output parsing, calibration, and coupling to CaMa-Flood. - Diagnostic recovery: 30+ diagnostic triplets map symptoms to root causes and remedies, including silent unit errors (rain in mm/day vs m/day) and the undocumented dt_iceon_avg parameter required for ice simulation. - Validated results: Production-validated on Miyun Reservoir (2001-2010) and Lake Catoma with documented NSE, RMSE, and KGE metrics against published and observed data. - Use Case: Ask the agent to simulate thermal stratification and ice cover for a reservoir using CMFD forcing; it builds morphometry, converts forcing, generates glm3.nml, runs the GLM binary, and returns temperature heatmaps and validation metrics. ## Quick Start Run python preflight_check.py in this directory, then ask the agent to simulate your target lake by providing its name or coordinates, simulation period, and forcing dataset.

Frequently Asked Questions about hydrocraft-glm-lake

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a GLM lake simulation with CMFD forcing?

Build morphometry with build_morphometry.py, convert CMFD forcing with convert_met_to_glm.py, generate initial profiles and glm3.nml, then execute run_glm.py. The pipeline handles unit conversions like mm/3hr precipitation to m/day automatically.

What meteorological units does GLM require in its forcing CSV?

GLM expects rain and snow in meters per day, relative humidity as 0-100 percent, shortwave and longwave radiation in W/m2, air temperature in degrees C, and wind speed in m/s. Passing mm/day rain or 0-1 humidity fractions causes silent 1000x or 100x errors.

Why does my GLM simulation never form ice despite freezing air temperatures?

The ice model is silently disabled without dt_iceon_avg and min_ice_thickness in the &snowice namelist block. Set dt_iceon_avg = 0.02 days and min_ice_thickness = 0.001 m; values above 0.04 days disable ice again on deep reservoirs.

Does GLM support water quality simulation with AED2?

Yes, GLM couples with AED2 for dissolved oxygen, nitrogen, phosphorus, organic matter, silica, carbon, phytoplankton, and zooplankton. Use generate_aed_config.py to build aed2.nml and configure_inflow_wq.py to add nutrient loading to inflow files.

Can GLM output feed back into CaMa-Flood river routing?

Yes, the glm_to_cama_outflow.py tool converts GLM outflow discharge and temperature into CaMa-Flood lateral inflow at the downstream grid cell. Inflow in the other direction comes from CaMa-Flood or VIC discharge via convert_inflow_to_glm.py.

What are the limitations of this GLM knowledge infrastructure?

It handles single lakes only, not multi-lake chains, and lacks tools for bubble plumes, SWAT+ nutrient coupling, and CMIP6 climate scenarios. AED2 water quality calibration against observations is also not yet automated.