Google Earth Engine(GEE)提取点的土壤湿度

今天来分享下如何利用GEE提取点的土壤湿度,首先介绍一个数据集NASA/GLDAS/V021/NOAH/G025/T3H,里面包含很多数据集,包括气象、土壤、气温等数据,

13854e3cfd2aa48d8f29fa0fca095853.jpeg

例如:

CanopInt_inst植物冠层地表水含量、

ECanop_tavg树冠水分蒸发

ESoil_tavg裸土蒸发量

Snowf_tavg雪速率

SoilMoi0_10cm_inst土壤湿度

SoilTMP0_10cm_inst土壤温度

Tair_f_inst气温

Wind_f_inst风速

GEE调用代码如下:

var roi = /* color: #d63000 */ee.Geometry.Point([121.3664979892787, 37.45796001127996]);
// Create a chart for SoilMoi100_200cm_inst trend in point 1.
Map.centerObject(roi,7)
var dataset = ee.ImageCollection('NASA/GLDAS/V021/NOAH/G025/T3H')
          .filterBounds(roi)
          .filterDate('2006-01-01', '2016-12-31')
          .select('SoilMoi100_200cm_inst');


var radius_lst = ee.List([250, 500, 1000, 1500, 2000]);


var colByRadius = ee.List(radius_lst).map(function (radius) {


  var months = ee.List.sequence(1, 12);
  var start_year = 2006;
  var start_date = '2006-01-01';
  var end_year = 2016;
  var end_date = '2016-12-31';


  var years = ee.List.sequence( start_year, end_year);


  var ptsbuff = ee.FeatureCollection(roi).map(function (radius, bounds) {
    return function(pt) {
      pt = ee.Feature(pt);
    return bounds ? pt.buffer(radius).bounds() : pt.buffer(radius);
  };
  }(radius, false));


  var byMonthYear =  years.map(function (y) {
      return months.map(function(m) {
        var w = dataset.filter(ee.Filter.calendarRange(y, y, 'year'))
                    .filter(ee.Filter.calendarRange(m, m, 'month'))
                    .mean();
        var pointMean = w.reduceRegion(
          {reducer:ee.Reducer.first(), 
          geometry:ptsbuff, scale:500});  
     
      // set the dictionary as property and cast to an ee.Image, as setMulti returns an ee.Element.
      return ee.Feature(null).set("value",
                                  pointMean
                                    .get("SoilMoi100_200cm_inst"))
                                    .set("year",y)
                                    .set("month",m)
                                    .set("radius", radius);
      


      });
    }).flatten();


  return byMonthYear;


}).flatten();


Export.table.toDrive({collection:ee.FeatureCollection(colByRadius), description:"csvExport"})

 导出结果:

1173c077b199f0024ca3b4c591c57943.jpeg

感谢关注,欢迎转发!

声明:仅供学习使用!

GEE demo:

https://code.earthengine.google.com/699a662afe7028ac818e03c04b3a5753

如果对你有帮助的话记得给小编点个赞!

  • 4
    点赞
  • 69
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

生态遥感监测笔记

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值