fdetsch / MODIS

Download and processing framework for MODIS imagery. The package provides automated access to the global online data archives LP DAAC, LAADS and NSIDC as well as processing capabilities such as file conversion, mosaicking, subsetting and time series.
Other
58 stars 27 forks source link

Error in runGdal() for products MOD09GA and MOD09GQ #14

Closed rokoeh closed 7 years ago

rokoeh commented 7 years ago

Hello I'm Having trouble downloading some products from LAADS : MOD09GA, MYD09GA, MOD09GQ and MYD09GQ. The error follows:

MODISoptions(MODISserverOrder = c("LAADS", "LPDAAC")) runGdal(product="MOD09GA",tileH="13",tileV="11" ,begin="2016227", end="2016227", SDSstring="011000000000000000000", job="any", outProj="GEO", datum="WGS84", pixelSize="0.009", mosaic="FALSE") ######################## outProj = +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 pixelSize = 0.009 resamplingType = near Output Directory = D:/modis/processado//mod09ga/safra16.17 ######################## Downloading structure on 'LAADS' for: MOD09GA.006 Error in strsplit(path$remotePath$LAADS, "YYYY") : non-character argument

R version 3.2.2 (2015-08-14) -- "Fire Safety" MODIS Package Version 0.10-34

fdetsch commented 7 years ago

This should be fixed now. Please, install the latest package version via

devtools::install_github("MatMatt/MODIS", ref = "release")
library(MODIS)

and try it out once again. The underlying problem was two-fold:

For me, the following code works both on Ubuntu (R-3.3.2) and Windows (R-devel). Replacing "M*D09GA" with "M*D09GQ" works as well:

MODISoptions(MODISserverOrder = c("LAADS", "LPDAAC"))

runGdal(product="M*D09GA",tileH="13",tileV="11" ,begin="2016227",
        end="2016227", SDSstring="011000000000000000000", job="any",
        outProj="GEO", datum="WGS84", pixelSize="0.009", mosaic="FALSE")
rokoeh commented 7 years ago

Hello. Did you finished the download and processed the image? Here it tries to download from LAADS, connects successfully but the download never finishes (the download dialog box with the graphic keeps re-setting at 50%)

I tried to use lpdaacLogin but it keeps failing to connect to LPDAAC (Here Im using win7 ultimate 32 bits)

lpdaacLogin(server = "LPDAAC") Creating hidden file '~/.netrc' with login credentials... Insert your Earthdata USERNAME: "rokoeh" Insert your Earthdata PASSWORD: "****"

I used quoted and unquoted user and password

MODISoptions(MODISserverOrder = c("LPDAAC"))

STORAGE:


localArcPath : D:/modis/hdf_data/ outDirPath : D:/modis/processado/

DOWNLOAD:


MODISserverOrder : LPDAAC dlmethod : auto stubbornness : high

PROCESSING:


GDAL : GDAL 1.11.1, released 2014/09/24 MRT : Version 4.1 (March 2011) pixelSize : asIn outProj : asIn resamplingType : NN dataFormat : GTiff

runGdal(product="M*D09GA",tileH="13",tileV="11" ,begin="2016227", end="2016227", SDSstring="011000000000000000000", job="any", outProj="GEO", datum="WGS84", pixelSize="0.009", mosaic="FALSE") ######################## outProj = +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 pixelSize = 0.009 resamplingType = near Output Directory = D:/modis/processado//any ######################## Local structure is up-to-date. Using offline information! MOD09GA.A2016227.h13v11.005.2016229192028.hdf is corrupted, trying to re-download it!

Getting file from: LPDAAC ############################ Remote connection failed! Re-try: 1 Getting file from: LPDAAC ############################ Remote connection failed! Re-try: 2 Getting file from: LPDAAC ############################ Remote connection failed! Re-try: 3 Getting file from: LPDAAC ############################ Remote connection failed! Re-try: 4 Getting file from: LPDAAC

Maybe it is just in my computer or network. Tomorrow I'll try in another machine.

Thanks

fdetsch commented 7 years ago

Yeah, I finished both the download and the subsequent processing. On Windows, the download bar was repeatedly set back to 50%, as you say -- but in the end (i.e., after some time), it all worked out fine. Maybe wait a little longer?

rokoeh commented 7 years ago

Waited more and it worked just fine!

Solved

Thanks.