Changeset 995


Ignore:
Timestamp:
Mar 3, 2005, 4:38:49 PM (20 years ago)
Author:
ole
Message:

Cast Integer array explictly as 32 bit for use with Netcdf (I think)

Location:
inundation/ga/storm_surge/pyvolution
Files:
2 edited

Legend:

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

    r994 r995  
    11571157    import os
    11581158    from Scientific.IO.NetCDF import NetCDFFile
    1159     from Numeric import Float, Int, searchsorted, zeros, array
     1159    from Numeric import Float, Int, Int32, searchsorted, zeros, array
    11601160    precision = Float
    11611161
     
    13571357    outfile.variables['y'][:] = y - yllcorner
    13581358    outfile.variables['z'][:] = 0.0
    1359     outfile.variables['elevation'][:] = 0.0   
    1360     outfile.variables['volumes'][:] = volumes
    1361     outfile.variables['time'][:] = times   
     1359    outfile.variables['elevation'][:] = 0.0
     1360    outfile.variables['time'][:] = times       
     1361    outfile.variables['volumes'][:] = volumes.astype(Int32) #On Opteron 64
     1362   
     1363
    13621364
    13631365    #Time stepping
  • inundation/ga/storm_surge/pyvolution/test_data_manager.py

    r994 r995  
    608608        #Call conversion (with zero origin)
    609609        ferret2sww('small', verbose=False,
    610                    origin = (56, 0, 0, 500000, 10000000))
     610                   origin = (56, 0, 0))
    611611 
    612612
     
    676676        #Call conversion (with zero origin)
    677677        ferret2sww('small', verbose=False,
    678                    origin = (56, 0, 0, 500000, 10000000))
     678                   origin = (56, 0, 0))
    679679 
    680680
     
    755755        #Call conversion (with nonzero origin)
    756756        ferret2sww('small', verbose=False,
    757                    origin = (56, 100000, 200000, 500000, 10000000))
     757                   origin = (56, 100000, 200000))
    758758
    759759
Note: See TracChangeset for help on using the changeset viewer.