weather-model-data-fetching
Skill này làm gì
Công cụ này tải dữ liệu dự báo thời tiết từ các mô hình khí tượng phức tạp. Nó làm việc hiệu quả bằng cách chỉ lấy những phần cần thiết của các tệp, thay vì tải toàn bộ.
Khi nào nên dùng
- ✓Khi bạn cần dữ liệu cụ thể từ các mô hình như GFS hoặc HRRR.
- ✓Khi bạn đang tải dữ liệu dự báo quá lớn để xử lý cùng lúc.
- ✓Khi lần tải trước bị lỗi, bị gián đoạn hoặc quá chậm.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/weather-model-data-fetching/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tải dữ liệu áp suất của mô hình HRRR cho ngày 12 tháng 4 năm 2023, 00Z, cho giờ dự báo +3.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ trước tiên kiểm tra dữ liệu nào cần thiết và tìm ở đâu. Sau đó, nó yêu cầu chỉ những phần cụ thể của các tệp dữ liệu, dùng hệ thống ‘địa chỉ’ để đảm bảo chỉ tải và lưu những gì cần thiết.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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,
…
Câu hỏi thường gặp
‘Dữ liệu dự báo thời tiết bằng số’ là gì?
Đó là thông tin chi tiết do máy tính tạo ra, mô phỏng khí quyển để dự đoán thời tiết. Dữ liệu này được các nhà khí tượng dùng để làm dự báo.
Vì sao chỉ tải ‘các phần’ của tệp?
Các tệp dự báo thời tiết có thể rất lớn (hàng gigabyte). Chỉ tải phần cần thiết giúp tiết kiệm thời gian, dữ liệu và dung lượng lưu trữ.
GRIB2 là gì?
Đó là định dạng tệp phổ biến để lưu dữ liệu thời tiết. Nó hiệu quả nhưng có thể phức tạp khi làm việc nếu không có công cụ chuyên dụng.
Chi tiết
Mô tả gốc của tác giả
Retrieve numerical weather prediction data from public AWS S3 and HTTP archives using GRIB2 inventories, byte ranges, Herbie, provider fallbacks, and verified caching.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #6146
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
tavily
394kGiúp agent của bạn tìm kiếm web bằng Tavily và lấy văn bản từ các trang cụ thể, với tùy chọn về độ sâu, tên miền và ngày tháng.
blogwatcher
394kCho phép agent của bạn theo dõi blog và nguồn cấp RSS hoặc Atom, kiểm tra bài viết mới và đánh dấu những bài bạn đã đọc.
data-scraper-agent
280kGiúp agent tự động thu thập dữ liệu từ mọi nguồn công khai. Có thể lên lịch, bổ sung thông tin và lưu kết quả. Hữu ích để theo dõi dữ liệu trực tuyến.