download the modis data via Appeears
Posted: Mon Jul 25, 2022 4:27 pm America/New_York
I have tried to download modis data with R script below. I had no problem downloading the files but now I can get the following error messages.
I would appreciate it if anyone helps me out.
dataPath <- "C:/Project/Columbia_SWAT/NHD_YRB_SWAT/codes/MODIS_Fire/data/et"
downloadList <-"C:/Project/Columbia_SWAT/NHD_YRB_SWAT/codes/MODIS_Fire/data/et/YRBETPET20002022-download-list.txt"
filesl <- scan(downloadList, what='list', sep='\n')
Read 5060 items
> for (d in 1:length(filesl)){
+
+
+ curl_download(url=filesl[d], destfile=paste0(dataPath,"/",basename(filesl[d])),quiet =F, handle =new_handle())
+ Sys.sleep(1)
+ # print(paste0('Downloading source data (Step 1 of 6): ',round(d /length(filesl) * 100, digits=2),'%'))
+ print(d/length(filesl))
+ }
[100%] Downloaded 138 bytes...
Error in curl_download(url = filesl[d], destfile = paste0(dataPath, "/", :
HTTP error 403.
>
I would appreciate it if anyone helps me out.
dataPath <- "C:/Project/Columbia_SWAT/NHD_YRB_SWAT/codes/MODIS_Fire/data/et"
downloadList <-"C:/Project/Columbia_SWAT/NHD_YRB_SWAT/codes/MODIS_Fire/data/et/YRBETPET20002022-download-list.txt"
filesl <- scan(downloadList, what='list', sep='\n')
Read 5060 items
> for (d in 1:length(filesl)){
+
+
+ curl_download(url=filesl[d], destfile=paste0(dataPath,"/",basename(filesl[d])),quiet =F, handle =new_handle())
+ Sys.sleep(1)
+ # print(paste0('Downloading source data (Step 1 of 6): ',round(d /length(filesl) * 100, digits=2),'%'))
+ print(d/length(filesl))
+ }
[100%] Downloaded 138 bytes...
Error in curl_download(url = filesl[d], destfile = paste0(dataPath, "/", :
HTTP error 403.
>