// Scilab code developed by: // International Research Institute for Climate and Society // Columbia University in the City of New York, USA // Last update: June 26, 2013 // -------------------------------------------------------------------------------------------------------- // Dependancies : (see each function for further details) // -- data PositiveCases // -------------------------------------------------------------------------------------------------------- // Functions : // -- For each day of the year, compute the mean of all the positive cases that occured that same day on a PREVIOUS year // -- Select the part that is between ti and tf (putting the cases in the right order of necessary) // -------------------------------------------------------------------------------------------------------- //This function calculate the daily climatology taking only the data before time t, and give a prediction for period [ti,tf] function[Pred]=Climatology(ti,tf) for i=1:365 Clima(i)=sum(Cases(i:365:(i+365*floor((ti-i)/365)),2))/(floor((ti-i)/365)+1); end ann=floor((tf-ti)/365) beg=modulo(ti,365); if beg==0 then beg=365; end clo=modulo(tf,365); if clo==0 then clo=365; end if beg