- 积分
- 1626
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-1-5
- 最后登录
- 1970-1-1

|

楼主 |
发表于 2018-4-18 22:39:56
|
显示全部楼层
RE: 请各位帮忙看看距平百分率、正距平概率合成有没有什么问题
国家气候中心合成图。降水距平百分率脚本如下:
f = addfile('f:/precip.mon.mean.2.5x2.5.nc')
axesm()
mlayer = shaperead('F:\MeteoInfo\MeteoInfo\Map\country1.shp')
geoshow(mlayer,edgecolor=(0,0,255))
prepJJA = []
for i in range(1981,2018):
tidx = (i-1948)*12
t = f.gettime(tidx)
data = f['precip'][tidx+5,:,:]+f['precip'][tidx+6,:,:]+f['precip'][tidx+7,:,:]
prepJJA.append(data)
prepmJJA = sum(prepJJA[0:30])/30.0
for t in range(0,37):
prepJJA[t] = (prepJJA[t]-prepmJJA)*100/prepmJJA
years = [1985,1989,1996,2000,2001,2008,2011,2012]
com_ana_pres = []
for year in years:
yid = year - 1981
#print yid
com_ana_pres.append(prepJJA[yid])
com_ana_pre = sum(com_ana_pres[0:])/len(years)
clevs =[-50,-40,-30,-20,-10,0,10,20,30,40,50]
cols=[(182,106,40),(205,133,63),(225,165,100),(245,205,132),(245,224,158),\
(255,245,186),(205,255,205),(153,240,178),(83,189,159),(110,170,200),\
(5,112,176),(2,56,88)]
#layer = contourfm(com_ana_pre,20)
layer = contourfm(com_ana_pre,clevs, colors=cols)
colorbar(layer,orientation='horizontal')
xlim(60,150)
ylim(0,60)
title('Anomaly Percentage(%)')
|
-
|