% 
% Two-Box Climate Model main program
%
% (c) A. Czaja, Feb. 2007.
% http://www.sp.ph.ic.ac.uk/~arnaud/EP_ClimateModel

%----------------------
% Initial conditions
%----------------------

  clear;
  RESTART =1,
  INPUTfile = 'Output_CTRL'; %name of input file if restart
  TwoBox_Init; %calls initialization routine


%-----------
% Forcing
%-----------

  Te1 = TEMI1;    %emission temperature for tropical Box
  Te2 = TEMI2;    %emission temperature for extra-tropical Box 
  CO2 = 280;    %Well mixed CO2 concentration (ppm)

%------------------
%Time integration
%------------------

  Nyr = 5; %length of integration (in years)
  Dt = 1*DAY; %Model time step (<=2 days otherwise unstable scheme)
  Nt = round(Nyr*YEAR/Dt);
  Time = [0:1:Nt-1]*Dt;
  PICTUREonline=1, %if plot of on-going results is wanted
  TwoBox_Run; %Run Two-Box Model
  
%---------------
% Diagnostics
%---------------

  TwoBox_Diagnos; %run a few diagnostics
  
%----------------------
% Figures
%----------------------
  
  TwoBox_Plots; %plot model outputs

%--------------------
% Save Model output
%--------------------

  return; %to avoid rewriting on save files
  TwoBox_Save;
