eoforeststac.writers.gami_ageclass.GAMIAgeClassWriter#

class eoforeststac.writers.gami_ageclass.GAMIAgeClassWriter(endpoint_url: str, bucket: str, key: str | None = None, secret: str | None = None, profile: str | None = None, region: str = 'eu-central-1', anon: bool = False)[source]#

Writer for GAMI age-class fraction product (multi-resolution).

Reads an existing Zarr store produced by the age upscaling workflow (dimensions: members, age_class, latitude, longitude, time; variable: forest_age as fraction 0-1), rechunks it, adds metadata, and writes a single annotated Zarr store to Ceph/S3. Call once per resolution.

Example:

writer.write(
    input_zarr="/path/to/AgeClass_0.25deg",
    output_zarr="s3://bucket/collections/GAMI_AGECLASS/GAMI_AGECLASS_0.25deg_v3.0.zarr",
    resolution="0.25deg",
)
__init__(endpoint_url: str, bucket: str, key: str | None = None, secret: str | None = None, profile: str | None = None, region: str = 'eu-central-1', anon: bool = False)[source]#

Methods

__init__(endpoint_url, bucket[, key, ...])

apply_fillvalue(ds[, fill_value])

load_dataset(input_zarr)

make_store(zarr_path)

Create an s3fs-backed Zarr store.

process_dataset(ds, resolution[, ...])

Harmonize chunking, CRS, dtype, and metadata.

set_crs(ds[, crs])

set_global_metadata(ds, metadata)

write(input_zarr, output_zarr, resolution[, ...])

Repackage a native GAMI age-class Zarr store to Ceph.

write_to_zarr(ds, zarr_path[, encoding, ...])