Skip to contents

Main function for the MODIS Time Series Processing Tool (MODIStsp)

Usage

MODIStsp(
  ...,
  gui = TRUE,
  out_folder = NULL,
  out_folder_mod = NULL,
  opts_file = NULL,
  selprod = NULL,
  prod_version = NULL,
  bandsel = NULL,
  quality_bandsel = NULL,
  indexes_bandsel = NULL,
  sensor = NULL,
  download_server = NULL,
  downloader = NULL,
  user = NULL,
  password = NULL,
  download_range = NULL,
  start_date = NULL,
  end_date = NULL,
  spatmeth = NULL,
  start_x = NULL,
  end_x = NULL,
  start_y = NULL,
  end_y = NULL,
  bbox = NULL,
  spafile = NULL,
  out_projsel = NULL,
  output_proj = NULL,
  out_res_sel = NULL,
  out_res = NULL,
  resampling = NULL,
  reprocess = NULL,
  delete_hdf = NULL,
  nodata_change = NULL,
  scale_val = NULL,
  ts_format = NULL,
  out_format = NULL,
  compress = NULL,
  test = NULL,
  n_retries = 5,
  verbose = TRUE,
  parallel = TRUE
)

Arguments

...

not used for values, forces later arguments to bind by name

gui

logical if TRUE: the GUI is opened before processing. If FALSE: processing parameters are retrieved from the provided opts_file argument), Default: TRUE

out_folder

character Main output folder, default: NULL.

out_folder_mod

character Output folder for original HDF storage. If "$tempdir" (default), a temporary directory is used.

opts_file

character full path to a JSON file containing MODIStsp processing options saved from the GUI, Default: NULL

selprod

character Name of selected MODIS product (e.g., Vegetation Indexes_16Days_250m (M*D13Q1)). You can get a list of available product names using function MODIStsp_get_prodnames, Default: NULL

prod_version

Version of the selected MODIS product. Currently versions "006" and/or "061" can be chosen. Default value is "006" until decommission of this version will be announced by USGS. Products with version "061 are experimental: in case users would encounter an error in the encoding of bands or quality flags they are encouraged to report it by opening a new issue on GitHub at https://github.com/ropensci/MODIStsp/issues.

bandsel

character array Original MODIS layers to be processed. You can get a list of available layers for a given product using function MODIStsp_get_prodlayers (e.g., MODIStsp_get_prodlayers("M*D13Q1")$bandnames), Default: NULL

quality_bandsel

character array Quality Indicators to be computed starting from bit fields of original MODIS layers. You can get a list of available quality layers for a given product using function MODIStsp_get_prodlayers (e.g., MODIStsp_get_prodlayers("M*D13Q1")$quality_bandnames), Default: NULL

indexes_bandsel

character arraySpectral Indexes to be computed starting from reflectance bands. You can get a list of available quality layers for a given product using function MODIStsp_get_prodlayers (e.g., MODIStsp_get_prodlayers("M*D13Q1")$indexes_bandnames), Default: NULL

sensor

character ["Terra"| "Aqua" | "Both"] MODIS platform to be considered. (Ignored for MCD* products). Default: "Both"

download_server

character ["http" | "offline"] service to be used for download. Default: "http"

downloader

download_server character ["http" | "aria2"] downloader to be used, Default: "http"

user

character Username for NASA http server. (urs.earthdata.nasa.gov/home).

password

character Password for NASA http server (urs.earthdata.nasa.gov/home).

download_range

character ["Full" | "Seasonal"] If "full", all the available images between the starting and the ending dates are downloaded; If "seasonal", only the images included in the season are downloaded (e.g: if the starting date is 2005-12-01 and the ending is 2010-02-31, only the images of December, January and February from 2005 to 2010 - excluding 2005-01, 2005-02 and 2010-12 - are downloaded), Default: Full

start_date

character Start date for images download and preprocessing (yyyy.mm.dd), Default: NULL

end_date

character End date for images download and preprocessing (yyyy.mm.dd), Default: NULL

spatmeth

character ["tiles" | "bbox" | "file"], indicates how the processing extent is retrieves. if "tiles", use the specified tiles (start_x....). If "file", retrieve extent from spatial file specifies in spafile. If "bbox", use the specified bounding box, Default: "tiles"

start_x

integer [0-35] Start MODIS horizontal tile defining spatial extent. Ignored if spatmeth != "tiles", Default: 18

end_x

integer [0-35] End MODIS horizontal tile defining spatial extent. Ignored if spatmeth != "tiles", Default: 18

start_y

integer [0-17] Start MODIS vertical tile defining spatial extent. Ignored if spatmeth != "tiles", Default: 4

end_y

integer [0-17] End MODIS vertical tile defining spatial extent. Ignored if spatmeth != "tiles", Default: 4

bbox

numeric(4) Output bounding box (xmin, ymin, xmax, ymax) in out_proj coordinate system. Ignored if spatmeth == "tiles", Default: NULL

spafile

character (optional) full path of a spatial file to use to derive the processing extent. If not NULL, the processing options which define the extent, the selected tiles and the "Full Tile / Custom" in the JSON options file are overwritten and new files are created on the extent of the provided spatial file. Ignored if spatmeth != "file", Default: NULL

out_projsel

character ["Native", "User Defined] If "Native", the outputs keep the original resolution of MODIS HDF images. Otherwise, the value set in "out_res" is used, Default:Native

output_proj

character either equal to "MODIS Sinusoidal", or to the code of a valid EPSG or to a WKT projection string. Ignored if outproj_sel == "Native", Default: NULL

out_res_sel

character ["Native", "User Defined]. If "Native", the outputs keep the original resolution of MODIS HDF images. Otherwise, the value set in "out_res" is used.

out_res

float Output resolution (in output projection measurement unit). Ignored if out_res_sel == "Native".

resampling

character ["near" | "bilinear" | "cubic" | "cubicspline", |lanczos"|, "average"|, "mode", |"max"|, |"min"|, |"q1"|, |"q3"|, |"sum"|] Resampling method to be used by gdalwarp.

reprocess

logical If TRUE, reprocess data for already existing dates.

delete_hdf

logical If TRUE, delete downloaded HDF files after completion.

nodata_change

logical if TRUE, NoData values are set to the max value of the datatype of the layer on the MODIStsp output rasters. NOTE: If multiple nodata values are reported for a layer, all are reset to the new value.

scale_val

logical If TRUE, scale and offset are applied to original MODIS layers, and Spectral Indexes are saved as floating point. If FALSE, no rescaling is done and Spectral Indexes are saved as integer, with a 10000 scaling factor.

ts_format

character array including ["R RasterStack" | "ENVI Meta Files" | "GDAL VRT" | "ENVI and GDAL"] Selected virtual time series format.

out_format

character ["ENVI" | "GTiff"] Desired output format.

compress

character ["None" | "PACKBITS" | "LZW" | "DEFLATE"] Compression method for GTiff outputs (Ignored if out_format == ENVI)

test

integer | character (e.g., "01a") if set, MODIStsp is executed in "test mode", using a preset Options File instead than opening the GUI or accepting the opts_file parameter. This allows both to check correct installation on user's machines, and to implement unit testing.

n_retries

numeric maximum number of retries on download functions. In case any download function fails more than n_retries times consecutively, MODIStsp_process will abort, Default: 20

verbose

logical If FALSE, suppress processing messages, Default: TRUE

parallel

logical If TRUE (default), the function is run using parallel processing, to speed-up the computation for large rasters (with a maximum of 8 cores). The number of cores is automatically determined; specifying it is also possible (e.g. parallel = 4). In this case, more than 8 cores can be specified. If FALSE (default), single core processing is used.

Details

The function is used to:

  • initialize the processing (folder names, packages, etc.);

  • launch the GUI (MODIStsp_GUI()) on interactive execution, or load an options file to set processing arguments and/or retrieve CLI inputs and run processing on non-interactive execution;

  • launch the routines for downloading and processing the requested datasets. (MODIStsp_process())

  • launching the function with GUI = FALSE and without specifying a opts_file initializes arguments with default values. This allows making a test run.

Note

License: GPL 3.0

Author

Lorenzo Busetto, phD (2014-2017)

Luigi Ranghetti, phD (2015-2017) [email protected]

Examples

# \donttest{

#' # - Running the tool using the GUI
# Running the tool without any option will start the GUI with the default or
# last used settings, in interactive mode (i.e., with gui = TRUE).
if (interactive()) {
  MODIStsp()
}


#' # - Running the tool specifying processing arguments in the call

# **NOTE** Output files of examples are saved to file.path(tempdir(), "MODIStsp").

# Here we process layers __NDVI__ and __EVI__ and quality indicator __usefulness__
# of product __M*D13Q1__, considering both Terra and Aqua platforms, for dates
# comprised between 2020-06-01 and 2020-06-15 and saves output to R tempdir
# --> See name and available layers for product M*D13Q1.
# Note that this example (as well as the following ones) is run in single
# core to follow CRAN policies, by setting parallel = FALSE.
# Users can exploit multicore functionalities skipping to set this argument.

MODIStsp_get_prodlayers("M*D13A2")
#> $prodname
#> [1] "Vegetation_Indexes_16Days_1Km (M*D13A2)"
#> 
#> $bandnames
#>  [1] "NDVI"     "EVI"      "VI_QA"    "b1_Red"   "b2_NIR"   "b3_Blue" 
#>  [7] "b7_SWIR"  "View_Zen" "Sun_Zen"  "Rel_Az"   "DOY"      "Rely"    
#> 
#> $bandfullnames
#>  [1] "16 day NDVI average"                "16 day EVI average"                
#>  [3] "VI quality indicators"              "Surface Reflectance Band 1"        
#>  [5] "Surface Reflectance Band 2"         "Surface Reflectance Band 3"        
#>  [7] "Surface Reflectance Band 7"         "View zenith angle of VI pixel"     
#>  [9] "Sun zenith angle of VI pixel"       "Relative azimuth angle of VI pixel"
#> [11] "Day of year of VI pixel"            "Quality reliability of VI pixel"   
#> 
#> $quality_bandnames
#> [1] "QA_qual"     "QA_usef"     "QA_aer"      "QA_adj_cld"  "QA_BRDF"    
#> [6] "QA_mix_cld"  "QA_land_wat" "QA_snow_ice" "QA_shd"     
#> 
#> $quality_fullnames
#> [1] "VI Quality"                          
#> [2] "VI usefulness"                       
#> [3] "Aerosol quantity"                    
#> [4] "Adjacent cloud detected"             
#> [5] "Atmosphere BRDF correction performed"
#> [6] "Mixed Clouds"                        
#> [7] "Land/Water Flag"                     
#> [8] "Possible snow/ice"                   
#> [9] "Possible shadow"                     
#> 
#> $indexes_bandnames
#> [1] "SR"    "NDFI"  "NDII7" "SAVI" 
#> 
#> $indexes_fullnames
#> [1] "Simple Ratio (NIR/Red)"              
#> [2] "Flood Index (Red-SWIR2)/(Red+SWIR2)" 
#> [3] "NDII7 (NIR-SWIR2)/(NIR+SWIR2)"       
#> [4] "SAVI (NIR-Red)/(NIR+Red+0.5)*(1+0.5)"
#> 
MODIStsp(
  gui = FALSE,
  out_folder = "$tempdir",
  selprod = "Vegetation_Indexes_16Days_1Km (M*D13A2)",
  bandsel = c("EVI", "NDVI"),
  quality_bandsel = "QA_usef",
  indexes_bandsel = "SR",
  user = "mstp_test" ,
  password = "MSTP_test_01",
  start_date = "2020.06.01",
  end_date = "2020.06.15",
  verbose = FALSE,
  parallel = FALSE
)


#' # - Running the tool using the settings previously saved in a specific options file

# **NOTE** Output files of examples are saved to file.path(tempdir(), "MODIStsp").
# You can run the examples with `gui = TRUE` to set a different output folder!

# Here we use a test json file saved in MODIStsp installation folder which
# downloads and processed 3 MOD13A2 images over the Como Lake (Lombardy, Italy)
# and retrieves NDVI and EVI data, plus the Usefulness Index Quality Indicator.

opts_file <- system.file("testdata/test_MOD13A2.json", package = "MODIStsp")

MODIStsp(gui = FALSE, opts_file = opts_file, verbose = TRUE, parallel = FALSE)
#> GDAL version in use: 3.0.4
#> [Fri Jan 14 14:48:53 2022] MODIStsp --> Starting processing
#> [Fri Jan 14 14:48:53 2022] Accessing http server at:  https://e4ftl01.cr.usgs.gov/MOLT/MOD13A2.006/
#> [Fri Jan 14 14:48:55 2022] Retrieving list of available ` Terra ` Files for Year 2016
#> [Fri Jan 14 14:48:57 2022] Downloading Terra Files for date: 2016_06_09 : 1 of:  1
#> [Fri Jan 14 14:48:57 2022] [Fri Jan 14 14:48:57 2022] 1 files for date: 2016.06.09 were successfully downloaded!
#> [Fri Jan 14 14:48:58 2022] Processing Terra NDVI files for date: 2016_06_09
#> [Fri Jan 14 14:48:58 2022] Processing Terra EVI files for date: 2016_06_09
#> [Fri Jan 14 14:48:59 2022] Processing Terra VI_QA files for date: 2016_06_09
#> [Fri Jan 14 14:48:59 2022] Computing QA_usef for date: 2016_06_09
#> [Fri Jan 14 14:49:01 2022] Downloading Terra Files for date: 2016_06_25 : 1 of:  1
#> [Fri Jan 14 14:49:04 2022] [Fri Jan 14 14:49:04 2022] 1 files for date: 2016.06.25 were successfully downloaded!
#> [Fri Jan 14 14:49:04 2022] Processing Terra NDVI files for date: 2016_06_25
#> [Fri Jan 14 14:49:04 2022] Processing Terra EVI files for date: 2016_06_25
#> [Fri Jan 14 14:49:05 2022] Processing Terra VI_QA files for date: 2016_06_25
#> [Fri Jan 14 14:49:05 2022] Computing QA_usef for date: 2016_06_25
#> [Fri Jan 14 14:49:06 2022] Creating Virtual Files and R time series for layer NDVI
#> [Fri Jan 14 14:49:06 2022] Creating Virtual Files and R time series for layer EVI
#> [Fri Jan 14 14:49:06 2022] Creating Virtual Files and R time series for layer QA_usef
#> [Fri Jan 14 14:49:06 2022] Total Processing Time: 12.3640520572662
#> [Fri Jan 14 14:49:06 2022] MODIStsp processed files are in: `/tmp/RtmptwnzNV/MODIStsp`
#> [Fri Jan 14 14:49:06 2022] Original downloaded MODIS HDF files are in: `/tmp/RtmptwnzNV/MODIStsp/HDFs`
#> [Fri Jan 14 14:49:06 2022] Processing options saved to: `/tmp/RtmptwnzNV/MODIStsp/MODIStsp_2022-01-14.json`


# Running the tool using the settings previously saved in a specific option file
# and specifying the extent from a spatial file allows to re-use the same
# processing settings to perform download and reprocessing on a different area

opts_file <- system.file("testdata/test_MOD13A2.json", package = "MODIStsp")
spatial_file <- system.file("testdata/lakeshapes/garda_lake.shp", package = "MODIStsp")
MODIStsp(
  gui = FALSE, 
  opts_file = opts_file,
  spatmeth = "file",
  spafile = spatial_file, 
  verbose = TRUE,
  parallel = FALSE
)
#> GDAL version in use: 3.0.4
#> [Fri Jan 14 14:49:06 2022] MODIStsp --> Starting processing
#> [Fri Jan 14 14:49:06 2022] Accessing http server at:  https://e4ftl01.cr.usgs.gov/MOLT/MOD13A2.006/
#> [Fri Jan 14 14:49:06 2022] Retrieving list of available ` Terra ` Files for Year 2016
#> [Fri Jan 14 14:49:07 2022] HDF File: MOD13A2.A2016161.h18v04.006.2016184001910.hdf already exists on your system. Skipping download!
#> [Fri Jan 14 14:49:07 2022] [Fri Jan 14 14:49:07 2022] 1 files for date: 2016.06.09 were successfully downloaded!
#> [Fri Jan 14 14:49:07 2022] Processing Terra NDVI files for date: 2016_06_09
#> [Fri Jan 14 14:49:07 2022] Processing Terra EVI files for date: 2016_06_09
#> [Fri Jan 14 14:49:08 2022] Processing Terra VI_QA files for date: 2016_06_09
#> [Fri Jan 14 14:49:08 2022] Computing QA_usef for date: 2016_06_09
#> [Fri Jan 14 14:49:09 2022] HDF File: MOD13A2.A2016177.h18v04.006.2016200095913.hdf already exists on your system. Skipping download!
#> [Fri Jan 14 14:49:09 2022] [Fri Jan 14 14:49:09 2022] 1 files for date: 2016.06.25 were successfully downloaded!
#> [Fri Jan 14 14:49:09 2022] Processing Terra NDVI files for date: 2016_06_25
#> [Fri Jan 14 14:49:09 2022] Processing Terra EVI files for date: 2016_06_25
#> [Fri Jan 14 14:49:10 2022] Processing Terra VI_QA files for date: 2016_06_25
#> [Fri Jan 14 14:49:10 2022] Computing QA_usef for date: 2016_06_25
#> [Fri Jan 14 14:49:11 2022] Creating Virtual Files and R time series for layer NDVI
#> [Fri Jan 14 14:49:11 2022] Creating Virtual Files and R time series for layer EVI
#> [Fri Jan 14 14:49:11 2022] Creating Virtual Files and R time series for layer QA_usef
#> [Fri Jan 14 14:49:11 2022] Total Processing Time: 4.97544479370117
#> [Fri Jan 14 14:49:11 2022] MODIStsp processed files are in: `/tmp/RtmptwnzNV/MODIStsp/garda_lake`
#> [Fri Jan 14 14:49:11 2022] Original downloaded MODIS HDF files are in: `/tmp/RtmptwnzNV/MODIStsp/HDFs`
#> [Fri Jan 14 14:49:11 2022] Processing options saved to: `/tmp/RtmptwnzNV/MODIStsp/garda_lake/MODIStsp_2022-01-14.json`


# Running the tool using the settings previously saved in a
# specific options file and specifying each time the extent from a different
# spatial file (e.g., to perform the same processing on several extents)
# Note that you can also put all your extent files in a specific folder and
# create the extent list using for example.

extent_list = list.files(
  system.file("testdata/lakeshapes/", package = "MODIStsp"),
  "\\.shp$", 
  full.names = TRUE
)
extent_list
#> [1] "/usr/local/lib/R/site-library/MODIStsp/testdata/lakeshapes//garda_lake.shp"
#> [2] "/usr/local/lib/R/site-library/MODIStsp/testdata/lakeshapes//iseo_lake.shp" 
opts_file <- system.file("testdata/test_MOD13A2.json", package = "MODIStsp")

for (single_shape in extent_list) {
  MODIStsp(
    gui = FALSE, 
    opts_file = opts_file,
    spatmeth = "file",
    spafile = single_shape, 
    verbose = TRUE,
    parallel = FALSE
  )
}
#> GDAL version in use: 3.0.4
#> [Fri Jan 14 14:49:11 2022] MODIStsp --> Starting processing
#> [Fri Jan 14 14:49:11 2022] Accessing http server at:  https://e4ftl01.cr.usgs.gov/MOLT/MOD13A2.006/
#> [Fri Jan 14 14:49:13 2022] Retrieving list of available ` Terra ` Files for Year 2016
#> [Fri Jan 14 14:49:13 2022] [Fri Jan 14 14:49:13 2022] All Required output files for date 2016_06_09 are already existing - Doing Nothing!
#> Set Reprocess to TRUE to reprocess existing data!
#> [Fri Jan 14 14:49:13 2022] [Fri Jan 14 14:49:13 2022] All Required output files for date 2016_06_25 are already existing - Doing Nothing!
#> Set Reprocess to TRUE to reprocess existing data!
#> [Fri Jan 14 14:49:13 2022] Creating Virtual Files and R time series for layer NDVI
#> [Fri Jan 14 14:49:13 2022] Creating Virtual Files and R time series for layer EVI
#> [Fri Jan 14 14:49:13 2022] Creating Virtual Files and R time series for layer QA_usef
#> [Fri Jan 14 14:49:13 2022] Total Processing Time: 2.07541871070862
#> [Fri Jan 14 14:49:13 2022] MODIStsp processed files are in: `/tmp/RtmptwnzNV/MODIStsp/garda_lake`
#> [Fri Jan 14 14:49:13 2022] Original downloaded MODIS HDF files are in: `/tmp/RtmptwnzNV/MODIStsp/HDFs`
#> [Fri Jan 14 14:49:13 2022] Processing options saved to: `/tmp/RtmptwnzNV/MODIStsp/garda_lake/MODIStsp_2022-01-14.json`
#> GDAL version in use: 3.0.4
#> [Fri Jan 14 14:49:13 2022] MODIStsp --> Starting processing
#> [Fri Jan 14 14:49:13 2022] Accessing http server at:  https://e4ftl01.cr.usgs.gov/MOLT/MOD13A2.006/
#> [Fri Jan 14 14:49:14 2022] Retrieving list of available ` Terra ` Files for Year 2016
#> [Fri Jan 14 14:49:14 2022] HDF File: MOD13A2.A2016161.h18v04.006.2016184001910.hdf already exists on your system. Skipping download!
#> [Fri Jan 14 14:49:14 2022] [Fri Jan 14 14:49:14 2022] 1 files for date: 2016.06.09 were successfully downloaded!
#> [Fri Jan 14 14:49:14 2022] Processing Terra NDVI files for date: 2016_06_09
#> [Fri Jan 14 14:49:15 2022] Processing Terra EVI files for date: 2016_06_09
#> [Fri Jan 14 14:49:15 2022] Processing Terra VI_QA files for date: 2016_06_09
#> [Fri Jan 14 14:49:15 2022] Computing QA_usef for date: 2016_06_09
#> [Fri Jan 14 14:49:16 2022] HDF File: MOD13A2.A2016177.h18v04.006.2016200095913.hdf already exists on your system. Skipping download!
#> [Fri Jan 14 14:49:16 2022] [Fri Jan 14 14:49:16 2022] 1 files for date: 2016.06.25 were successfully downloaded!
#> [Fri Jan 14 14:49:17 2022] Processing Terra NDVI files for date: 2016_06_25
#> [Fri Jan 14 14:49:17 2022] Processing Terra EVI files for date: 2016_06_25
#> [Fri Jan 14 14:49:17 2022] Processing Terra VI_QA files for date: 2016_06_25
#> [Fri Jan 14 14:49:18 2022] Computing QA_usef for date: 2016_06_25
#> [Fri Jan 14 14:49:18 2022] Creating Virtual Files and R time series for layer NDVI
#> [Fri Jan 14 14:49:18 2022] Creating Virtual Files and R time series for layer EVI
#> [Fri Jan 14 14:49:18 2022] Creating Virtual Files and R time series for layer QA_usef
#> [Fri Jan 14 14:49:18 2022] Total Processing Time: 5.0970151424408
#> [Fri Jan 14 14:49:18 2022] MODIStsp processed files are in: `/tmp/RtmptwnzNV/MODIStsp/iseo_lake`
#> [Fri Jan 14 14:49:18 2022] Original downloaded MODIS HDF files are in: `/tmp/RtmptwnzNV/MODIStsp/HDFs`
#> [Fri Jan 14 14:49:18 2022] Processing options saved to: `/tmp/RtmptwnzNV/MODIStsp/iseo_lake/MODIStsp_2022-01-14.json`

# output files are placed in separate folders:
outfiles_garda <- list.files(
  file.path(tempdir(), "MODIStsp/garda_lake/VI_16Days_1Km_v6/NDVI"),
  full.names = TRUE
)
outfiles_garda
#> [1] "/tmp/RtmptwnzNV/MODIStsp/garda_lake/VI_16Days_1Km_v6/NDVI/MOD13A2_NDVI_2016_161.tif"
#> [2] "/tmp/RtmptwnzNV/MODIStsp/garda_lake/VI_16Days_1Km_v6/NDVI/MOD13A2_NDVI_2016_177.tif"
require(raster)
#> Loading required package: raster
#> Loading required package: sp
if (length(outfiles_garda) > 0) {
  plot(raster(outfiles_garda[1] ))
}


outfiles_iseo <- list.files(
  file.path(tempdir(), "MODIStsp/iseo_lake/VI_16Days_1Km_v6/NDVI"),
  full.names = TRUE
)
outfiles_iseo
#> [1] "/tmp/RtmptwnzNV/MODIStsp/iseo_lake/VI_16Days_1Km_v6/NDVI/MOD13A2_NDVI_2016_161.tif"
#> [2] "/tmp/RtmptwnzNV/MODIStsp/iseo_lake/VI_16Days_1Km_v6/NDVI/MOD13A2_NDVI_2016_177.tif"
if (length(outfiles_garda) > 0) {
  plot(raster(outfiles_iseo[1]))
}


# See also https://docs.ropensci.org/MODIStsp/articles/noninteractive_execution.html
# }