Glm lake mendota

From XuShuwenn/RedAct · View interactive version

Glm lake mendota is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Run General Lake Model (GLM) to simulate vertical water temperature with RMSE < 2 degrees Celsius against observations.

How to use this skill

Skill file

General Lake Model (GLM) Simulation

When to Use

Required Execution Protocol

Input Files

Use these exact absolute paths consistently in every command and script. Do not switch to relative paths like output/output.nc, glm3.nml, or field_temp_oxy.csv when the task specifies /root/... locations.

Output

Key Steps

  1. Load forcing data from /root/bcs/
  2. Load field observations from CSV
  3. Configure GLM parameters in glm3.nml
  4. Run simulation
  5. Calculate RMSE against observations
  6. Adjust parameters if RMSE > 2°C
  1. Inspect glm3.nml and output.nc metadata before scoring so your RMSE method matches the real variable names, time units/origin, depth structure, and simulation period.

7a. Build one reusable deterministic evaluation script or command sequence early, then use that same scoring pipeline for the baseline and every calibration trial.

7b. Inspect /root/field_temp_oxy.csv header and sample rows early, then compute RMSE by aligning simulation and observations on shared datetime and depth bins: read the real NetCDF time units/origin and variable names, convert GLM layer structure into physical depths comparable to the observations, standardize depths only to the observation resolution if needed, handle duplicate time-depth pairs consistently, and score only matched pairs rather than index-aligned arrays.

7c. Do this before trusting any custom RMSE script: do not hard-code start dates, lake depth, array indexing, or assumed coordinate names without confirming them from the actual files.

  1. Start with a baseline run and baseline RMSE before changing parameters.
  2. After the first successful baseline run, keep that run and its RMSE as the calibration baseline; if the baseline RMSE is already close to 2°C, inspect signed bias or residual structure by depth/time so you can choose the next parameter change direction.
  3. If the baseline RMSE misses the target, convert diagnosis into at least one concrete calibration trial: make a small number of confirmed parameter edits in /root/glm3.nml, rerun GLM, and recompute RMSE from the new /root/output/output.nc; do not treat analysis alone as progress.
  4. For each calibration trial, restore a known-good baseline glm3.nml, apply only that trial's edits, reread or diff the file to confirm the intended parameter change persisted, run GLM, confirm fresh readable /root/output/output.nc, and compare the new RMSE against the previous best.
  5. Prefer one-parameter or small bounded trials before broad optimization, especially when the baseline RMSE is already close to 2°C; start with physically meaningful high-impact parameters such as light extinction, mixing, wind, or modest sw_factor/lw_factor adjustments if present.
  6. Before any automated search or expensive optimization, validate one complete edit -> run -> verify -> score cycle: confirm the target parameter exists, make one small edit, rerun GLM once, confirm readable fresh /root/output/output.nc, and recompute RMSE with the same evaluator.
  7. If a run stops early or /root/output/output.nc does not span 2009-01-01 to 2015-12-30, check both the configured start/stop times in glm3.nml and the actual date ranges in the forcing files under /root/bcs/ before recalibrating.
  8. After every run, verify the command exited successfully, /root/output/output.nc was regenerated and is readable, and the output covers 2009-01-01 to 2015-12-30 before using the RMSE.
  9. Treat the task as complete only after a fresh final run with the saved best configuration, /root/glm3.nml left in that final best reproducible state, and an explicitly recomputed RMSE < 2°C if claiming the target is met.
  1. When a trial improves RMSE, write the winning values back into /root/glm3.nml, rerun GLM from that saved file, and recompute RMSE from the fresh output before claiming success.
  2. If you expect to test more than a couple of parameter sets, script the full loop (edit glm3.nml -> run GLM -> recompute RMSE -> record result) so trials are reproducible and the final saved configuration matches the best-scoring run; see RMSE alignment and bounded calibration.

Calibration Guardrails

Calibration Guardrails

Tips

Execution and Verification

Execution and Verification

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.