r.in.modis - Downloads and imports any MODIS product available on the Microsoft Planetary Computer STAC catalogue (surface reflectance, vegetation indices, land surface temperature, snow cover, burned area, and more) -- no account, API key, or signed request needed. Companion to r.in.sentinel and r.in.dem.
Apply cloud masking using the sur_refl_state_500m QA band's cloud-state bits (MOD09A1/MOD09Q1 only; mask out 'cloudy' and 'mixed', requires sur_refl_state_500m among the downloaded bands). Other MODIS products' own QA bands (e.g. VI_Quality, QC_Day, pixel_reliability) have different bit layouts -- download them as regular bands with -c omitted and interpret them yourself.
-l
List available dates/scenes and exit without downloading
-j
Write per-band metadata JSON to $MAPSET/cell_misc/
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog
Parameters:
collection=string
Any MODIS STAC collection ID on Planetary Computer, e.g. modis-09A1-061 (surface reflectance 8-day 500m, default), modis-09Q1-061 (surface reflectance 8-day 250m), modis-13A1-061/modis-13Q1-061 (vegetation indices 16-day), modis-11A1-061/modis-11A2-061 (land surface temperature daily/8-day), modis-10A1-061/modis-10A2-061 (snow cover daily/8-day), modis-14A1-061/modis-14A2-061 (thermal anomalies/fire), modis-64A1-061 (burned area monthly), modis-15A2H-061/modis-15A3H-061 (LAI/FPAR), modis-16A3GF-061 (net evapotranspiration), modis-17A2H-061/modis-17A2HGF-061/modis-17A3HGF-061 (gross/net primary productivity), modis-21A2-061 (LST/emissivity), modis-43A4-061 (NBAR daily). Run with -l to list scenes for any collection before downloading.
Default: modis-09A1-061
bands=string[,string,...]
STAC asset names to download for the chosen collection. The default is specific to modis-09A1-061 (red/NIR/blue/green/SWIR1/SWIR2 + the state_500m QA/cloud band, matching flood_extent_fusion/modis_flood_index.py's EVI/LSWI/DVEL inputs) -- override this for any other collection (see that collection's Planetary Computer page for its asset names, or run with -l first).
r.in.modis downloads and imports MODIS surface
reflectance (MOD09A1, 8-day composite, 500m -- the exact product
used by the Jamuna parametric flood insurance improvement project's
EVI/LSWI/DVEL flood classifier) from the Microsoft Planetary
Computer STAC catalogue, which needs no account, API key, or
signed request. It is the MODIS sibling of
r.in.sentinel (Sentinel-1/2) and
r.in.dem (Copernicus DEM), sharing the same
cubo-based Planetary Computer download path and
authentication-free design.
The module determines the current GRASS region's center lat/lon and
approximate edge size, requests a MODIS data cube for the given date
range and bands via cubo.create(), optionally cloud-masks
using the sur_refl_state_500m QA band's cloud-state bits
(-c), optionally applies MOD09A1's reflectance scale factor
(-r, raw digital numbers × 0.0001), and imports one
raster map per band per date via r.import.
Default bands cover red (sur_refl_b01), NIR
(sur_refl_b02), blue (sur_refl_b03), green
(sur_refl_b04), and two SWIR bands
(sur_refl_b06, sur_refl_b07), plus the QA/cloud band
sur_refl_state_500m -- matching exactly the inputs the
EVI/LSWI/DVEL hierarchical flood classifier needs (NIR, RED, BLUE for
EVI; NIR, SWIR for LSWI).
Use collection=modis-09Q1-061 for the 250m, red/NIR-only
product instead of the default 500m 7-band product.