NOAA::Aurora 우주 기상 예보용

발행: (2025년 12월 25일 오전 10:09 GMT+9)
2 min read
원문: Dev.to

Source: Dev.to

개요

현재 태양 활동이 정점에 이르면서, 나는 iOS 날씨 앱 Xasteria에 오로라 예보 기능을 추가했습니다. NOAA에서 원시 텍스트 파일을 직접 가져오는 대신, 날씨 프록시 서버가 데이터를 가져오도록 했습니다. 그 결과물은 NOAA::Aurora라는 CPAN 모듈로, NOAA 우주 날씨 예보 센터(SWPC)에 대한 편리한 인터페이스를 제공하며 데이터 가져오기, 파싱, 캐싱을 처리합니다.

설치

CPAN에서 모듈을 설치합니다:

cpan NOAA::Aurora

사용법

단기 예보 지도 가져오기

use NOAA::Aurora;

my $aurora = NOAA::Aurora->new();

# Short‑term forecast map for the Northern hemisphere
$aurora->get_image( hemisphere => 'north', output => 'aurora_north.jpg' );

특정 위치에 대한 단기 오로라 확률 얻기

# Get short‑term aurora probability for a given location
my $probability = $aurora->get_probability( lat => 51, lon => -2 );

예보 시계열 얻기

# Get 3‑day Kp forecast as a timeseries
my $forecast = $aurora->get_forecast();

# Get 27‑day outlook as a timeseries
my $outlook = $aurora->get_outlook();
Back to Blog

관련 글

더 보기 »

Maestro Flakiness: 소스 코드 분석

Maestro Flakiness: Source Code Analysis 표지 이미지 https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F...