[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KHFAAEC9C6D8M3H8PR7WTH":3,"skill-same:01M6KHFAAEC9C6D8M3H8PR7WTH":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":42,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M6KHFAAEC9C6D8M3H8PR7WTH","glm_output_parsing",null,"Use this skill to correctly parse GLM NetCDF output (output.nc) into a DataFrame of (datetime, depth, temperature) triples. Handles the 4D variable shape (ntime, nlayer, 1, 1), correct depth conversion using fixed lake_depth from glm3.nml, and datetime reconstruction using manual timedelta from a fixed reference date.","cxcscmu\u002FSkillLearnBench","cxcscmu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142838272?v=4","01M6KCQDFQWPDSN0MKZY96MSQP","01M6KCQDM7G70TKJ28NTSQC0RZ",93,"MIT","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fb3-teacher-feedback-claude-sonnet-4-6\u002Ftemperature-simulation\u002Frun2_glm_output_parsing\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31],"parsing","glm","output","glm output parsing","dataframe","correct","use","shape","conversion","reference","datetime","temperature","manual","netcdf","2026-11-10 10:12:30",false,"---\nname: glm_output_parsing\ndescription: Use this skill to correctly parse GLM NetCDF output (output.nc) into a DataFrame of (datetime, depth, temperature) triples. Handles the 4D variable shape (ntime, nlayer, 1, 1), correct depth conversion using fixed lake_depth from glm3.nml, and datetime reconstruction using manual timedelta from a fixed reference date.\n---\n\n# GLM Output Parsing\n\n## Key Facts About GLM NetCDF Output\n- Variables `z` and `temp` have shape `(n_times, n_layers, 1, 1)` — always index with `[:, :, 0, 0]`\n- `z` contains layer *elevations* (meters above lake bottom), not depths\n- Depth = `lake_depth - z_elevation` where `lake_depth` is the **fixed** constant from `glm3.nml`\n- Time is stored as hours since simulation start; use manual timedelta, not `num2date`, to avoid cftime\u002Ftimezone issues\n- Layers may have NaN\u002Ffill values — filter those out\n\n## Parsing Function\n\n```python\nimport netCDF4 as nc\nimport numpy as np\nimport pandas as pd\nfrom datetime import datetime, timedelta\n\ndef parse_glm_output(nc_path='\u002Froot\u002Foutput\u002Foutput.nc', lake_depth=25.0):\n    \"\"\"\n    Parse GLM NetCDF output into a DataFrame.\n    \n    Parameters\n    ----------\n    nc_path : str\n        Path to output.nc\n    lake_depth : float\n        Fixed maximum lake depth from glm3.nml (e.g., from get_lake_depth_from_nml)\n    \n    Returns\n    -------\n    pd.DataFrame with columns: datetime, depth, sim_temp\n    \"\"\"\n    ds = nc.Dataset(nc_path, 'r')\n    \n    # Time: hours since start — reconstruct manually\n    time_var = ds.variables['time']\n    time_vals = time_var[:]  # shape (n_times,)\n    \n    # Parse units string: \"hours since YYYY-MM-DD HH:MM:SS\"\n    units_str = time_var.units  # e.g., \"hours since 2009-01-01 00:00:00\"\n    # Extract reference date from units\n    parts = units_str.split('since')\n    ref_str = parts[1].strip().split('.')[0].strip()\n    # Try multiple formats\n    for fmt in ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d']:\n        try:\n            ref_date = datetime.strptime(ref_str, fmt)\n            break\n        except ValueError:\n            continue\n    \n    # z and temp: shape (n_times, n_layers, 1, 1)\n    z_all = ds.variables['z'][:]        # elevations above bottom\n    temp_all = ds.variables['temp'][:]  # temperatures\n    \n    ds.close()\n    \n    n_times = len(time_vals)\n    records = []\n    \n    for t_idx in range(n_times):\n        # Reconstruct datetime\n        dt = ref_date + timedelta(hours=float(time_vals[t_idx]))\n        \n        # Extract layer values for this timestep — shape (n_layers,)\n        z_layers = z_all[t_idx, :, 0, 0]\n        temp_layers = temp_all[t_idx, :, 0, 0]\n        \n        for i in range(len(z_layers)):\n            z_val = float(z_layers[i])\n            t_val = float(temp_layers[i])\n            \n            # Skip fill\u002FNaN values\n            if np.isnan(z_val) or np.isnan(t_val):\n                continue\n            if z_val \u003C -1e10 or t_val \u003C -1e10:\n                continue\n            \n            # Convert elevation to depth\n            depth = lake_depth - z_val\n            if depth \u003C 0:\n                depth = 0.0\n            \n            records.append({\n                'datetime': dt,\n                'depth': depth,\n                'sim_temp': t_val\n            })\n    \n    df = pd.DataFrame(records)\n    return df\n```\n\n## Usage Example\n\n```python\nfrom glm_lake_mendota_setup import get_lake_depth_from_nml\n\nlake_depth = get_lake_depth_from_nml('\u002Froot\u002Fglm3.nml')\nsim_df = parse_glm_output('\u002Froot\u002Foutput\u002Foutput.nc', lake_depth=lake_depth)\nprint(sim_df.head())\nprint(f\"Depth range: {sim_df['depth'].min():.1f} – {sim_df['depth'].max():.1f} m\")\nprint(f\"Time range: {sim_df['datetime'].min()} – {sim_df['datetime'].max()}\")\n```","# GLM Output Parsing\n\n## Key Facts About GLM NetCDF Output\n- Variables `z` and `temp` have shape `(n_times, n_layers, 1, 1)` — always index with `[:, :, 0, 0]`\n- `z` contains layer *elevations* (meters above lake bottom), not depths\n- Depth = `lake_depth - z_elevation` where `lake_depth` is the **fixed** constant from `glm3.nml`\n- Time is stored as hours since simulation start; use manual timedelta, not `num2date`, to avoid cftime\u002Ftimezone issues\n- Layers may have NaN\u002Ffill values — filter those out\n\n## Parsing Function\n\n```python\nimport netCDF4 as nc\nimport numpy as np\nimport pandas as pd\nfrom datetime import datetime, timedelta\n\ndef parse_glm_output(nc_path='\u002Froot\u002Foutput\u002Foutput.nc', lake_depth=25.0):\n    \"\"\"\n    Parse GLM NetCDF output into a DataFrame.\n    \n    Parameters\n    ----------\n    nc_path : str\n        Path to output.nc\n    lake_depth : float\n        Fixed maximum lake depth from glm3.nml (e.g., from get_lake_depth_from_nml)\n    \n    Returns\n    -------\n    pd.DataFrame with columns: datetime, depth, sim_temp\n    \"\"\"\n    ds = nc.Dataset(nc_path, 'r')\n    \n    # Time: hours since start — reconstruct manually\n    time_var = ds.variables['time']\n    time_vals = time_var[:]  # shape (n_times,)\n    \n    # Parse units string: \"hours since YYYY-MM-DD HH:MM:SS\"\n    units_str = time_var.units  # e.g., \"hours since 2009-01-01 00:00:00\"\n    # Extract reference date from units\n    parts = units_str.split('since')\n    ref_str = parts[1].strip().split('.')[0].strip()\n    # Try multiple formats\n    for fmt in ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d']:\n        try:\n            ref_date = datetime.strptime(ref_str, fmt)\n            break\n        except ValueError:\n            continue\n    \n    # z and temp: shape (n_times, n_layers, 1, 1)\n    z_all = ds.variables['z'][:]        # elevations above bottom\n    temp_all = ds.variables['temp'][:]  # temperatures\n    \n    ds.close()\n    \n    n_times = len(time_vals)\n    records = []\n    \n    for t_idx in range(n_times):\n        # Reconstruct datetime\n        dt = ref_date + timedelta(hours=float(time_vals[t_idx]))\n        \n        # Extract layer values for this timestep — shape (n_layers,)\n        z_layers = z_all[t_idx, :, 0, 0]\n        temp_layers = temp_all[t_idx, :, 0, 0]\n        \n        for i in range(len(z_layers)):\n            z_val = float(z_layers[i])\n            t_val = float(temp_layers[i])\n            \n            # Skip fill\u002FNaN values\n            if np.isnan(z_val) or np.isnan(t_val):\n                continue\n            if z_val \u003C -1e10 or t_val \u003C -1e10:\n                continue\n            \n            # Convert elevation to depth\n            depth = lake_depth - z_val\n            if depth \u003C 0:\n                depth = 0.0\n            \n            records.append({\n                'datetime': dt,\n                'depth': depth,\n                'sim_temp': t_val\n            })\n    \n    df = pd.DataFrame(records)\n    return df\n```\n\n## Usage Example\n\n```python\nfrom glm_lake_mendota_setup import get_lake_depth_from_nml\n\nlake_depth = get_lake_depth_from_nml('\u002Froot\u002Fglm3.nml')\nsim_df = parse_glm_output('\u002Froot\u002Foutput\u002Foutput.nc', lake_depth=lake_depth)\nprint(sim_df.head())\nprint(f\"Depth range: {sim_df['depth'].min():.1f} – {sim_df['depth'].max():.1f} m\")\nprint(f\"Time range: {sim_df['datetime'].min()} – {sim_df['datetime'].max()}\")\n```",{"name":5,"description":7},"main","726e1f79b96b0cb3d729d0e55a1c847e0b5353ae","skills\u002Fb3-teacher-feedback-claude-sonnet-4-6\u002Ftemperature-simulation\u002Frun2_glm_output_parsing",8,"https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench","https:\u002F\u002Fcxcscmu.github.io\u002FSkillLearnBench","https:\u002F\u002Fgithub.com\u002Fcxcscmu","2026-10-02 22:55:36",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add cxcscmu\u002FSkillLearnBench --skill glm_output_parsing",{"tool":51,"command":52},"bunx","bunx skills add cxcscmu\u002FSkillLearnBench --skill glm_output_parsing",{"tool":54,"command":55},"pnpm","pnpm dlx skills add cxcscmu\u002FSkillLearnBench --skill glm_output_parsing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fb3-teacher-feedback-claude-sonnet-4-6\u002Ftemperature-simulation\u002Frun2_glm_output_parsing\u002FSKILL.md",true,[],[60,73,95,113,131,142],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":32},"01M6KM5KH175P5ABP5JMX2SBDQ","object_counter","Count occurrences of an object in the image using computer vision algorithm.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Fvideo-object-counting\u002Fobject_counter\u002FSKILL.md",[],[67,68,69,70,71,72],"object counter","object","vision","computer","Computer Vision","image",{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":32},"01M6KM51TMVXG79MMPCS6Y8G86","travel-planning-workflow","Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftravel-planning\u002Ftravel-planning-workflow\u002FSKILL.md",[],[80,81,82,83,84,85,86,87,88,89,90,91,92,93,94],"workflow","planning","planning workflow","travel","travel planning","travel planning workflow","structured","performing","plan","for","user","it","requirements","essential","itineraries",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":32},"01M6KM4DY820XHS9YTSK5QP5HD","bundled-dataset-search-tool","invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftravel-planning\u002Fbundled-dataset-search-tool\u002FSKILL.md",[],[102,103,104,105,106,107,108,83,109,110,84,111,89,112,81],"search","tool","dataset","bundled dataset search tool","restaurants","Tools","up","look","flights","you","database",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":32},"01M6KM465BB9PQ0B548HQSVAWZ","glm-output","Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final \u002Froot\u002Fmetrics.json.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-output\u002FSKILL.md",[],[120,20,19,89,121,122,123,124,125,126,127,128,111,129,130],"glm output","tasks","metrics","json","basics","guidance","matching","verifier","processing","root","calibration",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":32},"01M6KM40KY3QWDW5W97S39R2BC","glm-calibration","Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-calibration\u002FSKILL.md",[],[138,130,19,20,125,124,121,139,140,89,141],"glm calibration","setup","companion","metric",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":32},"01M6KM3VHHVSGMGHJQB3PPT6YG","glm-basics","A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-basics\u002FSKILL.md",[],[149,19,124,150,138,130,89,20,151,152,153,24,154,155,121],"glm basics","inspect","relevant","files","good","how","Evaluation"]