agentsclimarketplace

Glm evaluator

Skill cxcscmu/SkillLearnBench/skills/b1-one-shot-gemini-3-flash-preview/temperature-simulation/glm-evaluator

A skill to process GLM NetCDF output and calculate specific RMSE metrics by merging with field observations.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill glm-evaluator

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

SKILL.md

1.9 KB, 448 tokens by cl100k_base, as published. Nobody here has run it

GLM Evaluator

Overview

Evaluating GLM requires comparing simulated temperature profiles with field observations. The comparison must be done at the same datetime and depth.

Key Steps

  1. Read Observations: Load observation data (e.g., from field_temp_oxy.csv). Convert timestamps to datetime and round depths if required.
  2. Read GLM Output: Use netCDF4 to read output.nc.
  3. Extract Data:
    • time: Simulation time steps.
    • z: Vertical coordinates of layers (usually variable over time).
    • temp: Temperature in each layer.
  4. Merge Data: For each observation point (time, depth), find the corresponding simulated temperature.
    • Rounding: The task requires matching by rounded depth.
  5. Calculate RMSE:
    • RMSE = sqrt(mean((obs - sim)^2))

Python Example (NetCDF to DataFrame)

import pandas as pd
import numpy as np
from netCDF4 import Dataset

def get_simulated_temp(nc_path, obs_df):
    nc = Dataset(nc_path)
    time = nc.variables['time'][:]
    # time units like "hours since 2009-01-01 00:00:00"
    base_time = pd.to_datetime("2009-01-01 00:00:00")
    sim_times = base_time + pd.to_timedelta(time, unit='H')
    
    # temp is usually [time, depth]
    # z is usually [time, depth]
    # ... extraction logic ...

Considerations

  • Depth Matching: GLM uses a lagrangian layer approach, meaning layer thicknesses can change. To get temperature at a specific depth, find the layer that contains that depth or use the layer closest to the target depth.
  • RMSE Filters: Apply seasonal (e.g., summer months June-Sept) or depth-based filters (e.g., depth >= 13m) before calculation.
  • Reporting: Export final metrics to a JSON file as required by the task.

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.