# Climate Tech

> Analyzes climate and energy data with Python ecosystem: pandas, xarray, rasterio, and emissions computation workflows. Use when working with climate data, emissions accounting or when the user mentions climate data, emissions accounting.

- Skill: `opknock/climate-tech` (Agent Skill)
- Install (CLI): `npx get-skill add opknock/climate-tech`
- Raw SKILL.md: https://api.skillmd.com/api/skills/opknock/climate-tech/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- License: MIT
- Author: OpKnock (https://skillmd.com/u/opknock)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/opknock/climate-tech

---


Analyzes climate and energy data with Python ecosystem: pandas, xarray, rasterio, and emissions computation workflows.

## Agentic Workflow: Read -> Reason -> Act (climate-tech)

You are **climate-tech** (environment) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.

### 1. Read — environment context for `climate-tech`
- Domain: Analyzes climate and energy data with Python ecosystem: pandas, xarray, rasterio, and emissions computation workflows.
- **climate-data**: Process climate and weather datasets. — `pip install pandas xarray netcdf4`
- **emissions-accounting**: Compute and report emissions metrics. — `python -c "import pandas as pd; df=pd.read_csv(\"emissions.csv\"); df[\"co2e\"]=`
- Check `knowledge` and `prerequisites: node.js, python, prometheus, grafana`

### 2. Reason — think for `climate-tech`
- For `climate-data`: Process climate and weather datasets. — decide which checks to run
- For `emissions-accounting`: Compute and report emissions metrics. — decide which checks to run
- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs

### 3. Act — execute with `climate-tech` tools
- Tools: `Glob`, `Grep`, `Read`, `Bash` (see frontmatter `tools`/`allowed-tools`)
- Use `safe_path` for any write; record evidence (paths, checksums)
- Fingerprint: `climate-tech:0d112689`

# Climate Tech

Analyze climate, weather, and energy data.

## When to Use

- Processing NetCDF/CMIP model output
- Emissions accounting and scenario analysis
- Geospatial raster analysis (land cover, solar irradiance)
- Building energy and grid data pipelines

## Commands

```bash
pip install pandas xarray netcdf4 rasterio

# Inspect a NetCDF dataset
python -c "import xarray as xr; ds=xr.open_dataset('data.nc'); print(ds)"

# Time-averaged means
python -c "import xarray as xr; print(xr.open_dataset('data.nc').mean(dim='time'))"

# Emissions aggregation
python -c "import pandas as pd; df=pd.read_csv('emissions.csv'); print(df.groupby('year').co2.sum())"

# GWP-weighted CO2e
python -c "import pandas as pd; df=pd.read_csv('emissions.csv'); df['co2e']=df.co2*df.gwp; print(df.groupby('sector').co2e.sum())"

# Raster inspection
python -c "import rasterio; print(rasterio.open('raster.tif'))"
```

## Analysis Example

```python
import xarray as xr

ds = xr.open_dataset("temp_2m.nc")
annual_mean = ds.t2m.groupby("time.year").mean()
print(annual_mean.isel(year=-1))
```

## Best Practices

- Check units and coordinate systems before arithmetic
- Use xarray for labeled N-D data, pandas for tabular
- Prefer chunked reads for large CMIP files
- Record data provenance (source, version, processing steps)
- Validate against published figures before reporting
- Pin scientific package versions for reproducibility

## Capabilities

### climate-data
Process climate and weather datasets.

**Parameters:**
- `file` (string): NetCDF, CSV, or GeoTIFF path
- `engine` (string): Backend: xarray, pandas, or rasterio

**Commands:**
- `pip install pandas xarray netcdf4`
- `python -c "import xarray as xr; ds=xr.open_dataset(\"data.nc\"); print(ds)"`
- `python -c "import pandas as pd; print(pd.read_csv(\"emissions.csv\").head())"`
- `pip install rasterio`
- `python -c "import rasterio; print(rasterio.open(\"tif/raster.tif\"))"`

**Examples:**
- python -c "import xarray as xr; print(xr.open_dataset(\"data.nc\").mean(dim=\"time\"))"
- python -c "import pandas as pd; df=pd.read_csv(\"emissions.csv\"); print(df.groupby(\"year\").co2.sum())"

### emissions-accounting
Compute and report emissions metrics.

**Parameters:**
- `dataset` (string): Emissions dataset path
- `unit` (string): Units: tCO2e, kgCO2e, or MtCO2e

**Commands:**
- `python -c "import pandas as pd; df=pd.read_csv(\"emissions.csv\"); df[\"co2e\"]=df.co2*df.gwp; print(df.groupby(\"sector\").co2e.sum())"`
- `python -m venv .venv && source .venv/bin/activate`
- `pip install openpyxl`
- `python -c "import pandas as pd; pd.DataFrame({\"x\":[1]}).to_excel(\"report.xlsx\"); print(\"ok\")"`

**Examples:**
- python -c "import pandas as pd; df=pd.read_csv(\"emissions.csv\"); print(df.pivot_table(index=\"year\", columns=\"sector\", values=\"co2e\", aggfunc=\"sum\"))"
- python -c "import pandas as pd; print(pd.read_excel(\"report.xlsx\"))"

## References
- [xarray Docs](https://docs.xarray.dev)
- [Rasterio Docs](https://rasterio.readthedocs.io)
- [IPCC GWP Values](https://www.ipcc.ch/report/ar6/wg1/)

