Ignore:
Timestamp:
Jun 30, 2009, 2:07:41 PM (14 years ago)
Author:
ole
Message:

Merged numpy branch back into the trunk.

In ~/sandpit/anuga/anuga_core/source
svn merge -r 6246:HEAD ../../branches/numpy .

In ~/sandpit/anuga/anuga_validation
svn merge -r 6417:HEAD ../branches/numpy_anuga_validation .

In ~/sandpit/anuga/misc
svn merge -r 6809:HEAD ../branches/numpy_misc .

For all merges, I used numpy version where conflicts existed

The suites test_all.py (in source/anuga) and validate_all.py passed using Python2.5 with numpy on my Ubuntu Linux box.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_validation/circular_island/sqrt_table_run_circular.py

    r5442 r7276  
    1717from anuga.utilities.polygon import read_polygon#, plot_polygons
    1818from math import cos,pi,sin,tan,sqrt
    19 from Numeric import array, zeros, Float, allclose,resize
     19import numpy as num
    2020from anuga.shallow_water.data_manager import csv2dict
    2121from time import localtime, strftime, gmtime
    2222from anuga.utilities.system_tools import get_user_name, get_host_name
    2323from os import sep, environ, getenv
     24from anuga.config import netcdf_float
     25from Scientific.IO.NetCDF import NetCDFFile
     26
     27
    2428#-------------------------
    2529# Create Domain from mesh
     
    5660
    5761    print 'Preparing time boundary from %s' %textversion
    58     from Numeric import array
    5962
    6063    fid = open(textversion)
     
    6972
    7073    N = len(lines)
    71     T = zeros(N, Float)  #Time
    72     Q = zeros(N, Float)  #Values
     74    T = num.zeros(N, num.float)  #Time
     75    Q = num.zeros(N, num.float)  #Values
    7376
    7477    for i, line in enumerate(lines):
     
    8184
    8285    #Create tms file
    83     from Scientific.IO.NetCDF import NetCDFFile
    84 
    8586    print 'Writing to', filename
    8687    fid = NetCDFFile(filename[:-4] + '.tms', 'w')
     
    9091    fid.starttime = 0.0
    9192    fid.createDimension('number_of_timesteps', len(T))
    92     fid.createVariable('time', Float, ('number_of_timesteps',))
     93    fid.createVariable('time', netcdf_float, ('number_of_timesteps',))
    9394    fid.variables['time'][:] = T
    9495
    95     fid.createVariable('stage', Float, ('number_of_timesteps',))
     96    fid.createVariable('stage', netcdf_float, ('number_of_timesteps',))
    9697    fid.variables['stage'][:] = Q[:]
    9798
    98     fid.createVariable('xmomentum', Float, ('number_of_timesteps',))
     99    fid.createVariable('xmomentum', netcdf_float, ('number_of_timesteps',))
    99100    fid.variables['xmomentum'][:] = 0.0
    100101
    101     fid.createVariable('ymomentum', Float, ('number_of_timesteps',))
     102    fid.createVariable('ymomentum', netcdf_float, ('number_of_timesteps',))
    102103    fid.variables['ymomentum'][:] = 0.0
    103104
Note: See TracChangeset for help on using the changeset viewer.