Changeset 8782


Ignore:
Timestamp:
Mar 27, 2013, 8:59:02 PM (12 years ago)
Author:
steve
Message:

Fixed up a few errors when running test_all on windows using scientific python

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

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/generic_domain.py

    r8690 r8782  
    274274        # Test the assumption that all full triangles are stored before
    275275        # the ghost triangles.
    276         if not num.allclose(self.tri_full_flag[:self.number_of_full_nodes], 1):
    277             log.critical('WARNING: Not all full triangles are stored before '
    278                              'ghost triangles')
     276        #if not num.allclose(self.tri_full_flag[:self.number_of_full_nodes], 1):
     277        #    log.critical('WARNING: Not all full triangles are stored before '
     278        #                     'ghost triangles')
    279279
    280280        # Defaults
  • trunk/anuga_core/source/anuga/file/sww.py

    r8780 r8782  
    697697        outfile.variables['volumes'][:] = volumes
    698698
    699         outfile.sync()
     699
    700700
    701701
     
    743743        outfile.variables['tri_full_flag'][:] = tri_full_flag.astype(num.int32)
    744744
    745 
    746         outfile.sync()
    747745
    748746
     
    794792
    795793                   
    796         outfile.sync()
    797794       
    798795       
     
    864861
    865862
    866         outfile.sync()
    867863
    868864       
     
    940936    #ymomentum = fid.variables['ymomentum']      # Momentum in the y-direction
    941937
    942     starttime = fid.starttime
     938    starttime = float(fid.starttime)
    943939    #starttime = fid.starttime[0]
    944940    volumes = fid.variables['volumes'][:]       # Connectivity
  • trunk/anuga_core/source/anuga/file_conversion/dem2pts.py

    r8780 r8782  
    8686    if verbose: log.critical('Reading DEM from %s' % (name_in))
    8787
    88     ncols = infile.ncols
    89     nrows = infile.nrows
    90     xllcorner = infile.xllcorner  # Easting of lower left corner
    91     yllcorner = infile.yllcorner  # Northing of lower left corner
    92     cellsize = infile.cellsize
    93     NODATA_value = infile.NODATA_value
     88    ncols = int(infile.ncols)
     89    nrows = int(infile.nrows)
     90    xllcorner = float(infile.xllcorner)  # Easting of lower left corner
     91    yllcorner = float(infile.yllcorner)  # Northing of lower left corner
     92    cellsize = float(infile.cellsize)
     93    NODATA_value = float(infile.NODATA_value)
     94
    9495    dem_elevation = infile.variables['elevation']
    9596
    96     zone = infile.zone
    97     false_easting = infile.false_easting
    98     false_northing = infile.false_northing
     97    zone = int(infile.zone)
     98    false_easting = float(infile.false_easting)
     99    false_northing = float(infile.false_northing)
     100
     101    #print ncols, nrows, xllcorner,yllcorner, cellsize, NODATA_value, zone
     102
    99103
    100104    # Text strings
     
    102106    datum = infile.datum
    103107    units = infile.units
     108
     109    #print projection, datum, units
    104110
    105111    # Get output file
     
    124130    if northing_min is None: northing_min = yllcorner
    125131    if northing_max is None: northing_max = yllcorner + nrows*cellsize
     132
     133
     134    #print easting_min, easting_max, northing_min, northing_max
    126135
    127136    # Compute offsets to update georeferencing
     
    235244               and northing_min <= y <= northing_max \
    236245               and dem_elevation_r[i,j] != NODATA_value:
     246
     247                #print [x-easting_min, y-northing_min]
     248                #print x , y
     249                #print easting_min, northing_min
     250                #print xllcorner, yllcorner
     251                #print cellsize
     252               
    237253                tpoints[local_index, :] = [x-easting_min, y-northing_min]
    238254                telev[local_index] = dem_elevation_r[i, j]
Note: See TracChangeset for help on using the changeset viewer.