## marine-atlas

One folder per **MST release** (`v1` … `v8`), plus three registry files that
describe what exists. Releases are immutable; the registry is what changes.

| file | what it settles |
|---|---|
| `latest.txt` | the promoted release — what an app shows when the URL says nothing |
| `versions.json` | every release, its status (`released` / `prerelease` / `retired`) and date |
| `{ver}/manifest.json` | everything needed to *render* that release |

**Resolve the current release, then read its manifest:**

```bash
VER=$(curl -s https://storage.marinesensitivity.org/marine-atlas/latest.txt)
curl -s https://storage.marinesensitivity.org/marine-atlas/$VER/manifest.json | jq .
```

```r
# R
remotes::install_github("MarineSensitivity/msens")
m <- msens::atlas_manifest()          # "latest"; or atlas_manifest("v7")
m$capabilities; head(m$metrics)
```

**Do not hardcode a version** in anything you want to keep working — resolve
`latest.txt`. Pin one deliberately (`v7`) when you need reproducibility.

`cog/` is shared by every release: rasters are content-addressed, so a surface
that did not change between releases is stored once and referenced by both.

### Finding data without browsing

This bucket denies anonymous listing, so **do not** try to enumerate it — query
a catalog instead.

**STAC API** (searchable, spatial) — one Item per model, with its raster as an
asset: <https://stac-api.marinesensitivity.org>

```r
# R: rstac
library(rstac)
s <- stac("https://stac-api.marinesensitivity.org")
it <- s |> stac_search(bbox = c(-98, 25, -80, 31), limit = 5) |> get_request()
it$features[[1]]$assets                      # -> COG href, readable via /vsicurl
```

```python
# Python: pystac-client
from pystac_client import Client
cat = Client.open("https://stac-api.marinesensitivity.org")
items = cat.search(bbox=[-98, 25, -80, 31], limit=5).item_collection()
print(items[0].assets)
```

```bash
# plain HTTP
curl -s "https://stac-api.marinesensitivity.org/search?bbox=-98,25,-80,31&limit=2" | jq '.features[].assets'
```

**Parquet tables** (tabular, exact) — resolve a species or metric to its raster
via `{ver}/tables/model_asset.parquet` or `score_cog.parquet`, then read the COG
in place with GDAL:

```bash
gdalinfo /vsicurl/<cog_url>
gdal_translate /vsicurl/<cog_url> local.tif -projwin -98 31 -80 25
```

