Changeset 6483


Ignore:
Timestamp:
Mar 10, 2009, 3:53:28 PM (16 years ago)
Author:
rwilson
Message:

Converted auto validation scripts to numpy.

Location:
branches/numpy_anuga_validation/automated_validation_tests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/numpy_anuga_validation/automated_validation_tests/okushiri_tank_validation/compare_timeseries_with_measures.py

    r6160 r6483  
    66"""
    77
    8 import Numeric as num
     8import numpy as num
    99from Scientific.IO.NetCDF import NetCDFFile
    1010
  • branches/numpy_anuga_validation/automated_validation_tests/okushiri_tank_validation/create_okushiri.py

    r6160 r6483  
    33
    44
    5 import Numeric as num
     5import numpy as num
    66
    77from anuga.pmesh.mesh import *
     
    99from anuga.coordinate_transforms.geo_reference import Geo_reference
    1010from anuga.geospatial_data import Geospatial_data
     11from anuga.config import netcdf_float
    1112
    1213import project
     
    111112
    112113    N = len(lines)
    113     T = num.zeros(N, num.Float)  #Time
    114     Q = num.zeros(N, num.Float)  #Values
     114    T = num.zeros(N, num.float)  #Time
     115    Q = num.zeros(N, num.float)  #Values
    115116
    116117    for i, line in enumerate(lines):
     
    128129    fid.starttime = 0.0
    129130    fid.createDimension('number_of_timesteps', len(T))
    130     fid.createVariable('time', num.Float, ('number_of_timesteps',))
     131    fid.createVariable('time', netcdf_float, ('number_of_timesteps',))
    131132    fid.variables['time'][:] = T
    132133
    133     fid.createVariable('stage', num.Float, ('number_of_timesteps',))
     134    fid.createVariable('stage', netcdf_float, ('number_of_timesteps',))
    134135    fid.variables['stage'][:] = Q[:]
    135136
    136     fid.createVariable('xmomentum', num.Float, ('number_of_timesteps',))
     137    fid.createVariable('xmomentum', netcdf_float, ('number_of_timesteps',))
    137138    fid.variables['xmomentum'][:] = 0.0
    138139
    139     fid.createVariable('ymomentum', num.Float, ('number_of_timesteps',))
     140    fid.createVariable('ymomentum', netcdf_float, ('number_of_timesteps',))
    140141    fid.variables['ymomentum'][:] = 0.0
    141142
  • branches/numpy_anuga_validation/automated_validation_tests/urs_mux_files_validation/run_Bf.py

    r6160 r6483  
    2020# Related major packages
    2121from anuga.shallow_water import Domain,Dirichlet_boundary,File_boundary,Transmissive_boundary, Field_boundary
    22 import Numeric as num
     22import numpy as num
    2323from anuga.pmesh.mesh_interface import create_mesh_from_regions
    2424from anuga.abstract_2d_finite_volumes.util import start_screen_catcher, copy_code_files, sww2timeseries, get_data_from_file
Note: See TracChangeset for help on using the changeset viewer.