Wed 16 Dec, 2015, 23:59 by email as a pdf or link to pdf on github.
The project will involve analyzing temperature data from the UVic School Weather Network. Two types of data are to be considered:
Temperature data with one-minute resolution is provided from four schools in the format of decimal days as discussed below and the second column is temperature in degrees Celcius.
Present the data, and characterize it using techniques discussed in class. Obvious things to do are just plot the time series, find means, PDFs, spectra. More involved projects will present correlations between the different stations (thats why you have 4!). What differences and patterns can you find between the four stations, and can you explain using your knowledge of the local climate?
The data sets start on 1 Jan 2009 a minute after midnight local, or at 08:00 UTC = 733408.333.
In matlab, these dates can be manipulated with datestr.m
and datenum
. If d
is a date, then datestr(d)
will return a nice
string with the date. datenum(2009,1,1)
will return 733408.0
. For
plotting, its OK do simply plot decimal days (days from 1 Jan 2009 is
useful), or to plot as normal and use datetick
to (try) and make
date-formated ticks.
In python, you need to import datetime
, and then datestr2num
will give a similar number:
datestr2num('2009-01-01')
yields 733408.0
. Better is to do things as
d=datetime.date(2012,1,1)
d.toordinal
d.fromordinal(733408)
which yields the same. If you have an array of ordinal times
(i.e. the format you've been given), then
plot_date(time,temp,'-')
will make nice xlabels. I found they don't
fit too well sometimes, so you can play w/ rotating them.
labels = ax.get_xticklabels()
for label in labels:
label.set_rotation(20)
label.set_ha('right')
However it is likely easiest to just deal with yeardays: yday=time-733408.0
, with yday=0.5 representing noon on 1 Jan 2009.
One-hour resolution temperature data is taken from the same network of 35 stations. Data is on an even time grid, from 2009-01-01 08:00 UTC, with each row representing a time, and each column a station. The first two rows are the longitude (degrees E) and latitude (degrees N) of each station.
First, it would be nice to replicate the map on http://www.victoriaweather.ca. Use some sort of 2-D interpolation to put the sparse data on a lon/lat grid, and then plot. I'll provide a coastline file to plot the coast on. Indicate station locations.
Data/Coast.txt: longitudes followed by latitudes. Note the islands etc are missing.
Then use this data set to look for spatial patterns of variability between the stations (i.e. calculate the Emperical Orthonormal Eigienfunctions, or Principal Components). Plot the strongest modes of variability and indicate what fraction of the variance they represent. Plotting time series of the modal amplitudes is also very effective way of thinking about the system.
Again, spend a couple of paragraphs explaining the patterns you found, and indicate if those patterns might have a physical meaning. Looking at the seasonality of the amplitudes may help.
I'll give you coastlines so you can make nice contours on your maps. One thing to keep in mind is that 1 degree of latitude is 60 nautical miles, but 1 degree of longitude is only 60*cos(lat) nautical miles, so it is useful to scale your x and y axis so the aspect ratio is [1 cos(lat)], where "lat" is some latitude that is on the center of your plot. This area is small enough that this approximation will be good enough - for larger areas you need to choose a projection from a sphere onto a map (i.e. the "Mercator", "Azimuthal" etc projections).
I want this written as a written report, with a very brief introduction, a short description of how the data was collected, and then sections that present your observations. I'd expect that you will have around 20 plots. You should describe in the text the most important observations that you make about your data. In making these statements, hopefully you will come up with other analyses to try.
The report should be handed in as a PDF, with figures embeded and properly captioned. You may not have a lot of experience saving figures, but plt.savefig
does a nice job; be sure to have adequate resolution so that your final product is legible and looks good. Your report should have a short introduction, methods, results, and a short discussion.
Grading: