Skip to content
Skills Library
Data & analytics · Analysis

select

/select

Pick entries along one dimension of a weather-skills Zarr, by integer position or by coordinate value: an ensemble member, a forecast step, a date, a station. Picking one entry removes that dimension but keeps the picked label as a scalar coordinate, so outputs from different sources line up for stacking. Works on gridded and station datasets. Use to take one member, lead, date or station out of a dataset.

Licence
MIT
Last repository change
24.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
2
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 24.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 2 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/select_dim.py, tests/test_select.py

What it does and when to use it

Pick entries along one dimension of a weather-skills Zarr, by integer position or by coordinate value: an ensemble member, a forecast step, a date, a station. Picking one entry removes that dimension but keeps the picked label as a scalar coordinate, so outputs from different sources line up for stacking. Works on gridded and station datasets. Use to take one member, lead, date or station out of a dataset.

Original author description

Pick entries along one dimension of a weather-skills Zarr, by integer position or by coordinate value: an ensemble member, a forecast step, a date, a station. Picking one entry removes that dimension but keeps the picked label as a scalar coordinate, so outputs from different sources line up for stacking. Works on gridded and station datasets. Use to take one member, lead, date or station out of a dataset.

How it works

  1. Usage
Original SKILL.md headings · 39 lines, 345 words
SKILL.md preview
---
name: select
description: "Pick entries along one dimension of a weather-skills Zarr, by integer position or by coordinate value: an ensemble member, a forecast step, a date, a station. Picking one entry removes that dimension but keeps the picked label as a scalar coordinate, so outputs from different sources line up for stacking. Works on gridded and station datasets. Use to take one member, lead, date or station out of a dataset."
license: MIT
compatibility: Requires Python 3.12 and uv.
allowed-tools: Bash(uv run ${CLAUDE_SKILL_DIR}/scripts/select_dim.py *)
metadata:
  version: "0.0.5"
  catalog-group: transforms
---

# select

Keeps chosen entries along one dim and passes everything else through unchanged.

## Usage

```bash
uv run ${CLAUDE_SKILL_DIR}/scripts/select_dim.py -i IN.zarr -o OUT.zarr --dim DIM (--index N [--index N ...] | --value V [--value V ...])
```

### Arguments
- `--input`, `-i` — input Zarr, gridded or point_obs.
- `--output`, `-o` — output Zarr.
- `--dim` — the one dim to select along.
- `--index` — integer position; repeat for several. Negative counts from the end (`-1` is last).
- `--value` — coordinate value; repeat for several. Parsed by the coord's type:
  - `datetime64`: naive ISO date or datetime (`2026-10-01`, `2026-10-01T06:00`); no timezone, `now`, or `today`.
  - cftime (model calendars such as `360_day`): `YYYY-MM-DD[THH[:MM[:SS]]]` in that calendar (`2026-02-30`).
  - `timedelta64`: pandas timedelta (`7D`, `168h`).
  - numeric: int or float (`0`, `1.5`); floats match within 1e-9.
  - string: verbatim (`TA00025`).

Pass `--index` or `--value`, not both.

### Output
- One entry: the dim is removed and the selected label stays as a scalar coordinate (e.g. `time = 2026-09-28` or `step = 7 days`, plus `valid_time` when present), so verify and plot still know which date or lead it is. Other coordinates it leaves scalar are dropped. Station identity (`station_id`, `point_id`, `name`, `latitude`, `longitude`, `country`) and `aggregation_coverage` stay as scalar coords. A calendar `aggregation_period` such as `1 month` becomes the selected bin's length (`28 day` for February).
- Several entries: the dim keeps exactly those, in the order given (`--index 2 --index 0` reverses them).
- Other dims, coords, variables, and attrs are unchanged.

### Notes
- These exit 2 with no output: an unknown or repeated `--dim`; an out-of-range or repeated position (`0` and `-4` on a size-4 dim are the same); a value not on the coord (the error lists the first few); a value matching duplicate labels; `--value` on a dim with no coordinate values. Use `--index` for the last two.

### Example
```bash
uv run ${CLAUDE_SKILL_DIR}/scripts/select_dim.py -i ecmwf_weekly_kenya.zarr -o ecmwf_w1_kenya.zarr --dim step --index 0
```
Writes week-1 of the weekly forecast with no `step` dim, ready to stack with other models' week-1.
Files in this package (3)
  • SKILL.md 3 KB
  • scripts/select_dim.py 8 KB
  • tests/test_select.py 7 KB

Versions

RepositoryScoreLicence
This page · rhiza-research/weather-skills100MIT
sh5623/e2e-rail100MIT

Database snapshot: 13.11.2026 · package version c5dfc581a648 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100point-value
    Sample a gridded weather-skills Zarr (satellite, reanalysis, or forecast) at point locations and write a station Zarr with the same layout as station observations. Points come from a station Zarr, lat/lon pairs on the command line, or a CSV. Use to put a grid and station data on…
  • 100openaq-fetch
    Fetch OpenAQ air-quality station observations (daily mean PM2.5, PM10, NO2, O3, SO2, CO) for a date range and lat/lon box, as a weather-skills station Zarr. Needs a free OPENAQ_API_KEY. Use when a task needs in-situ air-quality or atmospheric-composition data, for example to…
  • 96bi-new-dimension-analysis
    识别新增维度值并评估其在北极星指标上的表现。当归因维度出现新增值(如新渠道、新品类、新功能)需要评估效果时调用。

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.