-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60057d1
commit d6db95f
Showing
15 changed files
with
38 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Generate terrain variables for 2028 EFH review | ||
# Sean Rohan <[email protected]> | ||
# March 26, 2024 | ||
# January 7, 2025 | ||
|
||
library(akgfmaps) | ||
library(MultiscaleDTM) # last run: version 0.8.3 | ||
|
@@ -43,20 +43,40 @@ curvature_slope_dtm_100m <- MultiscaleDTM::Qfit(r = bathy_100m, | |
start2 <- Sys.time() | ||
difftime(start2, start1) | ||
|
||
bpi_dtm_100m <- MultiscaleDTM::BPI(r = bathy_100m, | ||
bpi_dtm_3_64_100m <- MultiscaleDTM::BPI(r = bathy_100m, | ||
w = bpi_w, | ||
unit = "cell", # Units for window | ||
stand = "none", | ||
na.rm = TRUE | ||
) | ||
|
||
bpi_dtm_15_64_100m <- MultiscaleDTM::BPI(r = bathy_100m, | ||
w = c(15, 64), | ||
unit = "cell", # Units for window | ||
stand = "none", | ||
na.rm = TRUE | ||
) | ||
|
||
bpi_dtm_30_124_100m <- MultiscaleDTM::BPI(r = bathy_100m, | ||
w = c(30, 124), | ||
unit = "cell", # Units for window | ||
stand = "none", | ||
na.rm = TRUE | ||
) | ||
|
||
end2 <- Sys.time() | ||
difftime(start2, end2) | ||
|
||
# Write 100-m rasters to GeoTIFF files ---- | ||
|
||
writeRaster(bpi_dtm_100m, | ||
here::here("analysis", "efh_bathymetry_2028", "output", "terrain", "efh_bpi_100m.tif"), | ||
writeRaster(bpi_dtm_3_64_100m, | ||
here::here("analysis", "efh_bathymetry_2028", "output", "terrain", "efh_bpi_3_64_100m.tif"), | ||
overwrite = TRUE) | ||
writeRaster(bpi_dtm_15_64_100m, | ||
here::here("analysis", "efh_bathymetry_2028", "output", "terrain", "efh_bpi_15_64_100m.tif"), | ||
overwrite = TRUE) | ||
writeRaster(bpi_dtm_30_124_100m, | ||
here::here("analysis", "efh_bathymetry_2028", "output", "terrain", "efh_bpi_30_124_100m.tif"), | ||
overwrite = TRUE) | ||
writeRaster(curvature_slope_dtm_100m$meanc, | ||
here::here("analysis", "efh_bathymetry_2028", "output", "terrain", "efh_dtm_meancurv_100m.tif"), | ||
|
@@ -82,19 +102,29 @@ writeRaster(slope_t_100m, | |
|
||
|
||
# Resample 100-m rasters to 1-km resolution ---- | ||
bpi_dtm_3_64_1km <- terra::aggregate(bpi_dtm_3_64_100m, fact = 10, fun = "mean") | ||
|
||
bpi_dtm_15_64_1km <- terra::aggregate(bpi_dtm_15_64_100m, fact = 10, fun = "mean") | ||
|
||
bpi_dtm_30_124_1km <- terra::aggregate(bpi_dtm_30_124_100m, fact = 10, fun = "mean") | ||
|
||
slope_t_1km <- terra::aggregate(slope_t_100m, fact = 10, fun = "mean") | ||
|
||
slope_aspect_dtm_1km <- terra::aggregate(slope_aspect_dtm_100m, fact = 10, fun = "mean") | ||
|
||
curvature_slope_dtm_1km <- terra::aggregate(curvature_slope_dtm_100m, fact = 10, fun = "mean") | ||
|
||
bpi_dtm_1km <- terra::aggregate(bpi_dtm_100m, fact = 10, fun = "mean") | ||
|
||
|
||
# Write 1-km rasters to GeoTIFF files ---- | ||
|
||
writeRaster(bpi_dtm_1km, | ||
here::here("analysis", "efh_bathymetry_2028", "output", "terrain", "efh_bpi_1km.tif"), | ||
writeRaster(bpi_dtm_3_64_1km, | ||
here::here("analysis", "efh_bathymetry_2028", "output", "terrain", "efh_bpi_3_64_1km.tif"), | ||
overwrite = TRUE) | ||
writeRaster(bpi_dtm_15_64_1km, | ||
here::here("analysis", "efh_bathymetry_2028", "output", "terrain", "efh_bpi_15_64_1km.tif"), | ||
overwrite = TRUE) | ||
writeRaster(bpi_dtm_30_124_1km, | ||
here::here("analysis", "efh_bathymetry_2028", "output", "terrain", "efh_bpi_30_124_1km.tif"), | ||
overwrite = TRUE) | ||
writeRaster(curvature_slope_dtm_1km$meanc, | ||
here::here("analysis", "efh_bathymetry_2028", "output", "terrain", "efh_dtm_meancurv_1km.tif"), | ||
|
Binary file not shown.
26 changes: 0 additions & 26 deletions
26
analysis/efh_bathymetry_2028/output/terrain/efh_bpi_1km.tif.aux.xml
This file was deleted.
Oops, something went wrong.
Binary file modified
BIN
+7.64 KB
(100%)
analysis/efh_bathymetry_2028/plots/BPI/BPI_Bathy_Nazan_Bay_100m.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.37 KB
(99%)
analysis/efh_bathymetry_2028/plots/BPI/BPI_Bathy_Nazan_Bay_1km.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-900 Bytes
(100%)
analysis/efh_bathymetry_2028/plots/BPI/BPI_Bathy_Nazan_Bay_2023_method.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-149 KB
(73%)
analysis/efh_bathymetry_2028/plots/BPI/BPI_Bathy_Norton_Sounds_100m.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-25.6 KB
(94%)
analysis/efh_bathymetry_2028/plots/BPI/BPI_Bathy_Norton_Sounds_1km.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+304 KB
(4100%)
analysis/efh_bathymetry_2028/plots/BPI/BPI_Bathy_Norton_Sounds_2023_method.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+208 KB
(130%)
analysis/efh_bathymetry_2028/plots/BPI/BPI_Bathy_Pribilof_Islands_100m.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-5.6 KB
(98%)
analysis/efh_bathymetry_2028/plots/BPI/BPI_Bathy_Pribilof_Islands_1km.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+21 Bytes
(100%)
analysis/efh_bathymetry_2028/plots/BPI/BPI_Bathy_Pribilof_Islands_2023_method.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+782 KB
analysis/efh_bathymetry_2028/plots/BPI/BPI_Bathy_RKC_Savings_Area_100m.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+26.6 KB
(110%)
analysis/efh_bathymetry_2028/plots/BPI/BPI_Bathy_RKC_Savings_Area_1km.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+11.6 KB
(100%)
analysis/efh_bathymetry_2028/plots/BPI/BPI_Bathy_RKC_Savings_Area_2023_method.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.