
Extracts Land Surface Temperature (LST) from MODIS MOD11A1
Source:R/l4h_surface_temp.R
l4h_surface_temp.Rd
Extracts daytime or nighttime Land Surface Temperature (LST) for a user-defined region and time range using the MODIS MOD11A1.061 product. The function supports summarizing the temperature data over each date using a selected statistic (e.g., mean or median).
Usage
l4h_surface_temp(
from,
to,
region,
band = "day",
level = "strict",
scale = 1000,
stat = "mean",
sf = TRUE,
quiet = FALSE,
force = TRUE,
...
)
Arguments
- from
Character or Date. Start date of the analysis (e.g.,
"2020-01-01"
).- to
Character or Date. End date of the analysis (e.g.,
"2020-12-31"
).- region
A spatial object defining the region of interest. Accepts an
sf
,sfc
, orSpatVector
object.- band
Character. LST type to extract:
"day"
(LST_Day_1km) or"night"
(LST_Night_1km). Default is"day"
.- level
Character. Quality filter level to apply to MODIS LST pixels. Use
"strict"
to retain only high-quality observations (QA bits 0–1 equal to00
), or"moderate"
to allow both high and acceptable quality (QA bits 0–1 equal to00
or01
). Default is"moderate"
.- scale
Numeric. Spatial resolution in meters. Default is
1000
(native resolution).- stat
Character. Summary statistic to apply per image per region. One of
"mean"
,"median"
,"min"
,"max"
. Passed toee_extract()
.- sf
Logical. If
TRUE
, returns ansf
object; ifFALSE
, returns atibble
. Default isTRUE
.- quiet
Logical. If
TRUE
, suppresses progress bars and messages. Default isFALSE
.- force
Logical. If
TRUE
, forces the extraction even if results are cached. Default isFALSE
.- ...
Additional arguments passed to
rgee::ee_extract()
.
Details
The MODIS MOD11A1.061 product provides daily Land Surface Temperature and quality information.
This function filters out low-quality or cloud-contaminated pixels based on the QC_Day
or QC_Night
band.
Only pixels where the quality control bits 0–1 equal 00
(high quality) are retained.
LST values are originally stored as Kelvin multiplied by 0.02. This function automatically
converts them to degrees Celsius using the formula: LST = (value × 0.02) - 273.15
.
Credits
Pioneering geospatial health analytics and open‐science tools. Developed by the Innovalab Team, for more information send a email to imt.innovlab@oficinas-upch.pe
Follow us on :
References
Wan, Z., Hook, S., & Hulley, G. (2015). MOD11A1 MODIS/Terra Land Surface Temperature and Emissivity Daily L3 Global 1km SIN Grid V006 (Version 6.1). NASA EOSDIS Land Processes DAAC. https://doi.org/10.5067/MODIS/MOD11A1.061
MODIS MOD11A1.061 - Google Earth Engine Dataset Catalog. https://developers.google.com/earth-engine/datasets/catalog/MODIS_061_MOD11A1
Examples
if (FALSE) { # \dontrun{
library(land4health)
ee_Initialize()
# Define a bounding box region in Ucayali, Peru
region <- st_as_sf(st_sfc(
st_polygon(list(matrix(c(
-74.1, -4.4,
-74.1, -3.7,
-73.2, -3.7,
-73.2, -4.4,
-74.1, -4.4
), ncol = 2, byrow = TRUE))),
crs = 4326
))
# Extract daytime LST for 2020
lst_day <- l4h_surface_temp(
from = "2020-01-01",
to = "2020-12-31",
region = region,
band = "day",
stat = "mean")
head(lst_day)
# Extract nighttime LST
lst_night <- l4h_surface_temp(
from = "2020-01-01",
to = "2020-12-31",
region = region,
band = "night",
stat = "mean")
head(lst_night)
} # }