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:
- 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.
- 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.
- 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.
- 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.
- Smart Error Catching & Logging: Comprehensive activity logging and intelligent error handling, providing clear insights into query execution and data processing.
Quick install (Python):
pip install aidweather
Quick install (CLI, via uv):
uv tool install aidweather
See Installation below for optional-extras and source/development install options (including the GitHub-based install scripts).
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 withtemporal_api="hourly"raisesValueError.
Installation
PyPI (recommended)
pip install aidweather
Or, for the CLI as an isolated tool via uv:
uv tool install aidweather
From source / development install
The install scripts below clone from GitHub and are intended for development setups (editable install, dev tooling, the Claude Code skill) rather than everyday installation.
Unix / macOS:
curl -fsSL https://raw.githubusercontent.com/matiollipt/aidweather/main/install.sh | bash
Or install the latest unreleased main 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:
- User Guide — Step-by-step introduction to fetching and analyzing weather data.
- Spatial Interpretation Guide — Understanding native grid resolutions, transects, regional boxes, and station comparisons.
- Parameter & Provenance Guide — Parameter catalogue, NASA source models, temporal availability, and time standards.
- Geospatial Coordinate Reference — Coordinate notation systems (DD, DDM, DMS), string parsing, and
GeoCoordinateusage. - DataFrame Date Utilities Reference — Date column matching, DatetimeIndex fallbacks, and timezone handling.
- API Reference — Complete Python API reference for
PowerClient,GeoCoordinate, and query functions. - Configuration Reference — Environment variables, JSON configuration assets, and SQLite cache settings.
- Developer Guide — Internal request lifecycles, cache key design, and architecture details.
- Contributing & Testing — Guidelines for contributing, running
pytest, and checking typing withmypy.
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.4. 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.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aidweather-0.1.4.tar.gz | 81.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aidweather-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 143.0 kB
Release files / aidweather-0.1.4.tar.gz
| Download URL | aidweather-0.1.4.tar.gz |
|---|---|
| Size | 81.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
460bb9657aff5eb264230037a0d4471896f6a83d6d1fa1f579b00a6fd3790eaa
|
|
BLAKE2b-256 checksum How to use checksums |
e5776e1592849f3e90191bc5dc09956d158c16149c572c16cb64185c98619f1e
|
| 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 logRelease files / aidweather-0.1.4-py3-none-any.whl
| Download URL | aidweather-0.1.4-py3-none-any.whl |
|---|---|
| Size | 61.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c19346b3c886a0c71120f8fba3edbf312f017d12dffc23a043a91cf2cbdc8822
|
|
BLAKE2b-256 checksum How to use checksums |
64cc950f27ff71df8eace1e0358d08470c386b21b146137ecf05571ee8f9e310
|
| 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