function [z,p,T,ext_a,ozone]=profiles(Hozone)
% atmosphric profiles:
% altitue,pressure,temperature, aerozol extinction, ozone.
z=[0:100:10000,10500:500:20000,21000:1000:100000];
p0=1000;
T0=300;
a=find(z>12000);
T=T0-6.5/1000*z;
T(a)=T(a(1));
p=p0*exp(-9.81*z./(287*T));

H=1000;
ext_a=1e-4*exp(-z/H);
if nargin<1
 Hozone=10000;
end 
ozone=z.*exp(-z/Hozone);
val=1.75;
a=find((z>Hozone*val)|(z<Hozone/val));
ozone(a)=0;