First let me congratulate you on creating such a valuable resource. This package is exactly what I have been looking for and I think it is going to be hugely useful for me.
I am just learning the ropes of this package and have hit a roadblock. I think perhaps this might be an probably with a dependency package, or perhaps I have not installed things correctly, but I have run out of things to try and was hoping you could offer some pointers.
I am walking through the vignette code* but when I get the location_slice function, I get errors saying the variables I would like to use aren't available, with some alternatives offered. When I use the alternative names, I get the same message with the expected variable names offered as alternatives.
*I also couldn't compile the vignettes during installation which might stem from the same problem
library(pastclim)
# data installation
# set_data_path(path_to_nc = "~/Documents/projects/pastclim_data/")
df = structure(list(Language = c("Kimaghama ", "Riantana", "Ndom ", "Mombum (Komolom)", "Koneraw ", "Marori"),
longitude = c(138.4520445, 138.4889957, 137.998408, 138.7896383, 138.3278637, 140.5149879),
latitude = c(-7.899618841, -7.526408993, -7.991955007, -8.286129011, -8.327860384, -8.538172179)),
row.names = c(NA, 6L),
class = "data.frame")
df$time_bp1 = -10000
climate_60kya = location_slice(x = df[, c("longitude", "latitude")],
time_bp = df$time_bp1,
bio_variables = c("bio01", "bio12"),
dataset = "Example",
nn_interpol = FALSE
)
# Error: [rast] BIO1 not found. Choose one of:
# //BIO1, //BIO10, //BIO12, //biome
climate_60kya = location_slice(x = df[, c("longitude", "latitude")],
time_bp = df$time_bp1,
bio_variables = c("//BIO1", "//BIO12"),
dataset = "Example",
nn_interpol = FALSE)
# Error in check_available_variable(variable, dataset) :
# //BIO1, //BIO12 not available for Example; available variables are bio01, bio10, bio12, biome
Stepping through the location_slice function, the error comes from the following line:
climate_brick <- terra::rast(this_file, subds = this_var_nc)
# Error: [rast] BIO01 not found. Choose one of:
# //BIO1, //BIO10, //BIO12, //biome
climate_brick <- terra::rast("~/Documents/projects/pastclim_data//example_climate.nc")
Warning message:
[rast] unknown extent
My conclusion then is there is either something missing from the .nc file or something else is going on. Since I get the same errors for the Beyer2020 dataset, I would guess it is something else. What could I try to figure out what is going wrong?
I am running MacOS Monterey with Apple M1 Chip.