Run2 glm evaluation
Robust GLM evaluation methods for deep and summer water temperatures.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill run2_glm-evaluationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.9 KB, 475 tokens by cl100k_base, as published. Nobody here has run it
Robust GLM Output Evaluation
Evaluation must precisely match observation times and rounded depths.
Depth Handling in GLM Output
In GLM, layers are defined by their height z from the bottom. To find the temperature at a specific depth from the surface:
- Surface Height: $H_{surface}(t) = z(t, \text{num_layers}-1)$
- Layer Depths: $D_{i}(t) = H_{surface}(t) - z_{i}(t)$
- Interpolation: Since GLM uses discrete layers, linear interpolation at the target depth $d$ within the $(D_i, T_i)$ profile provides a more accurate value than choosing the nearest layer.
RMSE Calculation Requirements
According to task rules:
- Overall RMSE: Filter for available pairs across all times and depths.
- Annual Deep RMSE: Filter for rounded depths $\ge 13$ m.
- Summer Deep RMSE: Filter for months June (6) to September (9) AND rounded depths $\ge 13$ m.
Example Python snippets using netCDF4 and pandas:
import netCDF4
import pandas as pd
import numpy as np
def get_sim_temp_profile(nc_vars, time_idx):
num_layers = int(nc_vars['NS'][time_idx])
z = nc_vars['z'][time_idx, :num_layers]
temp = nc_vars['temp'][time_idx, :num_layers]
# Ensure 1D arrays and handle masking
if hasattr(z, 'compressed'): z = z.compressed()
if hasattr(temp, 'compressed'): temp = temp.compressed()
surface_height = z[-1]
depths = surface_height - z
return depths, temp
def match_obs_sim(obs_csv, nc_path):
# Load and preprocess
obs = pd.read_csv(obs_csv)
obs['datetime'] = pd.to_datetime(obs['datetime']).dt.strftime('%Y-%m-%d %H:%M:%S')
obs['rounded_depth'] = obs['depth'].round().astype(int)
# ... logic to apply interpolation for each observation row ...
Avoid nearest-time matching or alternative depth binning.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.