Zum Inhalt

Wmax

Verteilungsdichte der Schadensmeldungen in Abhängigkeit von der Windgeschwindigkeit

Ergebnis

Hohe Windgeschwindigkeiten begünstigen die Gleichzeitigkeit von Störmeldungen, weil diese zumeist großräumig auftreten.

Abb.: Verteilungsdichte der Störmeldungen (N) in Abhängigkeit von der Windgeschwindigkeit (Wmax) über alle PDs: N>0 und N>40.


Code

Module

# -*- coding: utf-8 -*-
import sys
import numpy as N
import shapefile
import scipy.stats as stats
import pylab as P
from matplotlib.collections import PatchCollection
from pylab import Polygon
from mpl_toolkits.basemap import Basemap

P.style.use('bmh')

params = {'legend.fontsize': 8,'font.family': 'serif'}
P.rcParams.update(params)

Reading

tmp=N.genfromtxt('../shp/GP.csv',names=True,comments='#',delimiter=';',dtype=None)#,encoding='UTF-8')
pds = tmp['Name']

print (pds)

Plotting

filter = 'Filter1'

P.figure(figsize=(8,5))

xx = []
yy = []

for pd in pds: 

        pd = pd.replace('\xfc', 'ü').replace('\xf6', 'ö')

        file = '../csv/obs-dwd/'+pd+'.csv'
        data=N.genfromtxt(file,names=True,comments='#',delimiter=';',dtype=None,encoding='utf-8')

        id = N.where((data['ja']>=2015)&(data['ja']<=2019))[0]

        tmax = data['wmax'][id] 

        file = '../csv/pds-uas/'+pd+'.csv'
        data=N.genfromtxt(file,names=True,comments='#',delimiter=';',dtype=None,encoding='utf-8')
        id = N.where((data['ja']>=2015)&(data['ja']<=2019))[0]

        uas = data[filter][id]

        id = N.where(uas>0)[0]

        for i in id:

            xx.append(tmax[i])
            yy.append(uas[i])   

xx = N.array(xx)
yy = N.array(yy)

for sw in [0,40]:

    id = N.where(yy>sw)[0]

    print (len(id),0.0002)

    xs = xx[id]
    ys = yy[id]

    values = N.vstack([xs,ys])
    kernel = stats.gaussian_kde(values,bw_method="scott")
    X, Y = N.mgrid[0:40:200j,0:100:200j]
    positions = N.vstack([X.ravel(),Y.ravel()])
    Z2 = N.reshape(kernel(positions).T, X.shape)

    print (N.max(Z2))

    lev = N.arange(0.2,10,0.5)

    CF=P.contourf(X,Y,1000*Z2,levels=lev,cmap=P.cm.YlOrRd,extend='max',zorder=1)
    P.contour(X,Y,1000*Z2,levels=lev,colors='k',linewidths=0.5,zorder=1)

P.text(25,45,'N>40',size=22,weight='bold',ha='center',va='center',bbox=dict(boxstyle="circle", ec='k', fc='gray',alpha=0.5,lw=2))

P.tick_params(direction='out')
P.xlim(0,30)
P.ylim(0,60)

P.grid(color='k')
P.xlabel('wmax [m/s]',fontsize=16,weight='bold')
P.ylabel('Meldungen pro Tag je PD',fontsize=16,weight='bold')
P.title('Meldungen ('+filter+') ~ Wmax',fontsize=16,weight='bold')

P.savefig('./img/wmax_'+filter+'.png',dpi=240,bbox_inches='tight')