Skip to main content

pyozwald

Cached OzWALD time series for Australia — fetch once per grid point, never twice. OzWALD is ANU's Water and Landscape Dynamics dataset: modelled daily meteorology (~5 km) and 8-day biophysical variables (~500 m, MODIS-derived) served as one OPeNDAP NetCDF per variable per year. Every observation this machine ever samples lands in one SQLite store, so repeat requests, nearby coordinates in the same cell, and extended date ranges all reuse the same rows. Part of the Borevitz Lab ecosystem.

How it works

{data_root}/ozwald_store/
└── ozwald.db
    ├── observations(point, cadence, variable, date, value)
    └── coverage(point, cadence, variable, year, through)
  • Coordinates snap to a dedup grid matching each product's native resolution — 0.05° for daily meteorology, 0.005° for the 8-day variables — so nearby requests share one stored series per cadence.
  • OzWALD's unit of delivery is one NetCDF per (variable, year), so that's the unit of the coverage ledger. Store.get_df(...) diffs the requested years × variables against it and samples only the missing cells; a whole year is stored even when a sub-range was requested, since the marginal cost is nil and it maximises reuse.
  • through records the last date a year's file actually contained — an in-progress year keeps being re-fetched until complete, then never again.
  • Writes are transactional (SQLite/WAL): a crash mid-fetch leaves the cell unrecorded, and the next run re-fetches it.

Usage

The core API is troi-agnostic — a coordinate, dates, and a cadence:

from datetime import date
from pyozwald.store import Store

store = Store()

met = store.get_df(-33.516, 148.373, date(2023, 1, 1), date(2023, 12, 31))
#     daily meteorology: time, Pg, Tmax, Tmin, Uavg, Ueff, VPeff, ...

veg = store.get_df(-33.516, 148.373, date(2023, 1, 1), date(2023, 12, 31),
                   cadence='8day', variables=['NDVI', 'LAI', 'GPP'])
#     8-day biophysical series on the ~500 m grid

store.fill(-33.516, 148.373, date(2023, 1, 1), date(2023, 12, 31))  # → 0: already local

Pipelines that speak the shared troi.troi.Troi use the adapters (evaluated at the bbox centre):

df = store.get_df_troi(troi, cadence='daily')

download_ozwald_daily(troi) and download_ozwald_8day(troi) remain as thin wrappers.

Performance

Live measurements against NCI THREDDS — one grid point:

Scenario Fetched Time
Cold fill — 2 daily variables × 1 year 2 cells 2.3 s
Same request again nothing 0.0 s
Nearby coordinate, same ~5 km cell nothing 0.0 s
Date range extended −1 year 2 cells — the new year only 1.8 s
8-day NDVI, one year 1 cell 0.7 s
Read cached year (365 × 2) — 0.01 s

(One cell = one variable × one year at one grid point.) Store footprint: ~100 KB for the five cells above. Absolute times vary with network and THREDDS load; the zeros are the point — they are ledger lookups, no network involved.

Install

pip

pip install git+https://github.com/thestochasticman/pyozwald.git

Dependencies (the troi core included, pulled from GitHub) are declared in pyproject.toml and installed automatically.

From source

git clone https://github.com/thestochasticman/pyozwald.git
cd pyozwald
pip install -e .

Package design (shared across the lab's packages — no inheritance, composition only):

  • Troi (from troi) — identity: what region, what dates.
  • OzWALD (pyozwald.ozwald) — config: endpoint, variable catalogs per cadence, dedup grid steps.
  • Paths (pyozwald.paths) — derived location of the store for a given Config.
  • grid — the dedup grids (pure, offline-testable math).
  • Store (pyozwald.store) — ties them together.

Test

# offline (pure math + synthetic store):
python pyozwald/grid.py     # True
python pyozwald/paths.py    # True
python pyozwald/store.py    # True

# live (small real samples from NCI THREDDS, incl. dedup assertions):
python pyozwald/download_ozwald.py  # True

Metadata

Release files for pyozwald 0.1.0

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

Source distribution (sdist)

Source distribution for pyozwald 0.1.0
File Size Uploaded Provenance Actions
pyozwald-0.1.0.tar.gz 12.8 kB Without provenance Details for pyozwald-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 25.8 kB

Release files / pyozwald-0.1.0.tar.gz

Download URL pyozwald-0.1.0.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6ea218765bc94064e7ad4a13c87bfc024bbb6c8a66de91291a59a0b97364db00
BLAKE2b-256 checksum
How to use checksums
bb72102b47037c9444a77ade7c029e179eb7e44357608ece4c3b7adda3cda1e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / pyozwald-0.1.0-py3-none-any.whl

Download URL pyozwald-0.1.0-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d35feceb4639ccb074c79a0f94d9192f81742494cf9ab7d07927a3f4f2d6bfa3
BLAKE2b-256 checksum
How to use checksums
09ffec1a16b5e30ab80e230071f393877a310d5634e5a1fe82c6cce0cd0cb6d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Security for pyozwald 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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