function [dconvec]=simpcoagr(t, conmasvec)
% simplify l3rate form layers
%calculate rate of change in spectrum, units of conc/compart/s
%INPUT	beta25p:	effect of irow, jcol on jcol
%		beta1p:	    effect of irow, jcol-1 on jcol
%		linmat:     matrix with all linear terms
%		nsect:      number of section
%OUTPUT:dconmas:	columne vector of total change in elements

global beta25p beta1p  nsect	
    %get the beta matrices from master program, along with the linear terms
global   linmat


conmasr=conmasvec';                 % set up as row vec
conshift=[0,conmasr(1:nsect-1)];    % shift vector for up from previous section
		                            % add the shifting shear


term1=conmasr * beta25p ;	
tterm1=conmasr .* term1;

term2=conmasr * beta1p  ;
tterm2=term2 .*conshift;
sum2=(tterm1+tterm2);	                % agg  terms

term4=linmat*conmasvec;	                % linear terms
dconvec=sum2'+term4;			    % get agg, disagg terms

