Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

DataHub Integration Guide

1. The target architecture (what already exists)

There is no monolithic “DataHub” service — the DataHub is a convention with three layers that already exist in the org and should be the common target for all data work:

provider ──► STAC catalog (GitHub, static JSON) ──► COG/Zarr assets (s3://cresst, GCS)
                                                          │
                                  gaia-cli stage ─────────┘──► harmonized Zarr DataTree
                                                                    │
                                                          catalog web map + downstream models
LayerImplementation todayRepos
Object stores3://cresst (us-west-2): anonymous read, authenticated write via obstore (AWS_PROFILE=cresst-user), layout s3://cresst/{user}/, formats Zarr / COG / Parquet. SOLUS lives in public GCS solus100pub.documented in gaia-data-downloaders agents_docs/aws_s3_integration.md
STAC catalogsPer-dataset static STAC (stac_version 1.1.0), built with rio-stac/pystac, read with odc.stac.load(...).solus-stac, prism-stac, landlab-stac, precip-stac (WIP)
Staginggaia-cli: gaia stage prism|hrrr|synoptic|all -i AOI -s START -e END -o ZARR; harmonizes to an xarray.DataTree (stations/…, rasters/…) with standardized variable names/units/CRS; writes Zarr.gaia-cli
Discoverycatalog Leaflet web map (published at gaia-hazlab.github.io/catalog).catalog

Conventions to adopt everywhere:

2. The provenance standard

Every layer the DataHub serves must carry a four-part provenance statement, expressed as STAC properties so it travels with the data:

Provenance fieldWhere it goes in STACExample
Sourceproviders, custom namespace (e.g. prism:)USDA SOLUS100; PRISM Climate Group
Measurement / sensorasset description, eo/instrument fields“L-band radiometer brightness temperature”; “100 m ML soil estimate”
Resolution — native support and postingproj:shape, proj:transform, gsd (posting) + a native-support note where it differsposting 100 m (native ≈ SSURGO map-unit scale); posting 9 km (native ~36 km radiometer)
Uncertaintyper-asset stats / extra fields (low/high estimate, p5/p95)SOLUS l/h estimate bands; POLARIS p5/p95

This is the rule that prevents the footprint-leakage problem described in Pillar 1 §3.3: a product posted at 9 km must keep its true (coarser) native support recorded — distinct from the grid it is delivered on — so downstream models can weight it honestly.

3. Migration recipe for an ad-hoc data-prep repo

The pattern below converts a repo like fire-debrisflow-ml or landlab-debrisflow (today: hardcoded /mnt/c/Users/.../Downloads/... paths, one-off SOLUS GCS URLs, local .asc outputs) into a DataHub-aligned module.

  1. De-personalize the config. Replace absolute local paths with an AOI + run config; keep a sanitized config/base.example.yaml as the committed template (the base.example.yaml pattern already used in fire-debrisflow-ml). No data, no ~/Downloads, no /mnt/c in git.

  2. Read STAC instead of hardcoded URLs. Replace the per-property SOLUS GCS URLs with a solus-stac read:

    import pystac, odc.stac
    cat = pystac.Catalog.from_file(
        "https://raw.githubusercontent.com/gaia-hazlab/solus-stac/main/stac/catalog.json")
    ds = odc.stac.load(items, bands=["claytotal", "sandtotal", "dbovendry"], resolution=10)

    Same for precipitation via prism-stac / gaia-cli stage prism.

  3. Stage forcing through gaia-cli. Replace bespoke PRISM/HRRR/Synoptic downloaders with gaia stage … -i AOI -s START -e END -o s3://cresst/{user}/…, inheriting the standardized variable names and units.

  4. Publish derived event layers as a STAC collection. When the repo produces a co-registered event stack (the 22-layer eagle-creek set is the worked example), write the COGs to s3://cresst/{user}/{event}/ and emit a STAC collection exactly like landlab-stac. Tag COGs as COG (the current landlab-stac assets are plain GeoTIFF — fix that).

  5. Attach provenance + resolution + uncertainty (§2) to every asset.

  6. Codify the model’s input contract (§4) so the catalog can validate that an event stack is complete before a model run.

4. Per-hazard variable requirement lists

Codify, per model, exactly which layers the reanalysis must deliver. Two are already legible from the code:

Landlab LandslideProbability (from landlab-debrisflow / landlab-stac): topographic__elevation, soil__thickness, soil__density, soil__internal_friction_angle, soil__saturated_hydraulic_conductivity, porosity, field__capacity, wilting__point, soil__{min,mode,max}_total_cohesion, vegetation__plant_functional_type + daily PRISM forcing (ppt, tmin, tmax). The burn__severity layer is required only for the post-fire debris-flow variant; the core shallow/deep landslide susceptibility omits it.

Liquefaction & ground failure (da-seis-groundfailure, hazard page): currently only seismic waveforms are wired; it still needs water-table depth (dwtd_{wt}), saturation (SwS_w), VsV_{s} profiles, and geotech indices — i.e. the Soil Reanalysis Product outputs. This is a concrete first application.

Mapping the SOLUS100 (static, 100 m) and POLARIS (30 m, used by landslide-digital-twin) vocabularies onto these Landlab field names — and adding the dynamic CONUS404 SMOIS/TSLB and seismic-derived states — is the unifying task of Pillar 1.

5. Repo-by-repo action items

RepoStatusRecommended action
gaia-cliprecip/met staging; emits soil_moistureAdd a soil-state stage (SOLUS/POLARIS priors + CONUS404 dynamic + seismic states); move “recipes” from hardcoded constants to a declarative config
solus-stacsolid SOLUS catalogAdd explicit uncertainty assets (l/h bands) and raster: stats; reference from gaia-cli
prism-stacworkingKeep as the precipitation reference; ensure tmean/ppt both COG
precip-stacWIP, no STAC JSON yetFinish the multiband → per-day COG → STAC build; publish assets to cresst
landlab-stac1 event, plain GeoTIFFTag assets as COG; add provenance; generalize beyond eagle-creek
fire-debrisflow-mlad-hoc, hardcoded pathsApply §3; consider renaming to reflect its role (e.g. gaia-dataprep-landslide); read solus-stac; publish outputs as STAC
landlab-debrisflowhardcoded /mnt/c pathsApply §3; de-personalize config/mmp_landslide.yaml; source inputs from STAC
landslide-digital-twincloud-native, STAC disabledEnable STAC (io.stac.enabled: true); align POLARIS layers with the soil vocabulary
da-seis-groundfailureseismic onlyWire the soil-state inputs (§4) as its first application of the reanalysis
catalogreads raw COGs, ignores STACMake it read the STAC catalogs (its own “merged inventory (maybe STAC)” TODO)
gaia-data-downloadersbroad downloads, no STACFold the useful sources (CONUS404 SMOIS/TSLB) into gaia-cli stages
awesome-gaiaempty placeholderPopulate as the curated index of these repos, grouped by DataHub / ModelHub / hazard

6. “DataHub-ready” checklist

A data-prep step is DataHub-ready when: