-
Notifications
You must be signed in to change notification settings - Fork 0
/
gebco_2024.Rmd
54 lines (42 loc) · 1.5 KB
/
gebco_2024.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
title: "GEBCO_2024 issue"
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
We have encountered a small patch of surprising values south of Long Island, NY, USA. We downloaded the [GEBCO_2024 Grid (ice surface elevation)](https://www.gebco.net/data_and_products/gridded_bathymetry_data/) as zipped NetCDF, and then decompressed it.
Citation: GEBCO Compilation Group (2024) GEBCO 2024 Grid (doi:10.5285/1c44ce99-0a0d-5f4f-e063-7086abc0ea0f)
```{r}
suppressPackageStartupMessages({
library(stars)
library(sf)
library(wk)
library(rnaturalearth)
library(topotools)
library(dplyr)
})
coast = rnaturalearth::ne_coastline(scale = "medium", returnclass = "sf")
BB = c(xmin = -74.9, xmax = -65, ymin = 38.8, ymax = 46)
gebco = topotools::read_gebco(bb = BB)
```
Next define a small study region where we have discovered a possible issue.
```{r}
bb = c(xmin = -71, ymin = 40, xmax = -70.5, ymax = 40.5) |>
sf::st_bbox(crs = 4326) |>
sf::st_as_sfc()
plot(gebco, axes = TRUE, reset = FALSE, main = "GEBCO 2024")
plot(sf::st_geometry(coast), col = "orange", add = TRUE)
plot(bb, add = TRUE, border = "green")
```
Below we zoom in on the region. We can see some linear interpolation features, but the small cluster of white pixels are particularly distinctive.
```{r}
subset = gebco[bb]
plot(subset, axes = TRUE)
```
And here are interpolated coordinates and elevations for pixels at or above 0m.
```{r}
x = as.data.frame(subset) |>
dplyr::filter(z >= 0) |>
print()
```