ropensci / MODIStsp

An "R" package for automatic download and preprocessing of MODIS Land Products Time Series
https://docs.ropensci.org/MODIStsp
GNU General Public License v3.0
155 stars 51 forks source link

Username and/or password are not valid #179

Closed yhhuang0324 closed 4 years ago

yhhuang0324 commented 4 years ago

I tried to download NDVI and EVI (M*D13Q1). However, each time it came out with an error message: "Error in MODIStsp_download(modislist, out_folder_mod, download_server, : Username and/or password are not valid. Please provide valid ones!" Since the ftp is no longer an option, is there any way that I can download the data? Or can you tell me where I can download HDF files and process it with MODIStsp?

lbusett commented 4 years ago

@yhhuang0324

Hi,

did you specify correct username and password in the GUI? Username and password should correspond to your earthdata credentials (https://urs.earthdata.nasa.gov/)

Lorenzo

BTW: are you trying to use MODItsp_download as a standalone function?

yhhuang0324 commented 4 years ago

@lbusett Thank you. I found out I just used the wrong password. Thank you for the response and thank you for this package!

StefanoMezzini commented 2 years ago

Hi,

I'm trying to download NDVI rasters for the world with the following code

MODIStsp(gui = FALSE, # don't use the graphic user interface
         out_folder = 'data/ndvi-rasters/world', # where to save rasters
         selprod = 'Vegetation_Indexes_16Days_1Km (M*D13A2)', # product name
         bandsel = 'NDVI', # select NDVI band only
         quality_bandsel = 'QA_usef',
         indexes_bandsel = 'SR',
         user = USERNAME, # earthdata username
         password = PASSWORD, # earthdata password
         start_date = '2020.06.01', # beginning of the time series
         end_date = '2020.06.20', # end date of the time series
         verbose = TRUE, # print progress
         parallel = FALSE) # do not run in parallel

but I am getting the following error message

GDAL version in use: 3.4.3
[Tue Aug  9 08:26:09 2022] MODIStsp --> Starting processing
[Tue Aug  9 08:26:09 2022] Accessing http server at:  https://e4ftl01.cr.usgs.gov/MOLT/MOD13A2.006/
[Tue Aug  9 08:26:10 2022] Retrieving list of available ` Terra ` Files for Year 2020
Error in MODIStsp_download(modislist, proc_opts$out_folder_mod, download_server,  : 
  Username and/or password are not valid. Please provide
             valid ones!

using MODIStsp 2.0.8 with the following sessionInfo():

R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] MODIStsp_2.0.8

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9          compiler_4.2.1      pillar_1.8.0        xts_0.12.1         
 [5] bitops_1.0-7        class_7.3-20        tools_4.2.1         lattice_0.20-45    
 [9] jsonlite_1.8.0      lifecycle_1.0.1     tibble_3.1.8        pkgconfig_2.0.3    
[13] rlang_1.0.4         DBI_1.1.3           cli_3.3.0           rstudioapi_0.13    
[17] curl_4.3.2          parallel_4.2.1      terra_1.6-7         e1071_1.7-11       
[21] xml2_1.3.3          stringr_1.4.0       dplyr_1.0.9         httr_1.4.3         
[25] raster_3.5-21       generics_0.1.3      vctrs_0.4.1         gdalUtilities_1.2.1
[29] classInt_0.4-7      grid_4.2.1          tidyselect_1.1.2    glue_1.6.2         
[33] data.table_1.14.2   sf_1.0-8            R6_2.5.1            fansi_1.0.3        
[37] sp_1.5-0            purrr_0.3.4         magrittr_2.0.3      codetools_0.2-18   
[41] units_0.8-0         assertthat_0.2.1    KernSmooth_2.23-20  utf8_1.2.2         
[45] stringi_1.7.8       proxy_0.4-27        zoo_1.8-10

I am certain USERNAME and PASSWORD are correct because I've used them to log into https://urs.earthdata.nasa.gov/

ranghetti commented 2 years ago

@StefanoMezzini see #256 (update the package from Github using the command remotes::install_github("ropensci/MODIStsp") ).