Himawari-8/9 downloader and file query SDK for FTP and S3.
Project description
himawari-downloader
himawari-downloader is a Python SDK and CLI for querying and downloading Himawari-8/9 data from FTP and S3.
Quick Links
| English | 简体中文 |
|---|---|
| README | 中文说明 |
| Tutorial | 中文教程 |
| GitHub repository | PyPI package |
Documentation
- Installation
- Python usage
- Band mapping and parameter quick reference
- CLI
- English tutorial
- 简体中文教程
- FAQ, capability matrix, and cookbook
Features
- Unified
HimawariDownloaderAPI - Query modes:
find,latest,closest,previous,next - Download modes:
links,timestamps,dates,range - FTP support for
netcdfandhsd - FTP NetCDF remote bbox and variable subset download
- S3 file query and raw download
- Optional proxy support for FTP and S3
What's New in v0.1.2
- FTP whole-file NetCDF downloads now use a direct FTP binary transfer path for better robustness.
- FTP NetCDF query candidates are filtered to existing remote files before being returned.
- Added download progress event support in the SDK (
DownloadEventandDownloadParams.progress_callback). - NetCDF subset now supports full-disk variable export by combining:
NetcdfSubset(whole_file=True, target_vars=(...))
Installation
Base install:
pip install himawari-downloader
Install S3 support:
pip install "himawari-downloader[s3]"
Install FTP NetCDF subset support:
pip install "himawari-downloader[ftp-netcdf]"
Install everything:
pip install "himawari-downloader[all]"
For local development:
pip install -e ".[dev]"
Python usage
Basic FTP HSD download:
from himawari_downloader import DownloadParams, HimawariDownloader, QueryParams
client = HimawariDownloader(ftp_user="your_uid", ftp_password="your_password")
query = QueryParams(
source="ftp",
satellite="H09",
product_level="L1B",
product="Rad",
sector="FLDK",
mode="dates",
data_format="hsd",
dates=("2025-03-19",),
bands=("B07", "B14"),
)
result = client.download(query, DownloadParams(out_dir="data/out"))
print(result.saved_paths)
FTP NetCDF subset example:
from himawari_downloader import DownloadParams, HimawariDownloader, NetcdfSubset, QueryParams
client = HimawariDownloader(ftp_user="your_uid", ftp_password="your_password")
query = QueryParams(
source="ftp",
satellite="H09",
product_level="L2",
product="NetCDF",
sector="FLDK",
mode="links",
data_format="netcdf",
remote_files=("/jma/netcdf/202503/19/NC_H09_20250319_0010_R21_FLDK.02401_02401.nc",),
)
result = client.download(
query,
DownloadParams(
out_dir="data/out",
netcdf_subset=NetcdfSubset(
bbox_lat=(40.75, 34.44),
bbox_lon=(110.27, 114.59),
target_vars=("tbb_07",),
),
),
)
FTP NetCDF full-disk selected variable example:
```python
from himawari_downloader import DownloadParams, HimawariDownloader, NetcdfSubset, QueryParams
client = HimawariDownloader(ftp_user="your_uid", ftp_password="your_password")
query = QueryParams(
source="ftp",
satellite="H09",
product_level="L2",
product="NetCDF",
sector="FLDK",
mode="links",
data_format="netcdf",
remote_files=("/jma/netcdf/202503/19/NC_H09_20250319_0010_R21_FLDK.07001_06001.nc",),
)
result = client.download(
query,
DownloadParams(
out_dir="data/out",
netcdf_subset=NetcdfSubset(
whole_file=True,
target_vars=("tbb_07",),
),
),
)
Proxy example:
```python
from himawari_downloader import DownloadParams, ProxyConfig
params = DownloadParams(
out_dir="data/out",
proxy=ProxyConfig(
url="http://127.0.0.1:7890",
source_overrides={"s3": "http://127.0.0.1:7890"},
),
)
Band mapping and parameter quick reference
Band and channel names:
- Use
B01toB16inbands - If you already know
C07,C14style names from other tools, map them directly toB07,B14 - For FTP NetCDF subset download, use NetCDF variable names in
target_vars, notbands
Typical NetCDF variable mapping:
B07->tbb_07B14->tbb_14
Important QueryParams fields:
source:ftpors3satellite:- FTP examples usually use
H08orH09 - S3 examples usually use
HIMAWARI-8orHIMAWARI-9
- FTP examples usually use
product_level:L1Bfor radiance segmentsL2for derived products
product:- FTP HSD usually uses
Rad - FTP NetCDF currently uses
NetCDF - S3 L2 examples include
CMSK,CHGT,CPHS,RRQPE
- FTP HSD usually uses
sector:FLDK,Japan,Targetdata_format: FTP only,hsdornetcdfmode:links,timestamps,dates,range,latest,closest,previous,nextbands: tuple ofBxx, for example("B07", "B14")scene_abbr: optional regional scene filter likeR1,R2,R3
Important DownloadParams fields:
out_dir: output directorymax_workers: number of concurrent downloadsretries: retry countskip_existing: skip local files if they already existproxy:ProxyConfig(...)ftp_block_size: FTP read block sizenetcdf_subset: FTP NetCDF subset configuration
Important NetcdfSubset fields:
bbox_lat: latitude boundsbbox_lon: longitude boundstarget_vars: NetCDF variable names such as("tbb_07",)whole_file: disable subsetting and download the entire filecompression_level: output NetCDF compression levelfallback_full_download: if subset download fails, try full download
Detailed tutorial:
The tutorial also includes:
- product capability matrix
- cookbook recipes by task
- FAQ and common error guide
CLI
himawari-download find \
--source ftp \
--satellite H09 \
--product-level L1B \
--product Rad \
--sector FLDK \
--mode dates \
--data-format hsd \
--dates 2025-03-19
More CLI and task-oriented examples are documented in:
Test
python -m pytest -q
Build
python -m build
python -m twine check dist/*
Release
GitHub repository:
https://github.com/P-Coke/himawari-downloader
PyPI publishing is configured through GitHub Actions trusted publishing.
To release:
- Push changes to
main - Create and push a version tag like
v0.1.0 - GitHub Actions will build and publish to PyPI
Acknowledgments
This project was developed with design inspiration from
ghiggi/himawari_api, especially around
Himawari file discovery workflows and query semantics such as latest,
closest, previous, and next.
himawari_api is distributed under the MIT License. This project is an
independent implementation and does not vendor or copy that codebase.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file himawari_downloader-0.1.3.tar.gz.
File metadata
- Download URL: himawari_downloader-0.1.3.tar.gz
- Upload date:
- Size: 24.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b95c09ec171a06a2229aae7000788baf554e50b3a06e6530e9003347802a78e1
|
|
| MD5 |
20bdf8ce9fe9cee755bd75c5da1344f6
|
|
| BLAKE2b-256 |
72f87eca308c3dc27544f42e424228ab63b358d5b3de79b0d4423fe2351364f0
|
Provenance
The following attestation bundles were made for himawari_downloader-0.1.3.tar.gz:
Publisher:
publish-pypi.yml on P-Coke/himawari-downloader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
himawari_downloader-0.1.3.tar.gz -
Subject digest:
b95c09ec171a06a2229aae7000788baf554e50b3a06e6530e9003347802a78e1 - Sigstore transparency entry: 1154276468
- Sigstore integration time:
-
Permalink:
P-Coke/himawari-downloader@6f2d90b36658c0148c7d46d6207626c25ea532dc -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/P-Coke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@6f2d90b36658c0148c7d46d6207626c25ea532dc -
Trigger Event:
push
-
Statement type:
File details
Details for the file himawari_downloader-0.1.3-py3-none-any.whl.
File metadata
- Download URL: himawari_downloader-0.1.3-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5186911885381943d225caf8916de7ef105df4a6cca126456a164c721c16a6fd
|
|
| MD5 |
3b19e4acc3ec05581842d3f19dd7bad0
|
|
| BLAKE2b-256 |
e48ed336016f492a229d49fa828da4b0887725ebb334afa74ea4d19de9b7665a
|
Provenance
The following attestation bundles were made for himawari_downloader-0.1.3-py3-none-any.whl:
Publisher:
publish-pypi.yml on P-Coke/himawari-downloader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
himawari_downloader-0.1.3-py3-none-any.whl -
Subject digest:
5186911885381943d225caf8916de7ef105df4a6cca126456a164c721c16a6fd - Sigstore transparency entry: 1154276471
- Sigstore integration time:
-
Permalink:
P-Coke/himawari-downloader@6f2d90b36658c0148c7d46d6207626c25ea532dc -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/P-Coke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@6f2d90b36658c0148c7d46d6207626c25ea532dc -
Trigger Event:
push
-
Statement type: