用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cxcscmu/SkillLearnBench --skill run2-glm-error-diagnosis命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | run2_glm-error-diagnosis |
| description | Diagnosing temperature profile mismatches and simulation errors in GLM outputs |
Symptom: Simulation shows constant temperature across all depths
Causes:
Diagnosis:
import netCDF4 as nc
import numpy as np
ds = nc.Dataset(output_file, 'r')
temp_data = ds.variables['temp'][0, :, 0, 0] # First time step, first lat/lon
z_data = ds.variables['z'][0, :, 0, 0]
valid_indices = np.where(~np.isnan(temp_data))[0]
unique_temps = np.unique(temp_data[valid_indices])
print(f"Unique temperatures: {len(unique_temps)}")
print(f"All same? {len(unique_temps) == 1}")
print(f"Temperature range: {temp_data.min()}-{temp_data.max()}")
Fix: Check initialization profile in NML and verify it represents actual starting state
Symptom: RMSE constant across all depths, bias consistent (all simulated temps are X°C higher/lower)
Diagnosis:
def analyze_temperature_bias(merged_df):
"""Compute bias in simulation"""
diff = merged_df['sim_temp'] - merged_df['obs_temp']
print(f"Mean bias: {diff.mean():.2f}°C")
print(f"Std bias: {diff.std():.2f}°C")
print(f"Bias by depth:")
for depth in sorted(merged_df['depth_rounded'].unique()):
depth_data = diff[merged_df['depth_rounded'] == depth]
print(f" Depth {depth:2d}m: {depth_data.mean():+.2f}°C")
Causes:
lw_factor, sw_factor)Fix:
ch (heat loss), decrease lw_factor, or decrease Kwch, increase lw_factor, or increase KwSymptom: Mean temperature might be OK, but stratification RMSE is large
Diagnosis:
def analyze_stratification(merged_df):
"""Check if depth gradients match"""
for t in sorted(merged_df['datetime'].unique())[:5]: # Check first 5 times
at_time = merged_df[merged_df['datetime'] == t]
at_time = at_time.sort_values('depth_rounded')
print(f"\nTime {t}:")
for _, row in at_time.head(15).iterrows():
d = row['depth_rounded']
o = row['obs_temp']
s = row['sim_temp']
diff = s - o
print(f" Depth {d:2d}m: obs={o:5.1f} sim={s:5.1f} diff={diff:+.1f}")
Causes:
coef_mix_hyp wrong: Too much/little deep water mixingwind_factor wrong: Surface mixing not capturing dynamicsKw wrong: Light penetration affects density structureFix: Adjust mixing parameters based on whether deep water is too warm or too cold
Symptom: Summer RMSE >> Winter RMSE (or vice versa)
Diagnosis:
def analyze_by_season(merged_df):
"""Decompose error by season"""
merged_df['month'] = merged_df['datetime'].dt.month
for season_name, months in [('Winter', [12,1,2]), ('Spring', [3,4,5]),
('Summer', [6,7,8]), ('Fall', [9,10,11])]:
season_data = merged_df[merged_df['month'].isin(months)]
if len(season_data) > 0:
rmse = np.sqrt(np.mean((season_data['sim_temp'] - season_data['obs_temp'])**2))
bias = (season_data['sim_temp'] - season_data['obs_temp']).mean()
print(f"{season_name:6s}: RMSE={rmse:.2f}°C, bias={bias:+.2f}°C ({len(season_data)} pairs)")
Common patterns:
Kw too high (too much light) or coef_mix_hyp too low (weak mixing)Symptom: overall_rmse OK, annual_deep_rmse >> threshold
Diagnosis:
def analyze_by_depth(merged_df):
"""Decompose error by depth band"""
for depth_range in [(0, 5), (5, 10), (10, 15), (15, 20), (20, 25)]:
band_data = merged_df[(merged_df['depth_rounded'] >= depth_range[0]) &
(merged_df['depth_rounded'] < depth_range[1])]
if len(band_data) > 0:
rmse = np.sqrt(np.mean((band_data['sim_temp'] - band_data['obs_temp'])**2))
print(f"Depth {depth_range[0]:2d}-{depth_range[1]:2d}m: RMSE={rmse:.2f}°C ({len(band_data):4d} pairs)")
Causes:
coef_mix_hyp controls deep mixing: Wrong value = wrong deep stratificationKw affects light penetration to depth: Wrong value = wrong density structureFix:
coef_mix_hyp (more mixing brings cold water up)coef_mix_hyp (less mixing keeps it isolated)def check_obs_distribution(obs_df):
"""Ensure observations span full lake and season"""
print(f"Depth range: {obs_df['depth'].min()}-{obs_df['depth'].max()}m")
print(f"Time span: {obs_df['datetime'].min()} to {obs_df['datetime'].max()}")
print(f"Samples per depth:")
for depth in sorted(obs_df['depth'].unique()):
count = len(obs_df[obs_df['depth'] == depth])
print(f" {depth:5.1f}m: {count:3d} samples")
def check_sim_range(temp_data, z_data):
"""Verify simulation outputs realistic values"""
valid_temps = temp_data[~np.isnan(temp_data)]
print(f"Temperature range: {valid_temps.min():.1f} to {valid_temps.max():.1f}°C")
print(f"Mean: {valid_temps.mean():.1f}°C")
# Most lakes should be 0-30°C
if valid_temps.min() < -10 or valid_temps.max() > 40:
print("WARNING: Unrealistic temperature range!")
# Check depth range
valid_z = z_data[~np.isnan(z_data)]
print(f"Depth range: {valid_z.min():.1f} to {valid_z.max():.1f}m")
Each iteration should reduce RMSE, not increase it. If change makes things worse, revert and try different parameter.
Handles reading, populating, and saving .docx files using the python-docx library. Use this skill for any tasks involving template filling or modifying Word documents.
Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
This skill includes search capability in 13F, such as fuzzy search a fund information using possibly inaccurate name, or fuzzy search a stock cusip info using its name.
基于 SOC 职业分类