Sokodé Surface Temperatures

Togo is a small West African country located between Benin and Ghana with a land mass comparative to West Virginia. As noted in the image above, Togo is longer than it is wide, this causes it to stretch through six geographic regions. As thus, its climate varies from tropical to savanna.

Sokodé is the second largest town in Togo, second only to the capital Lomé, and is a major commercial center for its surrounding agricultural areas. It is located in the central region of the country and is situated between two rivers (Mo and Mono) at an average elevation of 340 m. Sokodé’s region is characterized by its tropical climate and dense network of rivers and hilly terrain.

Works Cited:
1. The Editors of Encyclopædia Britannica. (2010, November 01). Sokodé. Retrieved January 24, 2018, from https://www.britannica.com/place/Sokode
2. Revolvy, L. (n.d.). “Sokodé” on Revolvy.com. Retrieved January 24, 2018, from https://www.revolvy.com/main/index.php?s=Sokod%C3%A9
3. The World Factbook: TOGO. (2018, January 17). Retrieved January 24, 2018, from https://www.cia.gov/library/publications/the-world-factbook/geos/to.html

Annual Minima (1961-2015)

years={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54};
minTemps={19.4,19.6,19.6,19.6,19.5,19.6,19.5,19.8,19.8,19.8,19.8,19.7,20.2,20.2,20.1,20.0,20.2,20.2,20.5,20.6,20.4,20.6,21.0,20.4,20.6,20.3,20.9,20.8,20.5,21.0,20.9,20.6,20.8,20.9,20.8,20.8,21.2,21.5,20.8,21.0,20.9,21.2,21.2,21.0,21.1,21.0,20.6,21.0,21.3,21.7,21.6,21.2,21.1,21.5,21.6};
minData=Table[{years[[i]],minTemps[[i]]},{i,55}];
minPlot=ListPlot[minData, PlotStyle->Gray,AxesLabel->{"years","avg T (°C)"},PlotLabel->"Annual Minima of Surface Temperatures",LabelStyle->Directive[Bold, Darker[LightGreen],Italic],PlotTheme->"Detailed"]

Linear Model Fit

LM=LinearModelFit[minData,x,x,ConfidenceLevel->0.95]

Show[minPlot,Plot[LM[x],{x,0,54}],Frame->True]

LM["ParameterTable"]
LM["ParameterConfidenceIntervals"]

Residuals From This Model

ListPlot[LM["FitResiduals"],Filling->Axis,PlotLabel->"LM - Minima",AxesLabel->{"Years","Residuals"}]

Considering a trend seems to exist for the residuals (wave-like in nature?), there is an element to this data that this model is not capturing

Nonlinear & Sinusoidal Model Fit

NLSM=NonlinearModelFit[minData, a + b x + c (x^2)+d (x^3)+ e Sin[α x]+ f Cos[β x], {a,b,c, d, e,f, α, β}, x,ConfidenceLevel->0.95]

Show[minPlot, Plot[NLSM[x], {x, 0,54}],Frame->True]

NLSM["ParameterTable"]
NLSM["ParameterConfidenceIntervals"]

Residuals From This Model

ListPlot[NLSM["FitResiduals"],Filling->Axis,PlotLabel->"NSLM - Minima",AxesLabel->{"Years","Residuals"}]

Annual Maxima (1961-2015)

maxTemps={32.3,31.9,32.1,31.7,32.2,32.4,31.6,32.3,32.3,32.4,32.4,32.4,33.0,32.1,32.1,31.8,32.3,31.9,32.4,32.4,32.8,32.3,32.9,32.6,32.5,32.2,33.3,32.3,32.5,32.9,32.5,32.1,32.4,32.2,32.7,32.6,32.6,33.1,32.6,32.5,32.6,32.9,32.8,33.1,32.7,33.0,33.4,33.4,33.5,33.2,34.1,33.7,33.2,33.4,33.4,33.4};
maxData=Table[{years[[i]],maxTemps[[i]]},{i,55}];
maxPlot=ListPlot[maxData, PlotStyle->Gray,AxesLabel->{"years","avg T (°C)"},
PlotLabel->"Annual Maxima of Surface Temperatures",LabelStyle->Directive[Bold, Purple,Italic],PlotTheme->"Detailed"]

Linear Model Fit

LM1=LinearModelFit[maxData,x,x,ConfidenceLevel->0.95]

Show[maxPlot,Plot[LM1[x],{x,0,54}],Frame->True]

LM1["ParameterTable"]
LM1["ParameterConfidenceIntervals"]

Residuals From This Model

ListPlot[LM1["FitResiduals"],Filling->Axis,PlotLabel->"LM - Maxima",AxesLabel->{"Years","Residuals"}]

This model seems to fail the data

Nonlinear & Sinusoidal Model Fit

NLSM1=NonlinearModelFit[maxData, a + b x + c (x^2)+d (x^3)+ e Sin[α x]+ f Cos[β x], {a,b,c,d, e,f, α, β}, x]

Show[maxPlot, Plot[NLSM1[x], {x, 0,54}],Frame->True]

NLSM1["ParameterTable"]
NLSM1["ParameterConfidenceIntervals"]

Residuals From This Model

ListPlot[NLSM1["FitResiduals"],Filling->Axis,PlotLabel->"NSLM - Maxima",AxesLabel->{"Years","Residuals"}]

Conclusions

Using information from the linear model fits of both the maximum and minimum temperature time-series, it can be ascertained that there exists significant increases in temperature over time. The slopes of the fits themselves were positive and exhibited parameter confidence intervals such that the slopes could not be a negative nonzero number. The temperature minima data was noted to have a larger slope than the maxima data, meaning the minimum annual temperatures in Sokodé are increasing more dramatically than the maximum annual temperatures. In plotting the residuals for the linear model fit, it seems that the minima data produced more patterned residuals than the maxima data. It was then determined that a model should be used to account for the oscillatory nature of the data using wave and power functions, so fits of the data were made in accordance to the equation y(x)= a + b x + c (x^2)+d (x^3)+ e Sin[α x]+ f Cos[β x]. While this model seemed to provide a better fit for the data, it does not seem plausible for predictions of future temperatures due to the power function used. In order to create better models for the data, our group would like to receive the following information from Togolese meteorologists. 

Questions:
	1. Do they use equipment that comes with a known uncertainty range?
	2. Is data collected from one site in each town or pooled from several areas in a town?
	3. Is it collected consistently (if the data collection is delegated to different sources, methods of collection may differ)?
	4. What is the elevation level for the site(s) of data collection?
	5. What do they believe their own errors to be as well as extent of such errors?
	       -This can be errors due to methodology behind data collection, systemic errors from equipment, human error, or any other sources of error they deem appropriate to share.