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

Converted auto validation scripts to numpy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.