Disclaimer: I don't have very much statistics experience.. I do have yearly climate data (yearly max temperature, total yearly precipitation...) for 200 years and want to perform the Mann-Kendall trend test using Python. The test assumes no serial correlation so I'm using autocorrelation plots to determine the lag and then use differencing to remove any seasonality. First question: is this an appropriate approach to assess and correct for seasonality for the Mann-Kendall trend test? I know that there is a seasonal Kendall trend test, but there's no function for python and I want to stick with using python without having to rewrite a function.
Also, in other examples I've seen the trend removed before seasonality is assessed.. however what I'm after is the trend... so should I remove the trend (like with a lag 1 differencing) prior to assessing seasonality? Then apply whatever lag I find from the no-trend data to the original data? What is the order of things? Will assessing seasonality with the trend still in my data affect how I interpret seasonality?
Figure shows raw data in blue, lowess in red and difference between raw data and lowess in green. The site is located in northern California and the "data" is model output from the Basin Characterization Model (BCM) (http://climate.calcommons.org/bcm).