Closed katharineegan closed 5 years ago
Hi @katharineegan - thanks for providing such detail. The SPL2SMP_E data product is not currently supported (see https://github.com/earthlab/smapr/README.md for a list of supported data products). Would any the currently supported SMAP data products work for your application? If not, we can turn this issue into a feature request for supporting SPL2SMP_E.
Hi,
I am running into a problem trying to extract a dataset from some SMAP data, specifically, I am looking at this dataset: https://nsidc.org/data/SPL2SMP_E/versions/2
I am interested in only extracting out the soil moisture data and writing it out as a geotiff. I was able to download the files just fine using download_smap(). All of the files I need are stored in a data frame with the name, date, directory, and local directory that I created using find_smap().
However, when I go to extract the dataset using extract_smap(), it keeps throwing this error at me:
Code
# specify dates
date_begin <-paste("2018","-06-01",sep = "")
date_end <-paste("2018","-06-27",sep = "")
dates <- seq(as.Date(date_begin), as.Date(date_end), "days")
# remove one of the dates b/c it's missing
dates <- dates[-3]
# identify SMAP dataset
files <- find_smap(id = "SPL2SMP_E", dates = dates, version = 2)
# specify local directory
inputfolder = "E:/tmp"
setwd(inputfolder)
# add local directory to the files data frame as an extra column
files$local_dir <- inputfolder
# extract soil moisture
sm_raster <- extract_smap(data = files, name = "Soil_Moisture_Retrieval_Data/soil_moisture")
Error given to me by extract_smap() Error in eval(substitute(expr), data, enclos = parent.frame()) : object 'westBoundLongitude' not found
Any thoughts? Is it a dataset specific error?
Session Info R version 3.4.1 (2017-06-30) 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] stringr_1.2.0 rhdf5_2.20.0 smapr_0.1.2 raster_2.5-8 sp_1.2-4
loaded via a namespace (and not attached): [1] Rcpp_0.12.11 lattice_0.20-35 XML_3.98-1.9 rappdirs_0.3.1 [5] grid_3.4.1 R6_2.2.2 magrittr_1.5 httr_1.2.1
[9] stringi_1.1.5 zlibbioc_1.22.0 curl_3.1 xml2_1.1.1
[13] tools_3.4.1 selectr_0.3-1 compiler_3.4.1 rvest_0.3.2