#set path to EBV netCDF
file <- system.file(file.path("extdata","test.nc"), package="ebvcube")
#get all datacubepaths of EBV netCDF
datacubepaths <- ebv_datacubepaths(file, verbose=FALSE)
#set path to GeoTiff with data
tif <- system.file(file.path("extdata","entity1.tif"), package="ebvcube")
# add data to the timestep 1, 2 and 3 using the first three bands of the GeoTiff
if (FALSE) {
#use datacubepath argument and define timestep by integer
ebv_add_data(filepath_nc = file, datacubepath = datacubepaths[1,1],
entity = 1, timestep = 1:3, data = tif, band = 1:3)
#use metric argument and define timestep by ISO-format
ebv_add_data(filepath_nc = file, entity = 1,
timestep = paste0(as.character(seq(1900,1920,10)), '-01-01'),
metric = 1, data = tif, band = 1:3, verbose = FALSE)
}
Run the code above in your browser using DataLab