get_LAI_links: get_LAI.R This is a function download maps download the LAI...

View source: R/get_LAI.R

get_LAI_linksR Documentation

Description

get_LAI.R This is a function download maps download the LAI 300m images from the Copernicus Vito portal.

Usage

get_LAI_links(
  user_VITO = NA,
  pass_VITO = NA,
  destfile = NA,
  start_date = NA,
  end_date = NA
)

Arguments

user_VITO

user name from the Copernicus Vito portal

pass_VITO

password from the Copernicus Vito portal

destfile

directory to download the file e.g. D:/data/lai/

start_date

start date of the images , e.g. "2017-12-01"

end_date

end date of the images

Value

list with links to download .nc file in a folder

Examples

LAI_links <- get_LAI_links(user_VITO = 'your_user_name',
                           pass_VITO = '123456',
                           destfile = "D:/Data-Modelling/",
                           start_date = "2017-12-01",
                           end_date = "2022-09-20")

# download the images
for (i in 1:length(LAI_links)) {
               download.file(LAI_links[[1]][i],
               destfile = paste0("D:/Data-Modelling/LAI/",
                                 "LAI_", LAI_links[[2]][i],"_", i,".nc"),
               method="curl")
}


AlbyDR/rSCOPE documentation built on Dec. 19, 2024, 7:29 p.m.