
fil='../tmp/co2_flux.nc';
egM=ncread(fil,'DICAS_EG');                egM=egM(1:69);
deM=ncread(fil,'DICAS_DEFAULT');           deM=deM(1:69);
coM=ncread(fil,'DICAS_KISOKGM600');        coM=coM(1:69);
irM=ncread(fil,'DICAS_DEFAULTIRONDOUBLE'); irM=irM(1:69);

%errplot_h([1:69],egM,egV.^0.5)

figure
 fs=12; ln=1.3; lnp=2;

%subplot(3,1,1)
%set(gca,'box','on','tickdir','out','nextplot','add','fontsize', ...
%         fs,'linewidth',ln,'ygrid','on','xgrid','on','ylim',[-0.1 0.2])
% plot(deM,'k','linewidth',lnp)
% plot(egM,'b','linewidth',lnp)
% plot(coM,'r','linewidth',lnp)
% plot(irM,'g','linewidth',lnp)
 
% legend('REF','E&G','CON','IRON','location','SouthWest')
% legend('REF','E&G','CON','IRON','location','SouthWest')
% ylabel('C uptake [PgC/yr]')
% xlabel('year')

subplot(3,1,2)
set(gca,'box','on','tickdir','out','nextplot','add','fontsize', ...
         fs,'linewidth',ln,'ygrid','on','xgrid','on','ylim',[0 8])
 plot(cumsum(deM),'k','linewidth',lnp)
 plot(cumsum(egM),'b','linewidth',lnp)
 plot(cumsum(coM),'r','linewidth',lnp)
% plot(irM,'g','linewidth',lnp)
 
% legend('REF','E&G','CON','IRON','location','SouthWest')
 legend('REF','E&G','CON','IRON','location','NorthWest')
 ylabel('C uptake [PgC]')
 xlabel('year')

 mean(deM(1:20))
 mean(egM(1:20))
 mean(coM(1:20))

print -depsc ../ps/co2_uptake_carbochan.eps
