Skip to content

Commit

Permalink
drafts
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Jan 4, 2024
1 parent f768095 commit 1dee5b9
Show file tree
Hide file tree
Showing 5 changed files with 642 additions and 540 deletions.
23 changes: 19 additions & 4 deletions drafts/sst.R → contents/sst-gdal.qmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
remotes::install_github("boettiger-lab/earthdatalogin")
---
---


```{r}
#remotes::install_github("boettiger-lab/earthdatalogin")
library(earthdatalogin)
```

```{r}
edl_netrc()
urls <- edl_search(short_name = "MUR-JPL-L4-GLOB-v4.1",
temporal = c("2019-01-01", "2019-01-31"))
Expand All @@ -10,20 +18,27 @@ vrt <- function(url) {
suffix <- ":analysed_sst?a_srs=OGC:CRS84&a_ullr=-180,90,180,-90"
paste0(prefix, url, suffix)
}
```


```{r}
library(gdalcubes)
gdalcubes_options(parallel = parallel::detectCores()*2)
```

```{r}
url_dates <- as.Date(gsub(".*(\\d{8})\\d{6}.*", "\\1", urls), format="%Y%m%d")
data_gd <- gdalcubes::stack_cube(vrt(urls), datetime_values = url_dates)
```


```{r}
extent = list(left=-93, right=-76, bottom=41, top=49,
t0="2019-01-01", t1="2019-01-31")
bench::bench_time({
extent = list(left=-93, right=-76, bottom=41, top=49,
t0="2019-01-01", t1="2019-01-31")
data_gd |>
gdalcubes::crop(extent) |>
aggregate_time(dt="P1M", method="sd") |>
plot(col = viridisLite::viridis(10))
})
```
336 changes: 336 additions & 0 deletions contents/sst-xarray.ipynb

Large diffs are not rendered by default.

287 changes: 287 additions & 0 deletions drafts/xarray-benchmark.ipynb

Large diffs are not rendered by default.

262 changes: 0 additions & 262 deletions drafts/xarray-gdal-benchmark.ipynb

This file was deleted.

274 changes: 0 additions & 274 deletions drafts/xarray.ipynb

This file was deleted.

0 comments on commit 1dee5b9

Please sign in to comment.