from pylab import * from matplotlib import pyplot solar_spectrum=loadtxt('/local/libRadtran-1.5-beta/data/solar_flux/kurudz_1.0nm.dat') # irradiance from 300 to 500 nm sw_spectrum=loadtxt('tmp/uv0.out') pyplot.plot(sw_spectrum[:,0], sw_spectrum[:,1], label='irradiance 0') # change 1 to desired variable pyplot.title('irradiance spectrum') pyplot.xlabel('wavelength [nm]') pyplot.ylabel('irradiance [mW/ (m^2 nm)]') pyplot.legend(loc=2) sw_spectrum=loadtxt('tmp/uv15.out') pyplot.plot(sw_spectrum[:,0], sw_spectrum[:,1], label='irradiance 15') # change 1 to desired variable pyplot.title('irradiance spectrum') pyplot.xlabel('wavelength [nm]') pyplot.ylabel('irradiance [mW/ (m^2 nm)]') pyplot.legend(loc=2) sw_spectrum=loadtxt('tmp/uv30.out') pyplot.plot(sw_spectrum[:,0], sw_spectrum[:,1], label='irradiance 30') # change 1 to desired variable pyplot.title('irradiance spectrum') pyplot.xlabel('wavelength [nm]') pyplot.ylabel('irradiance [mW/ (m^2 nm)]') pyplot.legend(loc=2) sw_spectrum=loadtxt('tmp/uv45.out') pyplot.plot(sw_spectrum[:,0], sw_spectrum[:,1], label='irradiance 45') # change 1 to desired variable pyplot.title('irradiance spectrum') pyplot.xlabel('wavelength [nm]') pyplot.ylabel('irradiance [mW/ (m^2 nm)]') pyplot.legend(loc=2) {{:teaching:radiative_transfer:uv-spectrum1.png|}} sw_spectrum=loadtxt('tmp/uv60.out') pyplot.plot(sw_spectrum[:,0], sw_spectrum[:,1], label='irradiance 60') # change 1 to desired variable pyplot.title('irradiance spectrum') pyplot.xlabel('wavelength [nm]') pyplot.ylabel('irradiance [mW/ (m^2 nm)]') pyplot.legend(loc=2) pyplot.show() pyplot.savefig('solar_irrad_uv.png')