Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Jan 7, 2024
2 parents 5a3fe38 + a09b14e commit a37f198
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions _freeze/contents/sst-gdal/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"hash": "325495f543bbba38088f42cbf3a763ca",
"hash": "8b84a57c90b74209210361781dfbb060",
"result": {
"markdown": "---\n---\n\n\n\n::: {.cell}\n\n```{.r .cell-code}\n#remotes::install_github(\"boettiger-lab/earthdatalogin\")\nlibrary(earthdatalogin)\n```\n:::\n\n::: {.cell}\n\n```{.r .cell-code}\nedl_netrc()\nurls <- edl_search(short_name = \"MUR-JPL-L4-GLOB-v4.1\",\n temporal = c(\"2019-01-01\", \"2019-01-31\"))\n\n\nvrt <- function(url) {\n prefix <- \"vrt://NETCDF:/vsicurl/\"\n suffix <- \":analysed_sst?a_srs=OGC:CRS84&a_ullr=-180,90,180,-90\"\n paste0(prefix, url, suffix)\n}\n```\n:::\n\n::: {.cell}\n\n```{.r .cell-code}\nlibrary(gdalcubes)\ngdalcubes_options(parallel = parallel::detectCores()*2)\n```\n:::\n\n::: {.cell}\n\n```{.r .cell-code}\nurl_dates <- as.Date(gsub(\".*(\\\\d{8})\\\\d{6}.*\", \"\\\\1\", urls), format=\"%Y%m%d\")\ndata_gd <- gdalcubes::stack_cube(vrt(urls), datetime_values = url_dates)\n```\n:::\n\n::: {.cell}\n\n```{.r .cell-code}\nextent = list(left=-93, right=-76, bottom=41, top=49,\n t0=\"2019-01-01\", t1=\"2019-01-31\")\n\nbench::bench_time({\n data_gd |> \n gdalcubes::crop(extent) |> \n aggregate_time(dt=\"P1M\", method=\"sd\") |> \n plot(col = viridisLite::viridis(10))\n})\n```\n\n::: {.cell-output-display}\n![](sst-gdal_files/figure-html/unnamed-chunk-6-1.png){width=672}\n:::\n\n::: {.cell-output .cell-output-stdout}\n```\nprocess real \n 9.31s 3.42m \n```\n:::\n:::",
"markdown": "---\n---\n\n\n\n::: {.cell}\n\n```{.r .cell-code}\n#remotes::install_github(\"boettiger-lab/earthdatalogin\")\nlibrary(earthdatalogin)\n```\n:::\n\n::: {.cell}\n\n```{.r .cell-code}\nedl_netrc()\nurls <- edl_search(short_name = \"MUR-JPL-L4-GLOB-v4.1\",\n temporal = c(\"2020-01-01\", \"2021-12-31\"))\n\n\nvrt <- function(url) {\n prefix <- \"vrt://NETCDF:/vsicurl/\"\n suffix <- \":analysed_sst?a_srs=OGC:CRS84&a_ullr=-180,90,180,-90\"\n paste0(prefix, url, suffix)\n}\n```\n:::\n\n::: {.cell}\n\n```{.r .cell-code}\nlibrary(gdalcubes)\ngdalcubes_options(parallel = parallel::detectCores()*2)\n```\n:::\n\n::: {.cell}\n\n```{.r .cell-code}\nurl_dates <- as.Date(gsub(\".*(\\\\d{8})\\\\d{6}.*\", \"\\\\1\", urls), format=\"%Y%m%d\")\ndata_gd <- gdalcubes::stack_cube(vrt(urls), datetime_values = url_dates)\n```\n:::\n\n::: {.cell}\n\n```{.r .cell-code}\nextent = list(left=-93, right=-76, bottom=41, top=49,\n t0=\"2020-01-01\", t1=\"2021-12-31\")\n\nbench::bench_time({\n data_gd |> \n gdalcubes::crop(extent) |> \n aggregate_time(dt=\"P1M\", method=\"sd\") |> \n plot(col = viridisLite::viridis(10))\n})\n```\n\n::: {.cell-output-display}\n![](sst-gdal_files/figure-html/unnamed-chunk-6-1.png){width=672}\n:::\n\n::: {.cell-output .cell-output-stdout}\n```\nprocess real \n 24.2s 14.5m \n```\n:::\n:::",
"supporting": [
"sst-gdal_files"
],
Expand Down
Binary file not shown.
Binary file modified _freeze/contents/sst-gdal/figure-html/unnamed-chunk-6-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions contents/sst-gdal.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ library(earthdatalogin)
```{r}
edl_netrc()
urls <- edl_search(short_name = "MUR-JPL-L4-GLOB-v4.1",
temporal = c("2019-01-01", "2019-01-31"))
temporal = c("2020-01-01", "2021-12-31"))
vrt <- function(url) {
Expand All @@ -53,7 +53,7 @@ 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")
t0="2020-01-01", t1="2021-12-31")
bench::bench_time({
data_gd |>
Expand Down

0 comments on commit a37f198

Please sign in to comment.