본문으로 건너뛰기
Skillpedia
웹 스크레이핑48k · #6146

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/weather-model-data-fetching/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“2023년 4월 12일 00Z의 HRRR 모델 기압 데이터를 예보 시간 +3으로 내려받아 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구가 먼저 어떤 데이터가 필요하고 어디에 있는지 확인합니다. 그다음 데이터 파일의 필요한 부분만 요청합니다. ‘주소 지정(addressing)’ 방식을 사용해 꼭 필요한 것만 내려받고 저장합니다.

기술 내용 (원본 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

  1. Reuse the project's existing fetch/cache abstraction when it already handles the model.
  2. Use Herbie for a supported GRIB2 model. It discovers AWS, NOMADS, Google, Azure, and other configured sources and understands their key layouts.
  3. Use a provider-native point or Zarr endpoint when the task needs a tiny spatial slice from many times or members.
  4. 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.

  1. Fetch the small inventory first.
  2. Inspect its actual rows before writing a regex.
  3. Select exact variables, levels, and forecast-step records.
  4. 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.
  5. Coalesce adjacent selected messages into one range.
  6. Issue one Range: bytes=START-END request per range. S3 does not support multiple ranges in one GetObject request.
  7. Require 206 Partial Content and a matching Content-Range. If a server answers 200, do not append the whole object as though it were a fragment.
  8. Pin the object's length and identity (ETag and/or Last-Modified) while downloading. Discard fragments if the object changes.
  9. 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.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#6146
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬