%default values
%rmax=0.05
%rnoise=3
%tau=5
%tau=20
%rnoise=0
%rmax=.05

r0=rnoise/tau
rp=r0*(rand(200*12,1)-mean(rand(200*12,1)));
lambda=1/tau/12;
t(1)=0;
for ii=1:30*12
  r(ii)=0;
end
for ii=30*12+1:90*12
r(ii)=(rmax)*(ii-30*12)/60/12;
end

for ii=90*12+1:200*12
r(ii)=rmax*(60*12)/60/12;
end

% 1 month time step
dt=1;
% relaxation time (in months)
for ii=1:2399
t(ii+1)=t(ii)-lambda*t(ii)+r(ii)+rp(ii);
end



