0

I am very confused if the process I have adopted to calculate the annual LST for a year is correct or not. Also, I am trying to chart the value but I see 'No features contain non-null values of "system:time_start"'. please help me in determining if my code is correct and how I can map it. Many thanks in advance. Here is my code:

3 vars for aqua, terra and shapefile of the region have been inserted above.

//Yearly Averages 
// For year 2002
//Terra
var mod11a2 = Terra.filterDate('2002-02-24', '2002-12-31'); //selected date 
var modLST = mod11a2.select('LST_Day_1km', 'LST_Night_1km');
print(modLST);
var inCelsius1 = modLST.map(function(img){
   return img.multiply(0.02).subtract(273.15)
    .copyProperties(img, ['system:time_start']);
});
print('converted', inCelsius1);
var mean1 = inCelsius1.mean().clip(basin);
print(mean1);
//For Aqua
var myd11a2 = Aqua.filterDate('2002-02-24', '2002-12-31'); //selected date 
var mydLST = myd11a2.select('LST_Day_1km', 'LST_Night_1km');
print(mydLST);
var inCelsius2 = mydLST.map(function(img){
   return img.multiply(0.02).subtract(273.15)
    .copyProperties(img, ['system:time_start']);
});
print('converted', inCelsius2);
var mean2 = inCelsius2.mean().clip(basin);
print(mean2);
var addition = mean1.add(mean2);
print(addition);
var Mean_2002 = addition.focalMean(1.5, 'square', 'pixels',2);
print(Mean_2002);
// Chart time series of LST
var ts1 = ui.Chart.image.series({
  imageCollection: Mean_2002,
  region: basin,
  reducer: ee.Reducer.median(),
  scale: 1000,
  xProperty: 'system:time_start'})
  .setOptions({
     title: 'LST 2002 to 2022 Time Series',
     vAxis: {title: 'LST Celsius'}});
print(ts1);
Export.image.toDrive({
  image: Mean_2002,
  description: 'LST_2002',
  folder: 'my_folder',
  region: basin,
  scale: 1000,
  crs: 'EPSG:4326',
  maxPixels: 1e10});

I tried calculating annual LST for 12 months in a year. I am not sure if my process is correct. I want to calculate the mean of annual LST from 2002 for both TERRA & AQUA MODIS as one image and chart it.

0 Answers0