Analysis of EZM "Data"

Let's try our hand at meteorlogical data analysis and learn to use the
"list" features of Mathematica.  Here we have another look at the model generated "data" that was used to make the plots in ezmplot.nb.  The data consists of the horizontal and vertical velocity components u and w stored in (jn,in) arrays, and read in as a nested list, stored as  rows j=1,2,3 ...The u  fields are stored in ustbu000.dat, ustbu001.dat, ... ustabu005.dat for times t=0,5,10,13,15,20.  Similarly for w.

An extra data point has been given to you: i=in is the same as i=1and should not be used in computing horizontal averages.  (The reason the data was stored this way was to make it easier to make a contour plot an entire wavelength.)

Your tasks:
 ☺ Make  cool plots of (OverBar[u])(z), (OverBar[uw])(z),  (d/dz)(OverBar[uw])(z) , etc. that show how these fields change with time.
 ☺ Plot the value of the total energy , momentum and enstrophy in the domain, at the data sampling times. If the model were perfect all those quantities would be invariant. Note that j=0 and j=jn correspond to the rigid boundary at z=-1 and z=1.  The volumes surrounding the grid points on the boundaries are only half the size of the volumes surrounding the interior points.  This fact should be recognized when computing the volume sums (or "integrals").
 ☺ Using the time series stored in woftime.dat, find the growth rate of the instability by fitting a curve (use Fit , see page 859) to the
 appropriate portion of the time series.
  ☺ Or do something else creative...

Initialization

in=65;

jn=65;

dx=Pi/(in-1)//N

dz=2/(jn-1)//N

z=Table[-1+2*(j-1)/(jn-1)//N,{j,1,jn}]

Your path to the data files.  Probaby "ezm/", unless you are Brian Fiedler, in which case it is "Power HD:5123 notebooks:ezm:"

(*path="Power HD:5123 notebooks:ezm:" *)
path="ezm/"

mean[q_] calculates the horizontal mean of a quantity q(x,z) as a function of z.

mean[q_]:=Table[
				Sum[q[[j,i]],{i,1,in-1}]/(in-1)
				,{j,1,jn}];

covar[q_,r_] calculates the horizontal mean of a quantity q(x,z)r(x,z) as a function of z.

covar[q_,r_]:=Table[
				Sum[q[[j,i]]*r[[j,i]],{i,1,in-1}]/(in-1)
				,{j,1,jn}];

Analyze  some data

ufile="ustbu003.dat"

wfile="ustbw003.dat"

u=ReadList[path<>ufile,Table[Number,{in}]];

w=ReadList[path<>wfile,Table[Number,{in}]];

umean=mean[u]

ListPlot[Transpose[{umean,z}]]

Notice that mean[w] is not exactly zero.  The model EZM attempts to iterate to find a pressure field that enforces ∇·(OverVector[U])=0, but does not succeed in enforcing it exactly.

wmean=mean[w]

uwbar=covar[u,w]

ListPlot[Transpose[{uwbar,z}]]