MODIS icon indicating copy to clipboard operation
MODIS copied to clipboard

Downloading MCD64A1 for a region and I get $ operator is invalid for atomic vectors

Open lsaravia opened this issue 6 years ago • 4 comments

I am trying to download MCD64A1 with these commands

require(MODIS)

aus <- getTile("australia")

internal_info <- getProduct("MCD64A1") 
MODISoptions(MODISserverOrder=c("LPDAAC","LAADS"))
MODISoptions(localArcPath = "Data/hdf")
MODISoptions(outDirPath = "Data")

r64 <- runGdal("MCD64A1",begin="2019-10-01" ,end="2020-01-31",extent = aus, SDSstring = "1")

and get

########################
outProj          =  asIn  (if applicable, derived from Raster*/Spatial*/sf* object)
pixelSize        =  asIn  (if applicable, derived from Raster* object)
resamplingType   =  near 
Output directory =  /home/leonardo/Academicos/GitProjects/AuFIres/Data/MCD64A1.006_20200123125421  (no 'job' name specified, generated (date/time based))
########################
Local structure is up-to-date. Using offline information!
Error: $ operator is invalid for atomic vectors

lsaravia avatar Jan 23 '20 15:01 lsaravia

Works on my end, what's your sessionInfo()? Mine is

sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

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

other attached packages:
[1] MODIS_1.1.6   raster_3.0-7  sp_1.3-2      mapdata_2.3.0 maps_3.3.0   

loaded via a namespace (and not attached):
 [1] clisymbols_1.2.0   remotes_2.1.0      sf_0.8-0           lattice_0.20-38    testthat_2.3.1    
 [6] usethis_1.5.1      htmltools_0.4.0    rlang_0.4.2        pkgbuild_1.0.6     e1071_1.7-3       
[11] nloptr_1.2.1       later_1.0.0        foreign_0.8-72     glue_1.3.1         withr_2.1.2       
[16] DBI_1.1.0          sessioninfo_1.1.1  prompt_1.0.0       rgeos_0.5-2        mapedit_0.5.0     
[21] devtools_2.2.1     codetools_0.2-16   memoise_1.1.0      callr_3.4.0        fastmap_1.0.1     
[26] httpuv_1.5.2       ps_1.3.0           maptools_0.9-9     class_7.3-15       parallel_3.6.2    
[31] curl_4.3           fansi_0.4.1        Rcpp_1.0.3         KernSmooth_2.23-16 xtable_1.8-4      
[36] backports_1.1.5    promises_1.1.0     classInt_0.4-2     desc_1.2.0         pkgload_1.0.2     
[41] mime_0.8           fs_1.3.1           ptw_1.9-15         digest_0.6.23      processx_3.4.1    
[46] shiny_1.4.0        grid_3.6.2         rprojroot_1.3-2    rgdal_1.4-8        cli_2.0.1         
[51] tools_3.6.2        bitops_1.0-6       magrittr_1.5       crayon_1.3.4       ellipsis_0.3.0    
[56] prettyunits_1.1.0  assertthat_0.2.1   rstudioapi_0.10    R6_2.4.1           units_0.6-5       
[61] compiler_3.6.2

fdetsch avatar Jan 24 '20 07:01 fdetsch

Mine is below, I will try updating raster and sp.

> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=es_AR.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=es_AR.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=es_AR.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=es_AR.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] MODIS_1.1.6   raster_3.0-2  sp_1.3-1      mapdata_2.3.0 maps_3.3.0   

loaded via a namespace (and not attached):
 [1] remotes_2.1.0      sf_0.8-0           lattice_0.20-38    testthat_2.1.1     htmltools_0.3.6    usethis_1.5.0      rlang_0.4.2       
 [8] pkgbuild_1.0.3     e1071_1.7-1        nloptr_1.2.1       later_0.8.0        foreign_0.8-74     glue_1.3.1         withr_2.1.2       
[15] DBI_1.0.0          sessioninfo_1.1.1  rgeos_0.4-3        mapedit_0.5.0      devtools_2.2.0     htmlwidgets_1.3    codetools_0.2-16  
[22] memoise_1.1.0      callr_3.2.0        httpuv_1.5.1       ps_1.3.0           maptools_0.9-5     class_7.3-15       parallel_3.6.2    
[29] curl_3.3           fansi_0.4.1        Rcpp_1.0.3         KernSmooth_2.23-16 xtable_1.8-4       backports_1.1.5    promises_1.0.1    
[36] DT_0.9             classInt_0.4-2     desc_1.2.0         pkgload_1.0.2      mime_0.6           fs_1.3.0           ptw_1.9-13        
[43] packrat_0.5.0      digest_0.6.23      processx_3.3.0     shiny_1.3.2        grid_3.6.2         rprojroot_1.3-2    rgdal_1.4-4       
[50] cli_2.0.1          tools_3.6.2        bitops_1.0-6       magrittr_1.5       crayon_1.3.4       ellipsis_0.3.0     prettyunits_1.0.2 
[57] assertthat_0.2.1   rstudioapi_0.10    R6_2.4.0           units_0.6-3        compiler_3.6.2    

lsaravia avatar Jan 24 '20 18:01 lsaravia

Updated, and tried again

r64 <- runGdal("MCD64A1",begin="2019-01-01" ,end="2020-01-31",extent = aus, SDSstring = "1")
########################
outProj          =  asIn  (if applicable, derived from Raster*/Spatial*/sf* object)
pixelSize        =  asIn  (if applicable, derived from Raster* object)
resamplingType   =  near 
Output directory =  /home/leonardo/Academicos/GitProjects/AuFIres/Data/MCD64A1.006_20200124162934  (no 'job' name specified, generated (date/time based))
########################
Downloading structure on 'LPDAAC' for: MCD64A1.006
Error: $ operator is invalid for atomic vectors
> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=es_AR.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=es_AR.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=es_AR.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=es_AR.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] MODIS_1.1.6   raster_3.0-7  sp_1.3-2      mapdata_2.3.0 maps_3.3.0   

loaded via a namespace (and not attached):
 [1] remotes_2.1.0      sf_0.8-0           lattice_0.20-38    testthat_2.1.1     htmltools_0.3.6    usethis_1.5.0      rlang_0.4.2       
 [8] pkgbuild_1.0.3     e1071_1.7-1        nloptr_1.2.1       later_0.8.0        foreign_0.8-74     glue_1.3.1         withr_2.1.2       
[15] DBI_1.0.0          sessioninfo_1.1.1  rgeos_0.4-3        mapedit_0.5.0      devtools_2.2.0     htmlwidgets_1.3    codetools_0.2-16  
[22] memoise_1.1.0      callr_3.2.0        httpuv_1.5.1       ps_1.3.0           maptools_0.9-5     class_7.3-15       parallel_3.6.2    
[29] curl_3.3           fansi_0.4.1        Rcpp_1.0.3         KernSmooth_2.23-16 xtable_1.8-4       backports_1.1.5    promises_1.0.1    
[36] DT_0.9             classInt_0.4-2     desc_1.2.0         pkgload_1.0.2      mime_0.6           fs_1.3.0           ptw_1.9-13        
[43] packrat_0.5.0      digest_0.6.23      processx_3.3.0     shiny_1.3.2        grid_3.6.2         rprojroot_1.3-2    rgdal_1.4-4       
[50] cli_2.0.1          tools_3.6.2        bitops_1.0-6       magrittr_1.5       crayon_1.3.4       ellipsis_0.3.0     prettyunits_1.0.2 
[57] assertthat_0.2.1   rstudioapi_0.10    R6_2.4.0           units_0.6-3        compiler_3.6.2

lsaravia avatar Jan 24 '20 19:01 lsaravia

Any updates on this one?

fdetsch avatar Jun 22 '20 11:06 fdetsch