Environmental descriptors list

Environmental descriptors dataset (58 layers). All environmental descriptors are set at a 0.1° grid-cell resolution, on the Southern Ocean extent (80°S,45°S; -180,180°). Provided as a netCDF file format. Sources and details are available in the attached metadata file.

The full metadata file, compiling data sources is available on:

How to download the data

The first steps to download the data are to define the directory in which the data will be stored. In this example, we used a temporary folder.

library(blueant)
my_data_directory <- tempdir()
config <- bb_config(local_file_root= my_data_directory)

data_name <-sources("SDM_predictors") # TO BEN: here I don't really know how I should call it?? is that OK?? should I put "SDM_source" instead of "sources"? 
config <- config %>% bb_add(data_name)

Then, once the configuration it ready, you need to launch a synchronization.

status <- bb_sync(config, verbose = TRUE) # the *verbose = TRUE* argument helps to display the progress output

Once terminated, you can access and see the content of your files using the commands:

bb_data_source_dir(config)
list.files(bb_data_source_dir(config), recursive = TRUE, full.names = TRUE)

And then you can open your data with the raster package

loaded_stack <- raster::stack(file.path(bb_data_source_dir(config), "stack_data_SDM.grd"))
# TO BEN = I still need to have a look to convert in ncdf file

# have a look at a part of the rasterStack (five first layers)
plot(subset(loaded_stack, c(1:5)))
# list of descriptors 
names(loaded_stack)
# you can drop a part of the environmental descriptors using the dropLayer function. The numbers provided in the description part correspond to the layer's order in the provided stack. 
final_stack_for_my_SDM <- raster::dropLayer(loaded_stack, c(1,4,8,12:16)) # the function removes layers 1,4,8,12,13,14,15 and 16

You can also consult the blueant vignette for further information https://github.com/AustralianAntarcticDivision/blueant/blob/master/vignettes/blueant.Rmd.