Index: /inundation/ga/storm_surge/pyvolution/data_manager.py
===================================================================
--- /inundation/ga/storm_surge/pyvolution/data_manager.py	(revision 1078)
+++ /inundation/ga/storm_surge/pyvolution/data_manager.py	(revision 1079)
@@ -1184,12 +1184,12 @@
                mint = None, maxt = None, mean_stage = 0,
                origin = None, zscale = 1, 
-	       mean_bathymetry = -100): #FIXME: Bathymetry should be obtained
-                                        #from MOST somehow.
-				        #Alternatively from elsewhere
-				        #or, as a last resort, 
-				        #specified here. 
-					#The value of -100 will work 
-					#for the Wollongong tsunami
-					#scenario but is very hacky
+	       elevation = -100): #FIXME: Bathymetry should be obtained
+                                  #from MOST somehow.
+                                  #Alternatively from elsewhere
+                                  #or, as a last resort, 
+                                  #specified here. 
+                                  #The value of -100 will work 
+                                  #for the Wollongong tsunami
+                                  #scenario but is very hacky
     """Convert 'Ferret' NetCDF format for wave propagation to
     sww format native to pyvolution.
@@ -1275,6 +1275,6 @@
     if verbose: print 'cropping'
     amplitudes = file_h.variables['HA'][jmin:jmax, kmin:kmax, lmin:lmax]
-    xspeed = file_u.variables['UA'][jmin:jmax, kmin:kmax, lmin:lmax]
-    yspeed = file_v.variables['VA'][jmin:jmax, kmin:kmax, lmin:lmax]    
+    uspeed = file_u.variables['UA'][jmin:jmax, kmin:kmax, lmin:lmax] #Lon
+    vspeed = file_v.variables['VA'][jmin:jmax, kmin:kmax, lmin:lmax] #Lat
 
     number_of_times = times.shape[0]
@@ -1286,10 +1286,29 @@
     assert amplitudes.shape[2] == number_of_longitudes          
 
-    #print times
-    #print latitudes
-    #print longitudes
-
-    #print 'MIN', min(min(min(amplitudes)))
-    #print 'MAX', max(max(max(amplitudes)))    
+    if verbose:
+        print '------------------------------------------------'
+        print 'Statistics:'
+        print '  Extent (lat/lon):'
+        print '    lat in [%f, %f], len(lat) == %d'\
+              %(min(latitudes.flat), max(latitudes.flat),
+                len(latitudes.flat))
+        print '    lon in [%f, %f], len(lon) == %d'\
+              %(min(longitudes.flat), max(longitudes.flat),
+                len(longitudes.flat))
+        print '    t in [%f, %f], len(t) == %d'\
+              %(min(times.flat), max(times.flat), len(times.flat))
+        
+        q = amplitudes.flat        
+        name = 'Amplitudes (ha) [cm]'
+        print '  %s in [%f, %f]' %(name, min(q), max(q))
+        
+        q = uspeed.flat
+        name = 'Speeds (ua) [cm/s]'        
+        print '  %s in [%f, %f]' %(name, min(q), max(q))
+        
+        q = vspeed.flat
+        name = 'Speeds (va) [cm/s]'                
+        print '  %s in [%f, %f]' %(name, min(q), max(q))                
+
 
     #print number_of_latitudes, number_of_longitudes
@@ -1297,6 +1316,4 @@
     number_of_volumes = (number_of_latitudes-1)*(number_of_longitudes-1)*2
     
-    #print file_h.dimensions.keys()
-    #print file_h.variables.keys()    
 
     file_h.close()
@@ -1366,6 +1383,5 @@
     x = zeros(number_of_points, Float)  #Easting
     y = zeros(number_of_points, Float)  #Northing
-    #volumes = zeros(number_of_volumes, Int)
-    i = 0
+
 
     #Check zone boundaries
@@ -1373,6 +1389,7 @@
 
     vertices = {}
-    for k, lat in enumerate(latitudes):    
-        for l, lon in enumerate(longitudes):    
+    i = 0    
+    for k, lat in enumerate(latitudes):       #Y direction
+        for l, lon in enumerate(longitudes):  #X direction
 
             vertices[l,k] = i
@@ -1390,6 +1407,6 @@
     #Construct 2 triangles per 'rectangular' element
     volumes = []
-    for l in range(number_of_longitudes-1):
-        for k in range(number_of_latitudes-1):
+    for l in range(number_of_longitudes-1):    #X direction
+        for k in range(number_of_latitudes-1): #Y direction
             v1 = vertices[l,k+1]
             v2 = vertices[l,k]            
@@ -1416,9 +1433,16 @@
     outfile.zone = zone
 
+
+    if elevation is not None:
+        z = elevation
+    else:
+        pass
+	#FIXME: z should be obtained from MOST and passed in here
+        
     outfile.variables['x'][:] = x - xllcorner
     outfile.variables['y'][:] = y - yllcorner
     outfile.variables['z'][:] = 0.0
-    outfile.variables['elevation'][:] = 0.0 #Grrrrrrr
-    outfile.variables['time'][:] = times        
+    outfile.variables['elevation'][:] = z  #FIXME HACK
+    outfile.variables['time'][:] = times
     outfile.variables['volumes'][:] = volumes.astype(Int32) #On Opteron 64
     
@@ -1430,21 +1454,15 @@
     ymomentum = outfile.variables['ymomentum']        
 
-    if mean_bathymetry is not None:
-        z = mean_bathymetry
-    else:
-        pass
-	#FIXME: z should be obtained from MOST and passed in here 	
+
     
     for j in range(len(times)):
         i = 0
-        for k in range(number_of_latitudes):
-            for l in range(number_of_longitudes):                    
+        for k in range(number_of_latitudes):      #Y direction
+            for l in range(number_of_longitudes): #X direction
                 w = zscale*amplitudes[j,k,l]/100 + mean_stage
                 stage[j,i] = w
-
-                h = w-z  
-    
-		xmomentum[j,i] = xspeed[j,k,l]/100*h
-                ymomentum[j,i] = yspeed[j,k,l]/100*h                
+                h = w - z
+                xmomentum[j,i] = uspeed[j,k,l]/100*h
+                ymomentum[j,i] = vspeed[j,k,l]/100*h
                 i += 1
         
