mods = ['obs-dwd','cnr-clm','ece-clm','had-clm','mpi-clm','mpi-rca','cnr-rca','nor-rca','ips-rca','ece-rca','had-rca','cnr-hir','had-hir','ece-hir','nor-hir','cnr-rac','had-rac','ece-rac']
jo = N.arange(1971,2100,1)
nj = len(jo)
nd = 365
P.figure(figsize=(6,5))
for mod in mods:
print (mod)
file = '../data/csv/rcp85/%s/eastbasz.txt'%mod
dat = N.genfromtxt(file,names=True,dtype=None)
tmit = N.zeros((nj,nd),float);tmit[:,:] = N.nan
for j in range(nj):
id = N.where(dat['jahr']==jo[j])[0]
if(len(id)>0):
id = id[0:nd]
tmit[j,:] = dat['tas'][id]
basl = N.mean(tmit[0:40,:],0)
for j in [1,2,3,4,5]:
if(mod=='obs-dwd'):
anom = ma(N.ravel(tmit[0:40,:]-basl),5)
pos = len(N.where(anom>=j)[0])/40.
neg = len(N.where(anom<=-1*j)[0])/40.
P.scatter(pos,neg,s=50,c='None',ec='k')
P.text(pos,neg,'%i K'%j,fontsize=16,weight='bold')
else:
anom = ma(N.ravel(tmit[0:40,:]-basl),5)
pos = len(N.where(anom>=j)[0])/40.
neg = len(N.where(anom<=-1*j)[0])/40.
P.scatter(pos,neg,s=50,c='None',ec='y')
anom = ma(N.ravel(tmit[40:80,:]-basl),5)
pos = len(N.where(anom>=j)[0])/40.
neg = len(N.where(anom<=-1*j)[0])/40.
P.scatter(pos,neg,s=50,c='None',ec='orange')
anom = ma(N.ravel(tmit[80:120,:]-basl),5)
pos = len(N.where(anom>=j)[0])/40.
neg = len(N.where(anom<=-1*j)[0])/40.
P.scatter(pos,neg,s=50,c='None',ec='r')
P.xlim(0,350)
P.ylim(0,150)
P.xlabel('Tage mit positiven Temperaturanomalien',fontsize=12,weight='bold')
P.ylabel('Tage mit negativen Temperaturanomalien',fontsize=10,weight='bold')
P.tick_params(direction='out')
P.tight_layout()
P.savefig('./img/anomalien.png',dpi=240,bbox_inches='tight')