# This file generates a polar plot of the radiation field calculated # with libRadtran. from pylab import * from libradtran import * # In order to import libradtran functions copy the file libradtran.py # (available at # http://www.meteo.physik.uni-muenchen.de/~emde/doku.php?id=python:pylibtran ) # in your working directory # number of streams nstr=8 # read uvspec output (umu, phi, rad_av, rad) = read_librad_radiances('aerosol_nstr%02d.out' % nstr) fig = figure(figsize=(8,8)) # Create axes for polar plot ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True) # number of contours N=50 contourf(phi*pi/180, 180.-arccos(umu)*180/pi, rad, N, cmap=cm.jet) # see help(colormap) for available color schemes colorbar(shrink=0.7) # specify limits for colors if needed # clim(20,100) text(0.55, 1.1, 'Polar plot of radiance field for nstr=%02d' %nstr, fontsize=18, horizontalalignment='center', verticalalignment='center', transform = ax.transAxes) # Save file savefig('aerosol_nstr%02d.png' % nstr)