参考链接:/forum.php?mod=viewthread&tid=36366
代码部分:
function HSI=calHSI(year,month,day,hour,min,lat,lon)
%HSI太阳高度角(单位:°)
%year年
%month月
%day日
%hour小时
%min分钟
%lat纬度(单位:°)
%lon经度(单位:°)
d=datenum(year,month,day)-datenum(year,1,1)+1;
T=2*pi*(d-1)/365; %单位:弧度
SD=(0.006918-0.399912*cos(T)+0.070257*sin(T)-0.006758*cos(2*T)+0.000907*sin(2*T)-0.002697*cos(3*T)+0.00148*sin(3*T));
ST=hour+min/60+(lon-120)/15;
w=15*(ST-12);
HSI=asind(sind(lat)*sin(SD)+cosd(lat)*cos(SD)*cosd(w));
end
另外,在excel中对/2/25 14:00:00格式的数据提取年、月、日、小时、分钟的方法:
=YEAR(A1)
=MONTH(A1)
=DAY(A1)
=HOUR(A1)
=MINUTE(A1)
转载本文请联系原作者获取授权,同时请注明本文来自张乐乐科学网博客。
链接地址:/blog-1103122-935807.html
上一篇:MODIS积雪产品代码含义
下一篇:Noah-MP模式中的一个小错误