OCEAN 240B (eventually OCEAN 215) Methods of Oceanographic

Transcription

OCEAN 240B (eventually OCEAN 215) Methods of Oceanographic
OCEAN 240B (eventually OCEAN 215) Methods of Oceanographic Data Analysis Spring Quarter, 2015 S. Riser, Professor O. Coyle, TA E. Wilson, TA 1:30 – 3:20 Monday/Wednesday, OSB 111 hOp://flux.ocean.washington.edu/ocean_240B Concepts: (1)  EsPmaPng the mean N
1
x = x ( ti ) ; x = ∑ xi
N 1
(for example, x(t) = temperature at a point) (2)  EsPmaPng the variance and standard deviaPon N
1
2
2
x = x ( ti ) ; σ = ∑ ( xi − x )
N 1
(3)  EsPmaPng the probability distribuPon (histogram) Concepts (conPnued): (4) EsPmaPng the relaPonship (correlaPon) between x(t) and some other variable y(t) (5) FiWng a line or a curve to the relaPonship between x(t) and some other variable y(t)
(6) Reading various types of data files (7) PloWng data: how to do it in order to analyze results and get your point across to the audience (8) AppreciaPng and understanding errors in data (accuracy; precision; measurement error) How will we do this? We will learn the basic elements of a programming language in order to be able to carry out basic parameter esPmaPon from oceanographic data. Excel Fortran Matlab C, C++ , Java R Python Python CompuPng the sum of the first 100 integers 100
x = ∑ xi ; xi = {1, 2, 3,............., 100}
1
( = 5050) sum100=0 for num in xrange(101): sum100 = sum100+num print sum100 (SR) N ( N + 1)
= 5050
Gauss’s sum: SG =
2
sum(xrange(101)) print sum (EW) def sumInt(i_min, i_max): """Efficiently calculate the sum of the integers from i_min to i_max (inc.) """ n = abs(i_max -­‐ i_min) if n == 0: #both ints are the same return i_min elif (n % 2) == 0: #there are an even number of ints to sum return n/2*(i_max + i_min) else: #there are an odd number of ints to sum (OC) return (n+1)/2*(i_max + i_min) Grading 6-­‐7 homework assignments (given some data, perform some calculaPons on the data and produce a plot and scienPfic interpretaPon of results, using Python) The last assignment might be a double assignment in the form of a short project and oral presentaPon. Grades based on accuracy and efficiency of the code, graphics (plots) produced, and interpretaPon. NOTE: no mid-­‐term exam, no final exam.