Download GABAM fire data from R

Global annual burned area maps (GABAM) of 1985-2020 from Long et al. (2019) are available for free on this site. Here’s a R script to download these data using curl package (Ooms, 2021). This script is based on multi-threading download to improve performance.

R script


gabam_download <- function(year, cell, dest){
  for(y in year){
    for(c in cell){
      url <- paste0("",
                    as.character(y),"/",c,".TIF") #ftp server 1
      dest2 <- paste0(dest,as.character(y),"_",c)
      h <- new_handle(url = url)
      multi_add(h, data=dest2)

# Example: 4 cells for 10 years

example_year <- 2010:2020
example_cell <- c("N40E000", "N40E010", "N50E000", "N50E010")
example_dest <- "C:/Users/victor_vdm/test_GABAM/"

system.time({gabam_download(example_year, example_cell, example_dest)})
#runtime = 18m33s 


Long, T.; Zhang, Z.; He, G.; Jiao, W.; Tang, C.; Wu, B.; Zhang, X.; Wang, G.; Yin, R. 30 m Resolution Global Annual Burned Area Mapping Based on Landsat Images and Google Earth Engine. Remote Sens. 2019, 11, 489.

Jeroen Ooms (2021). curl: A Modern and Flexible Web Client for R. R package version 4.3.2.