Skip to main content

aisky 系列子模型的云端预报数据读取与缓存工具

Project description

aisky

English | 中文

aisky is a Python package for downloading, caching, and reading cloud-hosted forecast data for the aisky submodel family. Each submodel can have its own cycle times, step rules, variable set, and URL conventions, so aisky exposes a model-client interface.

Submodel Technical References

aisky-aerosol

Paper

Gui, K., Zhang, X., Che, H. et al. Advancing operational global aerosol forecasting with machine learning. Nature 651, 658–665 (2026).

Architecture

aisky-aerosol architecture

aisky-sds (TBD)

Paper

  • TBD

Architecture

  • TBD

Install

pip install aisky

Quick Start (aisky-aerosol)

from aisky import aisky

client = aisky(model="aisky-aerosol")
print(client.info().to_dict())

da = client.get_forecast(
    init_time="20260101_0130",
    step_hours=3,
    count=8,
    variable="TOTEXTTAU",
)
print(da)

Fetch multiple variables at once (returns an xarray.Dataset):

from aisky import aisky

client = aisky("aisky-aerosol")
ds = client.get_forecast(
    "20260101_0130",
    step_hours=3,
    count=8,
    variable=["TOTEXTTAU", "DUEXTTAU"],
)
print(ds)

List available models

import aisky

print(aisky.available_models())

Inspect model metadata (cycle/variables/rules)

from aisky import aisky

client = aisky("aisky-aerosol")
info = client.info()

print(info.cycle_times)
print(info.variables)

Fetch forecasts

from aisky import aisky

client = aisky("aisky-aerosol")
da = client.get_forecast("20260101_0130", step_hours=3, count=8, variable="TOTEXTTAU")

Cache to a local folder

store_dir creates a subfolder named by init_time (e.g., ./data/20260101_0130/):

from aisky import aisky

client = aisky("aisky-aerosol")
da = client.get_forecast(
    "20260101_0130",
    count=8,
    variable="TOTEXTTAU",
    store_dir="./data",
)

API

aisky(model=...)

Returns a model client with:

  • client.info(): submodel metadata (cycle times, variables, rules, defaults)
  • client.get_forecast(...): download/cache/read forecast data

client.get_forecast(...)

  • init_time: init time ("YYYYMMDD_HHMM", datetime, or pandas.Timestamp)
  • step_hours: step size (hours), constrained by the submodel rules (aisky-aerosol: multiple of 3)
  • count: number of forecast targets (>= 1; 1 means a single valid time)
  • store_dir: optional; if set, files are stored under store_dir/init_time/
  • cache_dir: optional; default uses the OS cache directory (Windows: %LOCALAPPDATA%\\aisky\\cache)
  • variable: optional; a variable name or a list of variables (aisky-aerosol: must be in client.info().variables)
  • engine: xarray.open_dataset engine (default: netcdf4)
  • timeout: download timeout (seconds)
  • retries: retry attempts
  • overwrite: overwrite existing cached files
  • return_dataset: return xarray.Dataset directly

More examples: docs/usage.md.

Data Source & URL Template

URL template (the path naming is historical and does not affect the product name):

https://obs.cstcloud.cn/s/ai-gamfs/AI-GAMFS/forecast_data/{init}/AI_GAMFS.{init}+{valid}.V01.nc

Both init and valid use YYYYMMDD_HHMM.

License

MIT License. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aisky-0.1.2.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aisky-0.1.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file aisky-0.1.2.tar.gz.

File metadata

  • Download URL: aisky-0.1.2.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for aisky-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9865dc3868283752c273810189e489dc0942e66dd672d7c680f002b9d4ad7ed2
MD5 0dff8d5a8077151570b7e1526ef2bb89
BLAKE2b-256 883e83367f951bebd7fd7012575f2dbf9e5b593e403ab4ab67960034e4b82fe2

See more details on using hashes here.

File details

Details for the file aisky-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: aisky-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for aisky-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7258d5cb56667d793027bc4112fa9815a1ea06cef733501ab259ddf34719a543
MD5 c96b0c71c1fa03c09ebebd7d0abf5cb5
BLAKE2b-256 a8d9e81e923835da71a18a7862a206ead87b7ed3479e664270e69b834f101e35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page