Browser API demo
sciwrid-toolkit/api — functional demo
Calls scan, extract, extractOutput from
sciwrid-api.js directly. Open the browser console to see every result logged.
1. Pick a file
GRIB2 (.grb2 / .grib2), NetCDF3 (.nc3), NetCDF4 / HDF5 (.nc), or Zarr v2 (zipped store, .zip / .zarr)2. Scan — list variables [0..20]
await scan(file)(no scan yet)
3. Extract a variable
await extract(file, { variable, lat, lon })
ISO-8601 or
YYYY-MM-DD (date-only covers the whole day). Both → range; one → nearest. Blank → all timesteps. Overrides time index.
(no extract yet)
4. Extract grid (bbox) — parallel worker pool
await extractGrid(file, { variable, bbox, width, height, workers, signal, onProgress })Spawns up to N workers (default 5); each handles a row band. Result is rendered as a heatmap.
(no grid yet)
5. Trim — same-format file trimming
await trim(file, { variables, t1, t2, bbox })Byte-cut for GRIB2 / NetCDF3 / Zarr where possible. h5wasm writer for NetCDF4. Bbox trim is supported for Zarr / NetCDF4 / TIFF. Stored and DEFLATE-compressed Zarr zip entries are supported.
(no trim yet)