weather-model-data-fetching
できること
このツールは、複雑な気象モデルから天気予報データをダウンロードします。ファイル全体をダウンロードするのではなく、ファイルの必要な部分だけを取得するため、効率的に動作します。
使う場面
- ✓GFSやHRRRなどのモデルから特定のデータが必要なとき。
- ✓データが大きすぎて一度に扱えない予報データをダウンロードするとき。
- ✓以前のダウンロードが失敗した、中断された、または遅すぎたとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/weather-model-data-fetching/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“2023年4月12日00Zの HRRR モデルの気圧データを、予報時間+3でダウンロードしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
ツールはまず、必要なデータが何で、どこにあるのかを確認します。その後、「アドレッシング」と呼ばれる仕組みを使って、データファイルのうち必要な部分だけを要求し、必要なものだけをダウンロードして保存します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Weather Model Data Fetching
Overview
Fetch numerical weather prediction data without treating a multi-gigabyte GRIB2 file as one indivisible download. Prefer an existing project adapter or Herbie; use direct object-store byte ranges only when the supported path cannot express the request.
This skill covers transport, inventory selection, caching, and verification. It does not interpret the forecast or decide whether a model is meteorologically appropriate.
When to Use This Skill
- A task needs GFS, GEFS, HRRR, RAP, NAM, IFS, or similar model output.
- Data lives in a public AWS S3 bucket, NOMADS, or a public cloud mirror.
- The input is GRIB2 and only selected variables or levels are needed.
- A point, sounding, time series, map, or batch job needs a reliable fetch path.
- A download is missing, partial, unexpectedly large, slow, or hard to resume.
Do not activate this skill for ordinary weather-forecast questions that do not require model files.
Define the Request First
Resolve these values before downloading:
- model and product;
- initialization cycle in UTC;
- forecast hour and therefore valid time (
valid = initialization + lead); - ensemble member when applicable;
- variables, vertical levels, and surface fields;
- point, region, or full-grid output;
- cache location and when the downloaded data may be deleted.
Confirm that the cycle is complete, the forecast hour exists for that cycle,
and the requested location is inside the model domain. A recent 404 often
means the cycle is not published yet; step back to a completed cycle instead of
retrying indefinitely.
Choose the Smallest Retrieval Route
- Reuse the project's existing fetch/cache abstraction when it already handles the model.
- Use Herbie for a supported GRIB2 model. It discovers AWS, NOMADS, Google, Azure, and other configured sources and understands their key layouts.
- Use a provider-native point or Zarr endpoint when the task needs a tiny spatial slice from many times or members.
- Use direct S3 or HTTPS object access when the key is known and no suitable adapter exists.
Do not recursively list a large public bucket to discover one run. Build the documented prefix for the model, cycle, product, forecast hour, and member, then probe that exact object and its inventory.
Use an explicit provider priority and record the provider that succeeded. A fallback must refer to the same model run, product, member, and forecast hour; never silently substitute a different forecast.
Subset GRIB2 by Inventory
GRIB2 files contain consecutive messages. A companion inventory such as
.idx, .grib2.idx, or .grb2.inv records each message's starting byte.
- Fetch the small inventory first.
- Inspect its actual rows before writing a regex.
- Select exact variables, levels, and forecast-step records.
- Set each selected message's end byte to one less than the next message's start; request the final selected message through EOF when no end is known.
- Coalesce adjacent selected messages into one range.
- Issue one
Range: bytes=START-ENDrequest per range. S3 does not support multiple ranges in oneGetObjectrequest. - Require
206 Partial Contentand a matchingContent-Range. If a server answers200, do not append the whole object as though it were a fragment. - Pin the object's length and identity (
ETagand/orLast-Modified) while downloading. Discard fragments if the object changes. - Assemble into a temporary file, verify it with a GRIB decoder, then rename atomically into the cache.
A GRIB message contains one field over its grid. Message-range subsetting saves variables and levels, not geography. A point request still downloads the full grid for every selected message unless the provider offers a point, regional, Zarr, or other chunked endpoint.
Herbie Example
Use the current search argument; searchString is deprecated. Start from the
inventory, fail on an empty match, and keep the download directory explicit.
from pathlib import Path
from herbie import Herbie
PRESSURE_FIELDS = (
r":(?:HGT|TMP|RH|SPFH|UGRD|VGRD):\d+(?:\.\d+)? mb:"
)
def fetch_hrrr_pressure_run(initialization, forecast_hour, cache_dir):
cache_dir = Path(cache_dir)
h = Herbie(
initialization,
model="hrrr",
product="prs",
fxx=forecast_hour,
priority=["aws", "nomads", "google", "azure"],
save_dir=cache_dir,
verbose=False,
…
よくある質問
「数値天気予報データ」とは何ですか?
コンピュータが大気の動きをシミュレーションして天気を予測することで生成される、詳細な情報のことです。気象予報士はこのデータをもとに予報を作成します。
なぜファイルの「一部」だけをダウンロードするのですか?
気象予報のファイルは非常に大きく(数ギガバイトになることもあります)、必要な部分だけをダウンロードすることで、時間、通信量、保存容量を節約できます。
GRIB2とは何ですか?
気象データの保存によく使われるファイル形式です。効率的ですが、専用のツールなしで扱うのは複雑な場合があります。
詳細
作者による元の説明
Retrieve numerical weather prediction data from public AWS S3 and HTTP archives using GRIB2 inventories, byte ranges, Herbie, provider fallbacks, and verified caching.
人気
- GitHubのスター
- 48k
- ランキング
- #6146
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
tavily
394kTavilyでウェブを検索し、特定のWebページから本文を取り出すようエージェントを支援します。深さ、ドメイン、日付のオプションも使えます。
blogwatcher
394kブログやRSS・Atomフィードを追跡し、新しい記事を確認して、読んだ記事に印を付けるようエージェントを支援します。
data-scraper-agent
280kエージェントが公開されているさまざまな情報源からデータを自動で収集できるよう支援します。スケジュール実行、情報の補強、結果の保存が可能です。オンラインデータの監視や追跡に役立ちます。