# Gnuplot script to show solar spectral irradiance at 1 AU, # in W/(m2.nanometer). # The Planck spectrum of a "blacbody Sun" giving the same total irradiance # is shown too. # Three solar spectra are: # above-atmosphere, tilted AM 1.5 total, and direct AM 1.5 # taken from # http://rredc.nrel.gov/solar/spectra/am1.5/ # Titles are in English. Script by Jan Hollan, 2013, svg version set encoding utf8 set term svg enhanced size 800,600 #set term postscript eps color enhanced set out "solar_en.svg" set grid Planck(x,t) = \ 1E-9*3.741E-16/(( exp(5*log((x*1E-6))) )*(exp(1.439E-2/(x*t*1E-6))-1)) aur = (149.6/0.6963)**2 set title font ",14" \ "Solar spectra at 1 AU, logarithmic scale λ; \ Planck function for 5778 K" set ylabel \ "( λ / nm) × \ density of spectral radiant flux\n \ / (W.m^{/*0.7 -2}nm^{/*0.7 -1})" set xlabel "ln (λ / nm)" set xtics 1 nomirror set x2label "λ / nm" set x2tics font ",10" \ ("Ca \n 395 " log(395), \ "Hγ\n 434" log(434),\ "Hβ\n 486" log(486), \ "Na\n 589" log(589), \ "Hα\n 656" log(656.28), \ "O_2\n 759" log(759), \ "1000" log(1000), "2000" log(2000) , "4000" log(4000)) # "b\n 517" log(517), \ # "Fe,527" log(527), \ f(x)=exp(x)*Planck(exp(x)/1000,5778) / aur plot [5.6:8.3] \ "a.txt" using (log($1)):($2*$1) \ with lines lt 1 title 'above atmosphere',\ "a.txt" using (log($1)):($3*$1) with lines lt 2 \ title 'AM 1.5 incl. diffuse radiation' ,\ "a.txt" using (log($1)):($4*$1) with lines lt 3 \ title 'through AM 1.5', \ f(x) title 'blackbody 5778 K' with lines lt 4 lw 2 quit