0

I have downloaded 8-day MODIS LST products (MOD11A2) for the whole year of 2011 and is there any method in R to extract those pixels in clear sky conditions with emissivity error < 0.01 and LST error < 1 K and average LST values for each pixel to generate only one raster map for 2011? My current code is not complete as below.

    lst <- lapply(list.files("D:/LST2011/Surf_Temp_8Days_1Km_v6/LST_Day_1km", 
                     pattern = "LST_Day_1km", full.names = T), raster)
    csd <- lapply(list.files("D:/LST2011/Surf_Temp_8Days_1Km_v6/Days_Clear", 
                     pattern = "Days_Clear", full.names = T), raster)
    mean_lst <- temporalComposite(lst, csd, fun = function(x) mean(x, na.rm = TRUE))
2
  • You need to translate QA band from integer to binary. In R, I posted an answer related to this topic. You can extract emiss. error and LST error by 8-days composite and after this apply a mask. Without sample data, I can't help you more
    – aldo_tapia
    Nov 28, 2017 at 17:44
  • Does this code actually work or did you just cobble something together for the post? I do not see how your lapply function would work on a stack with a call to raster. Are you creating a list object full of single rasters? You want to read the data as a stack and then use overlay to calculate the mean. This is quite simple and has be covered numerous times on this forum. Nov 28, 2017 at 17:45

0

Browse other questions tagged or ask your own question.