Skip to content

Instantly share code, notes, and snippets.

@mdsumner
Last active March 21, 2025 02:26
Show Gist options
  • Save mdsumner/2634b6a72e841e62dd9a1d2080455299 to your computer and use it in GitHub Desktop.
Save mdsumner/2634b6a72e841e62dd9a1d2080455299 to your computer and use it in GitHub Desktop.

GHRSST COGs (MURSST)

https://source.coop/repositories/ausantarctic/ghrsst-mur-v2/description

library(terra)

files <- arrow::read_parquet("https://data.source.coop/ausantarctic/ghrsst-mur-v2/ghrsst-mur-v2.parquet")

## it's a STAC catalogue
f <- sprintf("/vsicurl/%s", tail(files$assets$analysed_sst$href, 1))
r <- r <- rast(f)

## need fairly recent terra for this else `project(r, rast(), by_util = TRUE)`
plot(r)
title(substr(basename(f), 1, 8))

## not fast here, could be improved for sure
str(extract(r, vect(cbind(147, c(-45, -55)), type = "l")))
#'data.frame':   1001 obs. of  2 variables:
# $ ID                                                                    : num  1 1 1 1 1 1 1 1 1 1 ...
# $ 20250315090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1_analysed_sst: num  16.7 16.7 16.7 16.7 16.7 ...
 

image

@mdsumner
Copy link
Author

with rstac on a json item

rstac::read_stac("https://data.source.coop/ausantarctic/ghrsst-mur-v2/2025/02/09/20250209090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1.stac-item.json")


###Item
- id: 20250209090000-JPL-L4_GHRSST-SSTfnd-MUR-GLOB-v02.0-fv04.1.stac-item
- collection: ghrsst-mur-v2
- bbox: xmin: -179.99500, ymin: -89.99500, xmax: 180.00500, ymax: 89.99500
- datetime: 2025-02-09T00:00:00Z
- assets: analysed_sst, analysis_error, mask, sea_ice_fraction, sst_anomaly
- item's fields: assets, bbox, collection, geometry, id, links, properties, stac_extensions, stac_version, type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment