Description Usage Arguments Details Value See Also Examples
GetMODIS downloads, mosaics, and resamples MODIS data to match input
geogrid.
1 2 3 4 |
extent |
The pathname to the geogrid file (i.e., geo_em.d01.nc) OR the path to a georeferenced TIF file of the domain OR the path to a shapefile of the desired extent OR a standard country name that can be identified in the mapdata package. |
prodName |
The MODIS product name to download/process. Run the MODIS package getProducts() for a complete list of supported products. |
outDir |
Directory name to store processed TIF files. This is the equivalent to the MODIS package's "job" name. This is a directory name only and NOT a full path. The directory will be created in the preset MODIS package outDirPath. |
begin |
Date string for the start date to download/process MODIS tiles. The date string should follow MODIS package convention (e.g., "2011.06.01"). |
end |
Date string for the end date to download/process MODIS tiles. The date string should follow MODIS package convention (e.g., "2011.06.01"). |
collection |
From MODIS::runGdal help: "Default is to download most recent collection version. See: ?getCollection" |
buffer |
From MODIS::runGdal help: "Numeric. Buffer [in units of the 'outProj'] around the specified extent. See: ?getTile" (DEFAULT=0.04, which seems to cover MODIS tile corners sufficiently) |
SDSstring |
From MODIS::runGdal help: "Default is extract all SDS (layers). See: ?getSds." |
exclList |
List pairing SDS name (e.g., "Lai_1km", "FparLai_QC") with values to exclude from interpolation (i.e., convert to "nodata"). For example, for the Lai_1km product, valid range is 0-100, values 249-255 are fill values, but only one value (255) is reported as _FillValue in the HDF metadata. The exclude list should specify value ranges to exclude, and should be in the form: list("SDS name"="exclude range", ...) where "exclude range" can be a single number (e.g., 254), "gt <somenumber>" to exclude all values over some threshold (e.g., "gt 100"), or "lt <somenumber>" to exclude all values less than some threshold (e.g., "lt 0"). |
resampList |
List pairing SDS name (e.g., "Lai_1km", "FparLai_QC") with
reasmpling method to use. GDAL possible options (depends on version):
'near', 'bilinear', 'cubic', 'cubicspline', 'lanczos', 'mode', 'average'
(DEFAULT='near', unless otherwise specified in
list("SDS name"="method", ...) where "method" is one of the GDAL methods listed above. |
quiet |
From MODIS::runGdal help: Logical, Default FALSE. Some progress informations. |
scriptPath |
OPTIONAL path to where gdal_calc.py script lives in case it is not in the same default path as gdal executables |
GetMODIS reads a geogrid file and parameters on MODIS product and data
range and downloads MODIS tiles where they do not exist (using the R
MODIS package), mosaics
where necessary, clips, reprojects, and resamples (using nearest neighbor) to
match the geogrid. Results in a set of TIF files per the
MODIS package
specifications.
Please see documentation on the R
MODIS package for
details on required installs and workspace setup. This tool builds off of the
MODIS
runGdal tool, so follows
MODIS file directory
structure (see MODISoptions). This tool requires a local
GDAL installation in addition to the required R
packages.
NOTE: This tool currently only works for geogrid files in Lambert Conformal Conic projection OR a GDAL-friendly georeferenced TIF file.
Empty
Other MODIS: CalcStatsRS,
ConvertRS2Stack,
ConvertStack2NC, GapFillRS,
InsertRS, SmoothStack
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ## First, specify the target directories for the MODIS package.
## Not run:
MODISoptions(localArcPath="/d1/WRF_Hydro/RS/MODIS_ARC",
outDirPath="/d1/WRF_Hydro/RS/MODIS_ARC/PROCESSED",
stubbornness="low")
## Then, use GetMODIS to download the MODIS MOD15A2 (FPAR/LAI) product for
## all tiles that overlap our Fourmile Creek domain (as specified by the
## geo_em.d01.nc file), mosaic if multiple tiles, clip to the domain extent,
## and resample to the domain grid cells. The raw HDF files will be stored in
## /d1/WRF_Hydro/RS/MODIS_ARC/ and the final processed TIF files will be
## stored in /d1/WRF_Hydro/RS/MODIS_ARC/PROCESSED/Fourmile_LAI/.
GetMODIS(extent="/d1/WRF_Hydro/Fourmile_fire/DOMAIN/geo_em.d01.nc",
prodName="MOD15A2", outDir="Fourmile_LAI",
begin="2011.01.01", end="2011.01.31",
exclList=list("Fpar_1km"="gt 100",
"Lai_1km"="gt 100",
"FparLai_QC"="255",
"FparExtra_QC"="255",
"FparStdDev_1km"="gt 100",
"LaiStdDev_1km"="gt 100"),
resampList=list("Fpar_1km"="bilinear",
"Lai_1km"="bilinear",
"FparLai_QC"="mode",
"FparExtra_QC"="mode",
"FparStdDev_1km"="bilinear",
"LaiStdDev_1km"="bilinear"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.