Droughts
1000 year generated time series of monthly mean precipitation anomalies over Europe are analyzed in terms of consequtive wet/dry months.
Consucetive Month¶
Wet¶
1961-1990 | 1990-2019 |
---|---|
North-East Germany: The 100-year event of consequtive wet months has increased between 1961-1990 and 1990-2019 from 7.0 months to 7.5 months caused by dynamical changes.
Dry¶
1961-1990 | 1990-2019 |
---|---|
North-East Germany: The 100-year event of consequtive dry months has increased between 1961-1990 and 1990-2019 from 7.5 months to 8.0 months caused by dynamical changes.
Code¶
Importing¶
import matplotlib
matplotlib.use('Agg')
import numpy as N
import matplotlib.pyplot as P
from scipy import stats as S
from netCDF4 import Dataset,num2date
from mpl_toolkits.basemap import Basemap,maskoceans
from matplotlib.offsetbox import AnchoredText
P.rcParams["font.family"] = "serif"
Processing¶
for j in ['1961-1990','1990-2019']:
for k in ['dry','wet']:
file = '../csv/gen_%s/dw/prc_%s_ja.nc'%(j,k)
nc = Dataset(file,'r')
lons = N.array(nc.variables['longitude'][:])
lats = N.array(nc.variables['latitude'][:])
dats = N.array(nc.variables['pr'][:])
nc.close()
dats = dats[0,:,:]
P.figure(figsize=(6,8))
ax = P.subplot(111)
map = Basemap(projection='cyl',llcrnrlat=35.,urcrnrlat=70.,llcrnrlon=-15,urcrnrlon=30,resolution='l')
map.drawcoastlines(color='k')
map.drawcountries(linewidth=1,color='k')
map.drawlsmask(land_color = "lightgray",ocean_color="lightblue",resolution = 'h')
lon,lat = map(*N.meshgrid(lons,lats))
dat = maskoceans(lon,lat,dats)
lev = N.arange(1.2,2.6,0.2)
if(k=='dry'): lev = N.arange(6.5,10.5,0.5); col = 'terrain'; lab = 'consecutive dry months'
if(k=='wet'): lev = N.arange(5.5,9.5,0.5); col = 'terrain_r'; lab = 'consequtive wet months'
CM = map.contourf(lon,lat,dat,levels=lev,cmap=P.get_cmap(col),extend='both')
cbar = map.colorbar(CM,location='right',extend='max',pad="1%",drawedges=True,ticks=lev)
cbar.set_label(lab,fontsize=12,weight='bold')
cbar.ax.tick_params(labelsize=8)
at = AnchoredText(r"$\varnothing$ %.1f"%N.nanmean(dat),prop=dict(size=10),frameon=True,loc='upper left')
at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2")
ax.add_artist(at)
at = AnchoredText(j,prop=dict(size=10),frameon=True,loc='lower left')
at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2")
ax.add_artist(at)
P.savefig('./img/risk_%s_%s.png'%(k,j),dpi=240,transparent=False,bbox_inches='tight',pad_inches=0.0)