Changeset 1080


Ignore:
Timestamp:
Mar 15, 2005, 4:01:34 PM (19 years ago)
Author:
ole
Message:

More reporting in ferret2sww

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/data_manager.py

    r1079 r1080  
    14421442    outfile.variables['x'][:] = x - xllcorner
    14431443    outfile.variables['y'][:] = y - yllcorner
    1444     outfile.variables['z'][:] = 0.0
     1444    outfile.variables['z'][:] = z
    14451445    outfile.variables['elevation'][:] = z  #FIXME HACK
    14461446    outfile.variables['time'][:] = times
     
    14661466                ymomentum[j,i] = vspeed[j,k,l]/100*h
    14671467                i += 1
     1468
     1469
     1470    if verbose:
     1471        x = outfile.variables['x'][:]
     1472        y = outfile.variables['y'][:]       
     1473       
     1474        print '------------------------------------------------'
     1475        print 'Statistics of output file:'
     1476        print '  Name: %s' %swwname
     1477        print '  Reference:'
     1478        print '    Lower left corner: [%f, %f]'\
     1479              %(xllcorner, yllcorner)
     1480        print '  Extent:'
     1481        print '    x [m] in [%f, %f], len(x) == %d'\
     1482              %(min(x.flat), max(x.flat), len(x.flat))
     1483        print '    y [m] in [%f, %f], len(y) == %d'\
     1484              %(min(y.flat), max(y.flat), len(y.flat))
     1485        print '    t [s] in [%f, %f], len(t) == %d'\
     1486              %(min(times), max(times), len(times))
     1487        print '  Quantities [SI units]:'
     1488        for name in ['stage', 'xmomentum', 'ymomentum']:
     1489            q = outfile.variables[name][:].flat
     1490            print '    %s in [%f, %f]' %(name, min(q), max(q))
     1491           
     1492       
     1493
    14681494       
    14691495    outfile.close()               
Note: See TracChangeset for help on using the changeset viewer.