How can I convert
$$ W m^{-2} sr^{-1} nmm^{-1} $$
to
$$ W m^{-2} nm^{-1} $$
I have the following matlab code to illustrate the spectral energy distribution of solar radiation:
h = 6.626e-34; % Planck's Constant = 4.135 x 10^-15 eV s
c = 3e8; % speed of light (MKS)
T= 6000; % kelvin
k = 1.38066e-23; % Boltzmann constant in J/K
lamda = 0:20e-9:3200e-9;
p = 2*3.14*h*c*c./(lamda.^5);
b6000 = p./(exp(h*c./(lamda*k*T)-1));
lamda = lamda.*1000000;
plot(lamda,b6000,'.');
title('Planck Radiation Law');
xlabel('Wavelength [\mu{m}]')
ylabel('Irradiance [W m^{-2} sr^{-1} nmm^{-1}]');
xlim([0 3.2]);
This is my result:
How would I change my yaxis to be the same as the example shown?
but I need the yaxis to be in units of
$$ W m^{-2} nm^{-1} $$
so that the curve looks like
From the plot, it seems that dividing the irradiance by 10.^14 would do the trick, is this correct? Could someone explain the unit conversion, for a non-physicist?
This function is taken from here
http://web.mit.edu/8.13/matlab/Examples/planck.m
Updated version:
From all of the advice given here, this is the updated and hopefully correct methods:
h = 6.626e-34; % Planck's Constant
c = 3e8; % speed of light
T = 6000; % absolute temperature
k = 1.38066e-23; % Boltzmann constant in J/K
lambda = 0:20e-9:3200e-9; % wavelength
% spectral radiance
p = 2*h*c*c./(lambda.^5);
b6000 = p./(exp(h*c./(lambda*k*T))-1);
b6000 = (1e-9).*b6000;
% multiply by the square of the ratio of the solar radius of earth's
% orbital radius
b6000 = b6000.*(2.177e-5);
% apply Lambert's cosine law
b6000 = b6000.*pi;
% convert units for lambda
lambda = lambda.*1e6;
% print result
fh = figure(1);
plot(lambda,b6000)
xlabel('Wavelength [\mu{m}]');
ylabel('Irradiance [W m^{-2} nm^{-1}]');