1

I am trying to use GEE to realize MW to invert LST, but I have a problem. I don't know what went wrong.The result of my calculation is out of kilter.For the scene of Landsat 8 calculated on August 31, 2016, the calculated LST range was 306-406, but I used the SMW code of sofiaermida/Landsat_SMW_LST to calculate the range was 276-323. Although the algorithm was different, the result deviation was a little big.

code_MW: https://code.earthengine.google.com/7354defcc140fdf9c6aaae831c82f5d0

// ========== mian ========== \\
{
// roi_para
var roi = ee.FeatureCollection("users/bw_chen1223/410100");

// algorith_para
//// Empirical coefficient of surface emissivity
var em1 = 0.004;
var em2 = 0.986;

//// Average atmospheric acting temperature
var  Ta = 25.288;

//// Band average atmospheric transmission
var aat = 0.76;
}
// -----Function----- \\
// compute: radiance
function radiance(image){
  return ee.Algorithms.Landsat.calibratedRadiance(image);
  }

// compute: brightness temperature
function compute_BT(image){
  return image.addBands(image.expression(
    '1321.08 / log(1+774.89/b10)',
    {'b10': image.select('B10')}
    ).rename('bt'));
  }
  
// compute: NDVI
function compute_NDVI(image){
  return image.addBands(image.expression(
    
     '(nir-red)/(nir+red)', {
       'nir': image.select('B5'),
       'red': image.select('B4')
    }).rename('ndvi'));
  }
  
// compute: maximum or minimum value
function extreme_value(image, reduce){
  return ee.Number(image.reduceRegion({
               reducer: reduce,
               geometry: roi,
               scale: 30,
               maxPixels: 1e9
               }).values().get(0));
              }


// compute: Vegetation Coverage
function compute_FVC(image){
  return image.addBands(image.expression(
    
     '(ndvi-ndvi_min) / (ndvi_max+ndvi_min)', {
       'ndvi': image.select('ndvi'),
       'ndvi_min': extreme_value(image.select('ndvi'), ee.Reducer.min()),
       'ndvi_max': extreme_value(image.select('ndvi'), ee.Reducer.max())
    }).rename('fvc'));
  }


// compute: emissivity
function compute_emissivity(image){
  return image.addBands(image.expression(
      'em1*fvc + em2',{
      'em1': em1,
      'fvc': image.select('fvc'),
      'em2': em2
      }
    ).rename('emissivity'));
  }


// compute: Land Surface Temperature
function compute_lst(image){
  var C = image.select('emissivity').multiply(aat).rename('C');
  var D = image.expression(
    '(1.0-aat)*(1.0-(1-em)*aat)',{
      'aat': aat,  // Band average atmospheric transmission
      'em': image.select('emissivity')
      }).rename('D');
  var LST = image.addBands(image.expression(
    '(a*(1-sum)+(b*(1-sum)+sum)*BT-D*Ta)/C',{
      'a': -66.51672,
      'b': 0.45165,
      'C': C,
      'D': D,
      'sum': C.add(D),
      'BT': image.select('bt'),
      'Ta': Ta
      }).rename('lst'));
  return LST;
  }
  

var dataset = ee.Image('LANDSAT/LC08/C01/T1/LC08_124036_20160831').clip(roi);
var dataset_radiance = radiance(dataset);
var dataset_bt = compute_BT(dataset_radiance);
var dataset_ndvi = compute_NDVI(dataset_bt);
var dataset_fvc = compute_FVC(dataset_ndvi);
var dataset_emissivity = compute_emissivity(dataset_fvc);
var dataset_lst = compute_lst(dataset_emissivity);


print('result',dataset_lst);
print(extreme_value(dataset_lst.select('lst'), ee.Reducer.min()));
print(extreme_value(dataset_lst.select('lst'), ee.Reducer.max()));
Map.addLayer(dataset_lst.select('lst'), {palette: ['blue', 'limegreen', 'yellow', 'darkorange', 'red']}, 'LST');

code_SMW: https://code.earthengine.google.com/d020daf5c59709a98c4767499c25ab59

var LandsatLST = require('users/sofiaermida/landsat_smw_lst:modules/Landsat_LST.js')
var geometry = ee.FeatureCollection("users/bw_chen1223/410100");


// select region of interest, date range, and landsat satellite
var satellite = 'L8';
var date_start = '2016-08-30';
var date_end = '2016-09-01';
var use_ndvi = true;

// get landsat collection with added variables: NDVI, FVC, TPW, EM, LST
var LandsatColl = LandsatLST.collection(satellite, date_start, date_end, geometry, use_ndvi);
print(LandsatColl);

// select the first feature
var exImage = LandsatColl.first().clip(geometry);

// compute: maximum or minimum value
function extreme_value(image, reduce){
  return ee.Number(image.reduceRegion({
               reducer: reduce,
               geometry: geometry,
               scale: 30,
               maxPixels: 1e9
               }).values().get(0));
              }
print(extreme_value(exImage.select('LST'), ee.Reducer.min()));
print(extreme_value(exImage.select('LST'), ee.Reducer.max()));

var cmap1 = ['blue', 'cyan', 'green', 'yellow', 'red'];
var cmap2 = ['F2F2F2','EFC2B3','ECB176','E9BD3A','E6E600','63C600','00A600']; 

Map.centerObject(geometry);
Map.addLayer(exImage.select('TPW'),{min:0.0, max:60.0, palette:cmap1},'TCWV');
Map.addLayer(exImage.select('TPWpos'),{min:0.0, max:9.0, palette:cmap1},'TCWVpos');
Map.addLayer(exImage.select('FVC'),{min:0.0, max:1.0, palette:cmap2}, 'FVC');
Map.addLayer(exImage.select('EM'),{min:0.9, max:1.0, palette:cmap1}, 'Emissivity');
Map.addLayer(exImage.select('B10'),{min:290, max:320, palette:cmap1}, 'TIR BT');
Map.addLayer(exImage.select('LST'),{min:290, max:320, palette:cmap1}, 'LST');
Map.addLayer(exImage.multiply(0.0001),{bands: ['B4', 'B3', 'B2'], min:0, max:0.3}, 'RGB');

sofiaermida/Landsat_SMW_LST: https://code.earthengine.google.com/?accept_repo=users/sofiaermida/landsat_smw_lst

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.