Geoinformation Tools & Data Access for Satellite Observations
Project description
🌍 QKUN
Geoinformation Tools & Data Access for Satellite Observations
Qkun, pronaunced as "kun", is a Python package for querying, downloading, caching, and processing Earth observation satellite data.
🚀 Features
- ✅ Query satellite data (current & historical) by spatial and temporal bounds
- ✅ Download observational data by mission, instrument, and processing level
- ✅ Local LRU cache with automatic size limit and on-demand re-download
- ✅ Digest large data files into lightweight YAML summaries for quick inspection
📦 Installation
🧪 System Requirements:
- Python 3.9+
- Linux or macOS
- hdf5, netCDF, and other data format libraries
- use python virtual environment for isolation
If you are using MacOS, you may need to install hdf5 and netCDF libraries:
brew install hdf5 netcdf
If you are using Ubuntu, you may need to install hdf5 and netCDF libraries:
sudo apt-get install libhdf5-dev libnetcdf-dev
If you are using RedHat, you may need to install hdf5 and netCDF libraries:
sudo yum install hdf5 netcdf
Please activate a python virtual environment before installing the package:
python3 -m venv venv
source venv/bin/activate
🔗 Install from PyPI:
pip install qkun
🛠️ Install locally (dev mode)
git clone https://github.com/yourusername/qkun.git
cd qkun
pip install -e .
📁 Command-line Usage
🌐 Query satellite granules
search-granule pace OCI-L1B --start 2025-03-26 --end 2025-03-27 --lat -10 10 --lon 30 50
📦 Download satellite granules
search-granule pace OCI-L1B --start 2025-03-26 --end 2025-03-27 --lat -10 10 --lon 30 50 --quiet > download_list.txt
download-granule download_list.txt --select ::2 --save-dir ${HOME}/.cache/qkun
📊 Summarize large data files
digest-granule download_list.txt --select ::2 --save-dir ${HOME}/.cache/qkun
🛰️ Supported Missions, Instruments & Data Levels
| Mission | Instrument(s) | Data Level(s) |
|---|---|---|
| pace | OCI | L1B, L2 |
| aqua | AIRS,MODIS | L1B, L2 |
| gpm | GMI | L1B, L2 |
| sentinel-5p | TROPOMI | L1B, L2 |
| (More coming) | ... | ... |
🧠 Example Python API Usage
Assuming that you have already downloaded and digested the data using command-line tools, you can use the following Python API to access the data.
import os
from qkun import CACHE_FOLDER_PATH
from qkun.pace import OceanColor
basename = "PACE_OCI.20250326T103301.L1B.V3"
digest_path = os.path.join(CACHE_FOLDER_PATH, f"{basename}.global.yaml")
# create an instance of OceanColor
obs = OceanColor(digest_path, verbose=True)
# create auxiliary files such as footprint and field of view
# also saved in the cache folder
obs.process()
# get a lat-lon bounding box
box = obs.get_bounding_box()
# get instrument field of view
lon, lat = obs.get_fov()
# get data keys
keys = obs.get_data().variables.keys()
# subsample and average over bands
blue = obs.get_data("rhot_blue")[:,::5,::5].mean(axis=0)
🧹 Caching By default, all downloaded data are cached locally in:
~/.cache/qkun/
To change the cache directory and size limit, set these global variables:
import qkun
qkun.CACHE_FOLDER_PATH = '/path/to/cache'
qkun.CACHE_SIZE_LIMIT = 10. # in GB
🤝 Contributing
Contributions are welcome! Please open an issue or PR if you’d like to:
- Add new missions/instruments
- Improve download or parsing logic
- Enhance command line tools or add GUI
- Expand test coverage
📬 Contact
Maintained by @chengcli — feel free to reach out with ideas, feedback, or collaboration proposals.
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 qkun-0.4.1.tar.gz.
File metadata
- Download URL: qkun-0.4.1.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ade9490cbcf4300361ebecf9c456b738e991374f614469f286f6ebc180e2f79
|
|
| MD5 |
ee7520b2168c849ada99cd32b31dbcb2
|
|
| BLAKE2b-256 |
6e355a31bfea96d1df5656c77979ffa88019909dcf147dbca090b49b73cbed80
|
File details
Details for the file qkun-0.4.1-py3-none-any.whl.
File metadata
- Download URL: qkun-0.4.1-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8358e54f0698542665a27e9450fc61d20fad1c949930a69519abadd7c76d10fb
|
|
| MD5 |
47d15e83121e7c57765af6c42b60abcf
|
|
| BLAKE2b-256 |
a9189d57491aa9296715bd65770913acb22f5460aa1aaa569c1e8267ed3e70a0
|