Skip to main content

aidweather logo

aidweather

Agroclimatic & Solar Data Integration from NASA POWER

aidweather bridges your project with reliable weather and solar radiation data from NASA's POWER API. Key features include:

  1. Seamless NASA POWER Integration: Serves as a bridge between your application and NASA POWER weather services, hiding the complexities of constructing API requests, handling timeouts, and verifying payload structures.
  2. Versatile Spatial Fetching: Flexible data retrieval across single points, 1D transect paths, and 2D regional bounding boxes, with internal tuning levers to ensure accurate and consistent spatial sampling.
  3. SQLite Caching & API Compliance: Built-in SQLite caching prevents redundant downloads, saving bandwidth and avoiding unnecessary hits to NASA POWER servers while enforcing rate limits and data usage policies.
  4. Python Bindings & Full CLI: Dual interface offering an intuitive Python API for data science workflows and a full-featured Command Line Interface (CLI) for quick command-line extractions.
  5. Smart Error Catching & Logging: Comprehensive activity logging and intelligent error handling, providing clear insights into query execution and data processing.

Quick install (Unix / macOS):

curl -fsSL https://raw.githubusercontent.com/matiollipt/aidweather/main/install.sh | bash

Quick install (Windows PowerShell):

& ([scriptblock]::Create((irm https://raw.githubusercontent.com/matiollipt/aidweather/main/install.ps1))) -Yes

See Installation below for uv tool install, virtual-env, and optional-extras options.


Supported NASA POWER Parameters

aidweather includes built-in metadata, unit validation, and spatial grid specifications for 18 core weather, solar radiation, and soil moisture parameters:

Code Parameter Name Source Product Native Grid (Lat × Lon) Daily Unit Hourly Unit
T2M Temperature at 2 m MERRA-2 / GEOS-IT 0.50° × 0.625° °C °C
T2M_MAX Maximum Temperature at 2 m MERRA-2 / GEOS-IT 0.50° × 0.625° °C °C
T2M_MIN Minimum Temperature at 2 m MERRA-2 / GEOS-IT 0.50° × 0.625° °C °C
T2M_RANGE Diurnal Temperature Range at 2 m MERRA-2 / GEOS-IT 0.50° × 0.625° °C °C
T2MWET Wet Bulb Temperature at 2 m MERRA-2 / GEOS-IT 0.50° × 0.625° °C °C
T2MDEW Dew Point Temperature at 2 m MERRA-2 / GEOS-IT 0.50° × 0.625° °C °C
TS Surface Skin Temperature MERRA-2 / GEOS-IT 0.50° × 0.625° °C °C
RH2M Relative Humidity at 2 m MERRA-2 / GEOS-IT 0.50° × 0.625° % %
PRECTOTCORR Corrected Total Precipitation MERRA-2 / GEOS-IT 0.50° × 0.625° mm/day mm/hr
ALLSKY_SFC_SW_DWN Surface Shortwave Downward Irradiance CERES SYN1deg / SRB 1.00° × 1.00° kWh/m²/day W/m²
ALLSKY_SFC_PAR_TOT Surface PAR Total CERES SYN1deg / SRB 1.00° × 1.00° MJ/m²/day W/m²
WS10M Wind Speed at 10 m MERRA-2 / GEOS-IT 0.50° × 0.625° m/s m/s
WS10M_MAX Maximum Wind Speed at 10 m MERRA-2 / GEOS-IT 0.50° × 0.625° m/s m/s
WD10M Wind Direction at 10 m MERRA-2 / GEOS-IT 0.50° × 0.625° degrees degrees
PS Surface Pressure MERRA-2 / GEOS-IT 0.50° × 0.625° kPa kPa
GWETTOP Surface Soil Wetness MERRA-2 / GEOS-IT 0.50° × 0.625° 0–1 —
GWETROOT Root Zone Soil Wetness MERRA-2 / GEOS-IT 0.50° × 0.625° 0–1 —
GWETPROF Profile Soil Moisture MERRA-2 / GEOS-IT 0.50° × 0.625° 0–1 —

— indicates the parameter is not published on NASA POWER's hourly endpoint; requesting it with temporal_api="hourly" raises ValueError.


Installation

Unix / macOS

curl -fsSL https://raw.githubusercontent.com/matiollipt/aidweather/main/install.sh | bash

Or install via uv tool:

uv tool install git+https://github.com/matiollipt/aidweather.git

Windows (PowerShell)

& ([scriptblock]::Create((irm https://raw.githubusercontent.com/matiollipt/aidweather/main/install.ps1))) -Yes

Optional Extras

pyproject.toml defines two optional-dependency groups: test (pytest, ruff, mypy, and related type-checking/test tooling) and release (build, twine, for cutting a release per docs/release_checklist.md).

With uv tool install — append the extra(s) to the package spec, in brackets, before the @:

# Single extra
uv tool install "aidweather[test] @ git+https://github.com/matiollipt/aidweather.git"

# Multiple extras
uv tool install "aidweather[test,release] @ git+https://github.com/matiollipt/aidweather.git"

With the install scripts — pass --extra NAME (repeatable) on Unix/macOS or -Extra NAME on Windows; --dev/-Dev is a shortcut for both test and release:

# Unix / macOS
./install.sh --extra test              # test tooling only
./install.sh --dev                     # test + release (equivalent to --extra test --extra release)
curl -fsSL .../install.sh | bash -s -- --dev -y
# Windows (PowerShell)
.\install.ps1 -Extra test
.\install.ps1 -Dev

From a local clone, the same extras syntax works directly with pip/uv pip:

pip install -e ".[test]"
uv pip install -e ".[test,release]"

Claude Code Skill

aidweather ships a Claude Code skill (bundled as package data at src/aidweather/assets/skills/aidweather/) that teaches an agent how to bootstrap the CLI, translate messy coordinate/date requests into aidweather calls, and read back JSON output. Install it into ~/.claude/skills/aidweather alongside the package:

./install.sh --install-skill
# or, on an existing install, just re-run with the flag added:
./install.sh --install-skill -y
.\install.ps1 -InstallSkill

If you only want the skill (no package install), download the two files directly: SKILL.md and references/request-patterns.md, and place them under ~/.claude/skills/aidweather/.


Documentation Guides

The documentation is organized into dedicated guides for scientific users and developers:


Quick Start (Python)

from aidweather import PowerClient, GeoCoordinate

# Initialize client for daily temporal resolution
client = PowerClient(temporal_api="daily")

# 1. Fetch single-point meteorological and solar data
df = client.get_point_data(
    lat=-23.55,
    lon=-46.63,
    start="2023-01-01",
    end="2023-01-31",
    params=["T2M", "ALLSKY_SFC_SW_DWN", "PRECTOTCORR"],
)
print(df.head())

# 2. Sample along a 1D spatial transect (respecting native parameter grid spacing)
coord_a = GeoCoordinate.from_decimal(-25.0, -48.0)
coord_b = GeoCoordinate.from_decimal(-20.0, -48.0)

df_transect = client.get_transect_data(
    start_coord=coord_a,
    end_coord=coord_b,
    start="2023-01-01",
    end="2023-01-07",
    params=["T2M"],
    spacing_km=100.0,
)
print(df_transect.head())

Command Line Interface (CLI)

# Fetch single-point data to CSV
aidweather fetch --lat -23.55 --lon -46.63 \
    --start 2023-01-01 --end 2023-01-31 \
    --params T2M,PRECTOTCORR --output point_data.csv

# Sample along a 1D spatial transect
aidweather fetch-transect \
    --lat-start -25.0 --lon-start -48.0 \
    --lat-end   -20.0 --lon-end   -48.0 \
    --start 2023-01-01 --end 2023-01-31 \
    --spacing-km 100.0

# Fetch regional bounding box data (max 4.5° x 4.5°, 1 parameter per request)
aidweather fetch-regional --lat-min -23.5 --lat-max -20.0 \
    --lon-min -47.0 --lon-max -44.0 \
    --start 2023-01-01 --end 2023-01-31 \
    --params T2M --output regional.csv

# Inspect parameter metadata & local cache
aidweather params list --group all
aidweather params describe T2M
aidweather cache info

Data Licensing & Official NASA Attribution

NASA POWER data are open access and free of charge. In accordance with the NASA Earthdata Data Use and Attribution Policy, scientific publications, reports, and applications utilizing aidweather must properly cite the NASA POWER Project and acknowledge the primary satellite/reanalysis source products.

Suggested Acknowledgment Text:

"Meteorological and solar energy parameters were retrieved from the NASA Prediction Of Worldwide Energy Resources (POWER) project using aidweather v0.1.3. NASA POWER meteorological products originate from the GMAO MERRA-2 / GEOS-IT assimilation models, and solar radiation products originate from NASA LaRC CERES / FLASHFlux / SRB satellite observations."


License

Apache-2.0. See LICENSE.

Metadata

Release files for aidweather 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aidweather 0.1.3
File Size Uploaded
aidweather-0.1.3.tar.gz 81.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aidweather 0.1.3
File Interpreter ABI Platform
aidweather-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 142.5 kB

Release files / aidweather-0.1.3.tar.gz

Download URL aidweather-0.1.3.tar.gz
Size 81.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bd70cc11ba122e53fd8ba4171f35e1845aa4f4635e30f354dc5876ef4959446d
BLAKE2b-256 checksum
How to use checksums
324435154649a265a73be682278f23a1177457db348e227d9dd1fc1974c57475
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Release files / aidweather-0.1.3-py3-none-any.whl

Download URL aidweather-0.1.3-py3-none-any.whl
Size 61.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8bbc1526d1a5f3f99618385bd5828f857c3eac563df83354ecbdf8da86d3888f
BLAKE2b-256 checksum
How to use checksums
f9114f0369718ae538b392ca2b75a2966f58c3f25e0ed665fa4d50c23bf01740
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.4

2 release files

This release

0.1.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page