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 downloading MOD10 data #62

Closed bcosentino closed 5 years ago

bcosentino commented 5 years ago

Thanks for offering this great resource. I'm unable to download MOD10 data when using runGdal but have no trouble with other MODIS datasets. I tried downloading MOD10A2 using code from a previously resolved issue:

> library(MODIS)
Loading required package: mapdata
Loading required package: maps
Loading required package: raster
Loading required package: sp
> getProduct("M.D10|M.D29")
MOD10_L2 the 5 Minute Swath Snow Cover product from MODIS Terra with a ground resolution of 500 m 
MOD10A1 the Daily Tile Snow Cover product from MODIS Terra with a ground resolution of 500 m 
MOD10A2 the Composites Tile Snow Cover product from MODIS Terra with a ground resolution of 500 m 
MOD10C1 the Daily CMG Snow Cover product from MODIS Terra with a ground resolution of 0.05 deg 
MOD10C2 the Composites CMG Snow Cover product from MODIS Terra with a ground resolution of 0.05 deg 
MOD10CM the Monthly CMG Snow Cover product from MODIS Terra with a ground resolution of 0.05 deg 
MOD29 the 5 Minute Swath Sea Ice Extent product from MODIS Terra with a ground resolution of 1000 m 
MOD29E1D the Daily Tile Sea Ice Extent and IST EASE-Grid Day product from MODIS Terra with a ground resolution of 4000 m 
MOD29P1D the Daily Tile Sea Ice Extent EASE-Grid Day product from MODIS Terra with a ground resolution of 1000 m 
MOD29P1N the Daily Tile Sea Ice Extent EASE-Grid Night product from MODIS Terra with a ground resolution of 1000 m 
MYD10_L2 the 5 Minute Swath Snow Cover product from MODIS Aqua with a ground resolution of 500 m 
MYD10A1 the Daily Tile Snow Cover product from MODIS Aqua with a ground resolution of 500 m 
MYD10A2 the Composites Tile Snow Cover product from MODIS Aqua with a ground resolution of 500 m 
MYD10C1 the Daily CMG Snow Cover product from MODIS Aqua with a ground resolution of 0.05 deg 
MYD10C2 the Composites CMG Snow Cover product from MODIS Aqua with a ground resolution of 0.05 deg 
MYD10CM the Monthly CMG Snow Cover product from MODIS Aqua with a ground resolution of 0.05 deg 
MYD29 the 5 Minute Swath Sea Ice Extent product from MODIS Aqua with a ground resolution of 1000 m 
MYD29E1D the Daily Tile Sea Ice Extent and IST EASE-Grid Day product from MODIS Aqua with a ground resolution of 4000 m 
MYD29P1D the Daily Tile Sea Ice Extent EASE-Grid Day product from MODIS Aqua with a ground resolution of 1000 m 
MYD29P1N the Daily Tile Sea Ice Extent EASE-Grid Night product from MODIS Aqua with a ground resolution of 1000 m 
> tfs = runGdal("MOD10A2", tileH = 21, tileV = 9, begin = "2003001", end = "2003031"
+               , SDSstring = "10", job = "modis-snow", maskValue = 254:255
+               , overwrite = TRUE)
########################
outProj          =  asIn 
pixelSize        =  asIn 
resamplingType   =  near 
Output Directory =  Z:/MODIS/altai/processed/modis-snow 
########################
Downloading structure on 'NSIDC' for: MOD10A2.006
Error in readLines(con) : Send failure: Connection was reset
Error in if (FtpDayDirs[1] == FALSE) { : 
  missing value where TRUE/FALSE needed

My session info is below:

R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

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

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

other attached packages:
[1] MODIS_1.1.4   raster_2.8-4  sp_1.3-1      mapdata_2.3.0 maps_3.3.0   

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0        later_0.7.5       compiler_3.5.2    nloptr_1.2.1      class_7.3-14      prettyunits_1.0.2
 [7] bitops_1.0-6      remotes_2.0.2     tools_3.5.2       digest_0.6.18     pkgbuild_1.0.2    pkgload_1.0.2    
[13] memoise_1.1.0     lattice_0.20-38   rlang_0.3.1       DBI_1.0.0         shiny_1.2.0       cli_1.0.1        
[19] rstudioapi_0.9.0  curl_3.3          rgdal_1.3-6       parallel_3.5.2    e1071_1.7-0.1     withr_2.1.2      
[25] rgeos_0.4-2       desc_1.2.0        fs_1.2.6          devtools_2.0.1    classInt_0.3-1    mapedit_0.4.3    
[31] rprojroot_1.3-2   grid_3.5.2        glue_1.3.0        sf_0.7-2          R6_2.3.0          ptw_1.9-13       
[37] processx_3.2.1    foreign_0.8-71    sessioninfo_1.1.1 callr_3.1.1       magrittr_1.5      units_0.6-2      
[43] maptools_0.9-4    promises_1.0.1    htmltools_0.3.6   backports_1.1.3   codetools_0.2-15  ps_1.3.0         
[49] usethis_1.4.0     assertthat_0.2.0  xtable_1.8-3      mime_0.6          httpuv_1.4.5.1    crayon_1.3.4