Changeset 8278


Ignore:
Timestamp:
Dec 8, 2011, 11:13:04 PM (8 years ago)
Author:
steve
Message:

sww_merge now saves as float32

Location:
trunk/anuga_core/source/anuga
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/file/sww.py

    r8209 r8278  
    655655        y =  points[:,1]
    656656
     657        x = x.astype(netcdf_float32)
     658        y = y.astype(netcdf_float32)
     659       
     660
    657661        if verbose:
    658662            log.critical('------------------------------------------------')
     
    668672            log.critical('------------------------------------------------')
    669673
    670         outfile.variables['x'][:] = points[:,0] #- geo_ref.get_xllcorner()
    671         outfile.variables['y'][:] = points[:,1] #- geo_ref.get_yllcorner()
     674
     675        outfile.variables['x'][:] = x #- geo_ref.get_xllcorner()
     676        outfile.variables['y'][:] = y #- geo_ref.get_yllcorner()
    672677        outfile.variables['volumes'][:] = volumes.astype(num.int32) #On Opteron 64
    673678
  • trunk/anuga_core/source/anuga/utilities/sww_merge.py

    r8277 r8278  
    6666            yllcorner = fid.yllcorner
    6767
    68             print 'zone',fid.zone
    69 
    70             print """
    71             fid.order
    72             fid.xllcorner;
    73             fid.yllcorner ;
    74             fid.zone;
    75             fid.false_easting;
    76             fid.false_northing;
    77             fid.datum;
    78             fid.projection;
    79             """
    80 
    81 
    82             print fid.order
    83             print fid.xllcorner;
    84             print fid.yllcorner ;
    85             print fid.zone;
    86             print fid.false_easting;
    87             print fid.false_northing;
    88             print fid.datum;
    89             print fid.projection;
    90 
    9168            order      = fid.order
    9269            xllcorner  = fid.xllcorner;
     
    136113    points = [[xx, yy] for xx, yy in zip(x, y)]
    137114
    138     points = num.asarray(points, dtype='f')
    139     print points
     115    points = num.asarray(points).astype(netcdf_float32)
     116
    140117    fid.close()
    141118
Note: See TracChangeset for help on using the changeset viewer.