爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 3292|回复: 1

[分享资料] 应该都为可行的,但由于个人技术原因,不知道为什么第一个停止运行,DOS环境下也不行

[复制链接]

新浪微博达人勋

发表于 2017-8-27 08:07:30 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
   给大家推荐两个算SPI的网站,一个是http://drought.unl.edu/Monitorin ... ableSPIProgram.aspx(不会做成链接形式请见谅,复制粘贴),可以下载SPI_sL_6.exe,还有一个是Matlab的方法,代码如下:
  %%% Programmed by Taesam Lee,  Dec.03,2009% INRS-ETE, Quebec, Canadafunction [Z]=SPI(Data,scale,nseas)%Standardized Precipitation Index % Input Data% Data : Monthly Data vector not matrix (monthly or seasonal precipitation)% scale : 1,3,12,48% nseas : number of season (monthly=12)% Example% Z=SPI(gamrnd(1,1,1000,1),3,12); 3-monthly scale, % Notice that  the rest of the months of the fist year are removed.% eg. if scale =3, fist year data 3-12 SPI values are not estimated.%if row vector then make coloumn vector%if (sz==1) Data(:,1)=Data;enderase_yr=ceil(scale/12);% Data setting to scaled datasetA1=[];for is=1:scale, A1=[A1,Data(is:length(Data)-scale+is)];endXS=sum(A1,2);if(scale>1), XS(1:nseas*erase_yr-scale+1)=[];   endfor is=1:nseas    tind=is:nseas:length(XS);    Xn=XS(tind);    [zeroa]=find(Xn==0);    Xn_nozero=Xn;Xn_nozero(zeroa)=[];    q=length(zeroa)/length(Xn);    parm=gamfit(Xn_nozero);    Gam_xs=q+(1-q)*gamcdf(Xn,parm(1),parm(2));    Z(tind)=norminv(Gam_xs);end%Gamma parameter estimation and tranform希望能帮到会用的人,反正我现在是不太会用
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-8-27 08:10:19 | 显示全部楼层
m文件没复制好,不知道我有没有权利上传

SPI.m

1.07 KB, 下载次数: 0, 下载积分: 金钱 -5

license.txt

1.28 KB, 下载次数: 0, 下载积分: 金钱 -5

密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表