Skip to content

Commit 6886779

Browse files
Iss5 (#11)
* adding ncdf4 package to the list to be compatible with GSDE dataset files * adding GSDE script, adjustments in the main calling script, adding necessary documentation * correcting typo in the subsetting part - to
1 parent 9831f9e commit 6886779

File tree

5 files changed

+711
-1
lines changed

5 files changed

+711
-1
lines changed

assets/renv.lock

100755100644
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,14 @@
160160
"nlme"
161161
]
162162
},
163+
"ncdf4": {
164+
"Package": "ncdf4",
165+
"Version": "1.19",
166+
"Source": "Repository",
167+
"Repository": "CRAN",
168+
"Hash": "7c902f18c0be04c8767b94019ffe8063",
169+
"Requirements": []
170+
},
163171
"nlme": {
164172
"Package": "nlme",
165173
"Version": "3.1-153",

assets/stats.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,14 @@ Sys.getenv("R_LIBS_USER")
4141
install.packages(renv_source_package, repos=NULL, type="source", quiet=TRUE);
4242
renv::activate(virtual_env_path);
4343
renv::restore(lockfile=lockfile_path, prompt=FALSE);
44+
print('here!')
4445

4546
# produce necessary stats and print a csv file
46-
r <- raster::raster(vrt_path);
47+
if (tools::file_ext(vrt_path) == 'nc') {
48+
r <- terra::rast(vrt_path)
49+
} else {
50+
r <- raster::raster(vrt_path);
51+
}
4752
p <- sf::st_read(shapefile_path, quiet=TRUE);
4853

4954
# check the CRS of the shapefile

extract-gis.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,11 @@ case "${geotiff,,}" in
325325
call_processing_func "$(dirname $0)/modis/modis.sh"
326326
;;
327327

328+
# GSDE
329+
"gsde")
330+
call_processing_func "$(dirname $0)/gsde/gsde.sh"
331+
;;
332+
328333
# Depth to Bedrock
329334
"depth-to-bedrock" | "depth_to_bedrock" | "dtb" | "depth-to_bedrock" | "depth_to_bedrock")
330335
call_processing_func "$(dirname $0)/depth_to_bedrock/depth_to_bedrock.sh"

0 commit comments

Comments
 (0)