• GEE开发之Modis_LST地表温度数据分析



    前言:这次主要介绍MODIS/006/MOD11A1下的地表温度的数据分析。


    1 MODIS/006/MOD11A1介绍

    MOD11A1 V6产品提供1200 x 1200公里网格中的每日地表温度(LST)和发射率值。温度值由MOD11_ L2线束乘积导出。在30度纬度以上,某些像素可能具有多个观测值,满足晴空标准。发生这种情况时,像素值是所有合格观测值的平均值。与白天和夜间地表温度带及其质量指示层一起提供的是MODIS波段31和32以及六个观测层。
    分辨率:1000m
    波段:白天和夜晚的LST都有

    2 遥感影像获取

    代码如下(以鹿邑县为例):

    var geometry = ee.FeatureCollection('users/www1573979951/luyixian')
    Map.centerObject(geometry,7)
     
    // Get  temperature data for 1 year.
    var modis = ee.ImageCollection('MODIS/006/MOD11A1');
    var modisLST = modis.filterBounds(geometry).filterDate('2021-01-01', '2021-12-31').select('LST_Day_1km');
    
    // Convert temperature to Celsius.
    modisLST = modisLST.map(function(img){
      var date = img.get('system:time_start');
      return img.multiply(0.02).subtract(273.15).set('system:time_start', date);
    });
    print(modisLST)
    Map.addLayer(modisLST.mean().clip(geometry), {min: 10, max: 30, palette: ['green','yellow', 'red']},'LST');
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14

    遥感图像截图
    在这里插入图片描述
    影像数据截图(364个)
    在这里插入图片描述

    3 每日遥感数据获取

    第一种代码如下(以鹿邑县为例)

    var geometry = ee.FeatureCollection('users/www1573979951/luyixian')
    
    // Get  temperature data for 1 year.
    var modis = ee.ImageCollection('MODIS/006/MOD11A1');
    var modisLST = modis.filterBounds(geometry).filterDate('2021-01-01', '2021-12-31').select('LST_Day_1km');
    
    // Convert temperature to Celsius.
    modisLST = modisLST.map(function(img){
      var date = img.get('system:time_start');
      return img.multiply(0.02).subtract(273.15).set('system:time_start', date);
    });
    
    print(modisLST)
    print(ui.Chart.image.series(modisLST, geometry, ee.Reducer.mean(), 1000));//打印成折线图
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15

    在这里插入图片描述
    CSV数据截图:
    在这里插入图片描述
    第二种代码如下(以鹿邑县为例)

    var geometry = ee.FeatureCollection('users/www1573979951/luyixian')
    
    // Get  temperature data for 1 year.
    var modis = ee.ImageCollection('MODIS/006/MOD11A1');
    var modisLST = modis.filterBounds(geometry).filterDate('2021-01-01', '2021-12-31').select('LST_Day_1km');
    
    // Convert temperature to Celsius.
    modisLST = modisLST.map(function(img){
      var date = img.get('system:time_start');
      return img.multiply(0.02).subtract(273.15).set('system:time_start', date);
    });
    
    
    var createTS = function(img){
      var date = img.get('system:time_start');
      var value = img.reduceRegion(ee.Reducer.mean(), geometry).get('LST_Day_1km');
      var ft = ee.Feature(null, {'system:time_start': date,'date': ee.Date(date).format('Y/M/d'),'value': value});
      return ft;
    };
     
    // Apply the function to each image in modisLST.
    var TS = modisLST.map(createTS);
    print('TS', TS);
    
    print(ui.Chart.image.series(modisLST, geometry, ee.Reducer.mean(), 1000));//打印成折线图
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25

    在这里插入图片描述
    在这里插入图片描述

    4 每月遥感数据获取

    代码如下(以鹿邑县为例)

    var geometry = ee.FeatureCollection('users/www1573979951/luyixian')
    
    // Get  temperature data for 1 year.
    var modis = ee.ImageCollection('MODIS/006/MOD11A1');
    var modisLST = modis.filterBounds(geometry).filterDate('2021-01-01', '2021-12-31').select('LST_Day_1km');
    
    // Convert temperature to Celsius.
    modisLST = modisLST.map(function(img){
      var date = img.get('system:time_start');
      return img.multiply(0.02).subtract(273.15).set('system:time_start', date);
    });
    
    
    var MODISproj = ee.Image(modisLST.first()).projection();
    var monthList = ee.List.sequence({start:1,end:12,step:1});
     
    //** Function that takes the images for a specified month, calculates the
    //   mean over that month, then over a geometry, and returns a value
    //   alongside the first date as that month as a time stamp property
    var createMonthTS = function(month){
      //--- Define start and end of current month search window (end is exclusive)
      var start = ee.Date.fromYMD(2021, month, 1);
      var end = start.advance(1, 'month');
      //--- Filter by start and end dates
      var monthColl = modisLST.filterDate(start, end);
      //--- First reduce collection with mean reducer, then extract value from geometry
      var monthMean = monthColl.mean();
      var meanVal = monthMean.reduceRegion({
        reducer: ee.Reducer.mean(),
        geometry: geometry,
        crs: MODISproj});
     
      //--- Create feature with desired data/properties and empty geometry
      var ft = ee.Feature(null, {
        'system:time_start': ee.Image(monthColl.first()).get('system:time_start'),
        'date': start.format('Y/M/d'),
        'value': meanVal.get('LST_Day_1km')
      });
      return ft;
    };
     
    //** Map funciton over month list; recast as feature colleciton
    var monthTS = ee.FeatureCollection(monthList.map(createMonthTS));
    print('monthTS:', monthTS);
     
    //** Create new graph for monthly temperatures
    var monthGraph = ui.Chart.feature.byFeature({
      features:monthTS,
      xProperty:'system:time_start',
      yProperties: 'value'});
     
    //** Print graph to console
    print(monthGraph.setChartType("ColumnChart").setOptions({vAxis: {title: 'LST [deg. C]'},hAxis: {title: 'Date'}}));
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

  • 相关阅读:
    到底什么样才称为真正的低代码
    匿名信v1.4.4源码下载,安装教程
    如何用看板工具做轻量级项目管理
    Spring 学习(六)代理模式
    Vue-router的动态路由:获取传递的值
    Linux Shell编程
    Dart语言入门
    upload-labs文件上传1-5关
    python_logging日志模块按大小和时间分割方法
    iOS 17.4报错: libopencore-amrnb.a[arm64]
  • 原文地址:https://blog.csdn.net/qq_32306361/article/details/126221654