Dear Maik, Kai and admins....
After i running and plot vol data using this script below , I want to convert vol data from gematronik into netcdf...how to convert it?
this script...succes to plot but I want to save it in netcdf format...
import wradlib as wrl
import numpy as np
import xmltodict
import matplotlib.pyplot as pl
from numpy.random import uniform, seed
from matplotlib.mlab import griddata
import matplotlib.pyplot as plt
import numpy as np
def dependencies_for_myprogram():
import xmltodict
def ex_load_rainbow():
filename = wrl.util.get_wradlib_data_file('rainbow/2013080100020900dBZ.vol')
# load rainbow file contents to dict
rbdict = wrl.io.read_Rainbow(filename)
# which slice to select from volume scan
slice = 0
data=rbdict['volume']['scan']['slice'][slice]['slicedata']['rawdata']['data']
# get azimuthal data
azi = rbdict['volume']['scan']['slice'][slice]['slicedata']['rayinfo']['data']
azidepth = float(rbdict['volume']['scan']['slice'][slice]['slicedata']['rayinfo']['@depth'])
azirange = float(rbdict['volume']['scan']['slice'][slice]['slicedata']['rayinfo']['@rays'])
anglestep = float(rbdict['volume']['scan']['pargroup']['anglestep'])
azi = azi * azirange * anglestep / 2**azidepth
# create range array
stoprange = float(rbdict['volume']['scan']['pargroup']['stoprange'])
rangestep = float(rbdict['volume']['scan']['slice'][slice]['rangestep'])
r = np.arange(0,stoprange,rangestep)
unit = rbdict['volume']['scan']['slice'][slice]['slicedata']['rawdata']['@type']
time = rbdict['volume']['scan']['slice'][slice]['slicedata']['@time']
date = rbdict['volume']['scan']['slice'][slice]['slicedata']['@date']
lon = rbdict['volume']['sensorinfo']['lon']
lat = rbdict['volume']['sensorinfo']['lat']
sensortype = rbdict['volume']['sensorinfo']['@type']
sensorname = rbdict['volume']['sensorinfo']['@name']
cgax, caax, paax, pm = wrl.vis.plot_cg_ppi(data, r=r, az=azi, subplot=111)
from mpl_toolkits.basemap import Basemap
#cgax, caax, paax, pm = wrl.vis.plot_cg_ppi(data, r=r, az=azi, subplot=111)
title = sensortype + ' ' + sensorname + ' ' + date + ' ' + time + '\n' + lon + 'E ' + lat + 'N'
t = pl.title(title, fontsize=12)
t.set_y(1.1)
#cbar = pl.gcf().colorbar(pm, pad=0.075)
#caax.set_xlabel('x_range [km]')
#caax.set_ylabel('y_range [km]')
#pl.text(1.0, 1.05, 'azimuth', transform=caax.transAxes, va='bottom',ha='right')
# cbar.set_label('reflectivity [' + unit + ']')
pl.tight_layout()
pl.show()
if __name__ == '__main__':
ex_load_rainbow()