Closed safalabolo closed 6 years ago
It's true that data download from NTSG is currently not working. I'll have a look into it!
However, in the long term, we must also ask ourselves whether a continued support for NTSG products still makes sense, not least because MOD16 (MOD17) have not been updated since 2015 (2016), and hence originate from an outdated collection anyway.
In the meantime, please mind that MOD16 Collection 6 data download has been made available through the recent release of MODIS-1.1.2.
# install.packages("MODIS")
library(MODIS)
getProduct("MOD16")
MOD16A2 the Composites Tile Evapotranspiration product from MODIS Terra with a ground resolution of 500 m MOD16A3 the Annually Tile Evapotranspiration product from MODIS Terra with a ground resolution of 500 m
In order to disable data download from NTSG, and hence get the whole thing going, just do the following:
MODISoptions(MODISserverOrder = "LPDAAC") # remember to run lpdaacLogin() before
hdf = getHdf("MOD16A2", begin = "2017.01.01", end = "2017.01.10"
, tileH = 21, tileV = 8)
hdf
$MOD16A2.006 [1] "D:/Data/MODIS\~1/MODIS/MOD16A2.006/201701\~1.01/MOD16A2.A2017001.h21v08.006.2017059143957.hdf" [2] "D:/Data/MODIS\~1/MODIS/MOD16A2.006/201701\~1.09/MOD16A2.A2017009.h21v08.006.2017059165141.hdf"
Dear Florian, thank you very much for your feedback. It's all clear and shareable. Best Regards.
Unfortunately, following your instructions the connection attempt goes the loop
the credentials for lpdaac I think are the same for access to earthdata data? https://urs.earthdata.nasa.gov/home
I attach the result of the run All the best result.txt
Yeah, login credentials are the ones from Earthdata.
As regards the reported behavior, do you have wget and/or curl installed? As described in ?MODISoptions
,
In order to download MODIS files from LPDAAC, please note that either wget (default) or curl must be installed and made available through the PATH environmental variable.
Dear Florian, I enclose what has been done so far:
1)The curl has been installed and is working:
2)If I repeat your operations I have the following error message:
library(MODIS) Carico il pacchetto richiesto: mapdata Carico il pacchetto richiesto: maps Carico il pacchetto richiesto: raster Carico il pacchetto richiesto: sp Warning messages: 1: package ‘MODIS’ was built under R version 3.3.3 2: package ‘maps’ was built under R version 3.3.3 3: package ‘raster’ was built under R version 3.3.3 4: package ‘sp’ was built under R version 3.3.3 getProduct("MOD16") MOD16A2 the Composites Tile Evapotranspiration product from MODIS Terra with a ground resolution of 500 m MOD16A3 the Annually Tile Evapotranspiration product from MODIS Terra with a ground resolution of 500 m lpdaacLogin() Creating hidden file '~/.netrc' with login credentials... Insert your Earthdata USERNAME: **** Insert your Earthdata PASSWORD: **** MODISoptions(MODISserverOrder = "LPDAAC")
STORAGE:
localArcPath : C:/Users/Salvatore/Desktop/2018_quique/MODIS_ARC/ outDirPath : C:/Users/Salvatore/Desktop/2018_quique/PROCESSED/
DOWNLOAD:
MODISserverOrder : LPDAAC dlmethod : curl stubbornness : high wait : 0.5 quiet : FALSE
PROCESSING:
GDAL : GDAL 1.7.0b2, FWTools 2.4.7, released 2010/01/19 MRT : Version 4.1 (March 2011) pixelSize : asIn outProj : asIn resamplingType : NN dataFormat : GTiff
hdf = getHdf("MOD16A2", begin = "2017.01.01", end = "2017.01.10" , tileH = 21, tileV = 8) Updating collection from LPDAAC for product: MOD16A2 Error in dirs[ids] : invalid subscript type 'list'
Thank You very much for Your feedback! All the Best S.
Dear Florian, the problem I had was solved! Thanks again for the support!! King Regards Salvatore
Hi Salvatort and Florian I am having similar problems, in particular, the urs.earthdata.nasa.gov fails to authenticate me: Resolving urs.earthdata.nasa.gov (urs.earthdata.nasa.gov)... 198.118.243.33 Connecting to urs.earthdata.nasa.gov (urs.earthdata.nasa.gov)|198.118.243.33|:443... connected. HTTP request sent, awaiting response... 401 Unauthorized
Username/Password Authentication Failed. Remote connection failed! Re-try: 7 Getting file from: LPDAAC
I am sure I have the right username and password set (I tested it on the earthdata login and checked for typos in .netrc) I am simply testing this script: MODISoptions(MODISserverOrder = "LPDAAC")
product = "MOD16A2" lpdaacLogin(server="LPDAAC")
hdf = getHdf("MOD16A2", begin = "2017.01.01", end = "2017.01.10" , tileH = 21, tileV = 8)
Any clues would be great.
Hello, everyone.
I am also trying to download MOD16A2 data in R script and I came across exactly the same problem with Safalabolo and Willem (Username/Password Authentication Failed. Remote connection failed! Re-try: 1 ), even if I have successfully installed wget.
Dear Safalabolo, Could you please share how you finally solve this problem?
Thanks and best regards,
Lynette
When I run the getHdf and getCollection function, there is also an error returned. " Error in dirs[ids]: invalid subscript type 'list'." Any who could possibly share how to solve it? Thanks!
Using the develop version, getCollection()
works as expected:
> getCollection("MOD16A2", forceCheck = TRUE)
Updating collection from LPDAAC for product: MOD16A2
$`MOD16A2`
[1] "006"
Sorry, I cannot test getHdf()
right now. I'll report back on the results later!
Using the newest develop version,
hdf = getHdf("MOD16A2", begin = "2017.01.01", end = "2017.01.10"
, tileH = 21, tileV = 8)
retrieves the desired data:
> hdf
$`MOD16A2.006`
[1] "C:/.../MODIS_~1/MODIS/MOD16A2.006/2017.01.01/MOD16A2.A2017001.h21v08.006.2017059143957.hdf"
[2] "C:/.../MODIS_~1/MODIS/MOD16A2.006/2017.01.09/MOD16A2.A2017009.h21v08.006.2017059165141.hdf"
. Note that MOD16A2.006 is now available from both LAADS and LP DAAC. However, it seems like the product series no longer receives updates on NTSG, which is why this download server is no longer supported by MODIS.
To download the data MOD16A2 collection 5 of NTSG, it appears that the site is gone, and everything is through http now:apparently the files are available only through http://files.ntsg.umt.edu
Also interesting is the collection 6 of the same product, of NASA and 500 km: https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table/mod16a2_v006...as it would be possible to add this collection to the MODIS package.
Thank in advance for your reply