Glm evaluator

From cxcscmu/SkillLearnBench · View interactive version

Glm evaluator is an AI agent skill from the GitHub repository cxcscmu/SkillLearnBench. A skill to process GLM NetCDF output and calculate specific RMSE metrics by merging with field observations.

How to use this skill

Skill file

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:
  1. Merge Data: For each observation point (time, depth), find the corresponding simulated temperature.
  1. Calculate RMSE:

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

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.