提取格网掩膜的边界经纬度,以格林兰岛为例

GRACE监测的格林兰岛冰川质量变化趋势存在正负的区域,现在我们可以在谷歌地球上直接勾出外围的轮廓。

而其内部存在正信号,因此不能直接勾出正信号的轮廓经纬度范围。

下面提供一个算法可以自动提取出格林兰岛内部正趋势的区域的经纬度范围。

%% Chistrong Wen

%% University of Stuttgart

%% 2025-3-11 23:48

xy= load('Greenland.txt');
xy(:,1) = 360+xy(:,1);
ind_mask = inpolygon(trend2.lon,trend2.lat,xy(:,1),xy(:,2));
A = ind_mask.*trend2.rg;
subplot(2,2,1)
pcolor(trend2.lon,trend2.lat,A)
shading flat
colormap(jet)
caxis([-10,10])
title('Originl trend')
subplot(2,2,2)
B = A;
B(B<0)=NaN;
B(B==0)=NaN;
B(isnan(B))=0;
B(B~=0)=1;
pcolor(trend2.lon,trend2.lat,B)
shading flat
title('Mask region with positive trend')
bound1 = bwboundaries(B);

for k = 1:length(bound1)
boundary = bound1{k};
boundaryLat = interp2(1:size(trend2.lat,2), 1:size(trend2.lat,1), trend2.lat, boundary(:,2), boundary(:,1));
boundaryLon = interp2(1:size(trend2.lon,2), 1:size(trend2.lon,1), trend2.lon, boundary(:,2), boundary(:,1));
end
%%
subplot(2,2,3)
pcolor(trend2.lon,trend2.lat,B)
shading flat
hold on
plot(boundaryLon, boundaryLat, 'r', 'LineWidth', 2);
plot(xy(:,1),xy(:,2),'g')
title('Mask region boundary')
%% save data
out_greenland = xy;
inner_greenland = [boundaryLon, boundaryLat];

运行结果:

❤️欢迎点赞收藏❤️

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

我是水怪的哥

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

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

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

打赏作者

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

抵扣说明:

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

余额充值