/ c (j); % heat cap T (j, i) = T (j,i - 1)
+ dT; % new temperature end if T (1, i) > 1000 % FE problem disp -LRB-[«Terminated at period «num2str (p) «and i = «num2str (i)-RSB--RRB-; return end % now check for convective overturning and use the results in the next % iteration for j = 2: nlayers if T (j, i) > T (j - 1, i)
kk (j) = kt; % turbulent or stirred conductivity else
kk (j) = ks; % still conductivity end end