公众号整理的代码,(来源https://mp.weixin.qq.com/s/H0MPZyOf7gF7ccAhtqmI7A)
#计算SPEI和SPI,其中PET算法为thornthwaite(),用到月降水量、月平均温度和纬度。
#注:R还提供hargreaves(),penman()两种PET算法
library(lmomco)
library(SPEI)
file<-read.table("./test.txt",header=TRUE)#读取文件
file$PET
公众号整理的代码,(来源https://mp.weixin.qq.com/s/H0MPZyOf7gF7ccAhtqmI7A)
#计算SPEI和SPI,其中PET算法为thornthwaite(),用到月降水量、月平均温度和纬度。
#注:R还提供hargreaves(),penman()两种PET算法
library(lmomco)
library(SPEI)
file<-read.table("./test.txt",header=TRUE)#读取文件
file$PET