
Param

Ts = [100:.1:350];
DT = 50;

for n=1:length(Ts)
  if Ts>0,
      EPS = 1;
  else
      EPS=0;
  end
  OLR(n) = EPS*SIGMA*(Ts(n)-DT)^4+(1-EPS)*SIGMA*Ts(n)^4;
end

figure(1), hold on,
plot(Ts,OLR,'m');

return
Param
DTz = DTcrit_conv;
DTh = DTcrit_circ;
CO2 = 0;

Ts1 = [200:.1:350];
Ts2 = Ts1-DTh;
EPSA1= calc_EPSA(Ts1,Ts1-DTz,RHA1,CO2);
EPSA2= calc_EPSA(Ts2,Ts2-DTz,RHA2,CO2);
OLR1 = EPSA1.*(Ts1-DTz).^4+(1-EPSA1).*Ts1.^4; 
OLR2 = EPSA2.*(Ts2-DTz).^4+(1-EPSA2).*Ts2.^4;
OLR = SIGMA*(OLR1+OLR2)/2;
ASR = SIGMA*(TEMI1^4+TEMI2^4)/2;

figure(1), hold on,
plot(Ts1,OLR,'b',Ts1,ASR*ones(size(Ts1)),'g');

%return

figure(2), clf,
plot(Ts1,EPSA1,'r',Ts2,EPSA2,'b');
