%
% Initializes Two-Box model integration
%

if RESTART == 1
 eval(['load ' INPUTfile]);
 IC = 0;
 Ta1 = []; Ta2 = []; Ts1 = []; Ts2 = []; To1 = []; To2 = []; 
 Time = []; PSIo = []; PSIa = []; Ha_PW = []; Ho_PW = [];
 Ft = []; Ft1 = []; Ft2 = []; Fa = []; Fo = []; Feva1 = []; Feva2 = [];
 Fs1 = []; Fs2 = [];
 MTSPT = []; MSE1 = []; MSE2 = []; Q1 = []; Q2 = [];
 Ta1(1) = Ta1_end+IC*randn(1); %initial Atm. temp (Tropics), in K
 Ta2(1) = Ta2_end+IC*randn(1); %initial Atm. temp (Extra-Troics), in K
 To1(1) = To1_end+IC*randn(1); %initial Oce. temp (Tropics), in K
 To2(1) = To2_end+IC*randn(1); %initial Oce. temp (Extra-Tropics), in K
 Ts1(1) = Ts1_end+IC*randn(1); %initial surf. temp, in K
 Ts2(1) = Ts2_end+IC*randn(1); %initial surf. temp, in K
end

% Model parameters
TwoBox_Param

% No restart
if RESTART ~= 1
 IC = 0;
 Ta1(1) = TEMI1+IC*randn(1);    %initial Atm. temp (Tropics), in K
 Ta2(1) = TEMI2+IC*randn(1);    %initial Atm. temp (Extra-Troics), in K
 To1(1) = 290+IC*randn(1);      %initial Oce. temp (Tropics), in K
 To2(1) = 280+IC*randn(1);      %initial Oce. temp (Extra-Tropics), in K
 Ts1(1) = To1(1)+DTO;           %initial surf. temp, in K
 Ts2(1) = To2(1)+DTO;           %initial surf. temp, in K
end
