Changeset 6483 for branches/numpy_anuga_validation/automated_validation_tests/okushiri_tank_validation/create_okushiri.py
- Timestamp:
- Mar 10, 2009, 3:53:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/numpy_anuga_validation/automated_validation_tests/okushiri_tank_validation/create_okushiri.py
r6160 r6483 3 3 4 4 5 import Numericas num5 import numpy as num 6 6 7 7 from anuga.pmesh.mesh import * … … 9 9 from anuga.coordinate_transforms.geo_reference import Geo_reference 10 10 from anuga.geospatial_data import Geospatial_data 11 from anuga.config import netcdf_float 11 12 12 13 import project … … 111 112 112 113 N = len(lines) 113 T = num.zeros(N, num. Float) #Time114 Q = num.zeros(N, num. Float) #Values114 T = num.zeros(N, num.float) #Time 115 Q = num.zeros(N, num.float) #Values 115 116 116 117 for i, line in enumerate(lines): … … 128 129 fid.starttime = 0.0 129 130 fid.createDimension('number_of_timesteps', len(T)) 130 fid.createVariable('time', n um.Float, ('number_of_timesteps',))131 fid.createVariable('time', netcdf_float, ('number_of_timesteps',)) 131 132 fid.variables['time'][:] = T 132 133 133 fid.createVariable('stage', n um.Float, ('number_of_timesteps',))134 fid.createVariable('stage', netcdf_float, ('number_of_timesteps',)) 134 135 fid.variables['stage'][:] = Q[:] 135 136 136 fid.createVariable('xmomentum', n um.Float, ('number_of_timesteps',))137 fid.createVariable('xmomentum', netcdf_float, ('number_of_timesteps',)) 137 138 fid.variables['xmomentum'][:] = 0.0 138 139 139 fid.createVariable('ymomentum', n um.Float, ('number_of_timesteps',))140 fid.createVariable('ymomentum', netcdf_float, ('number_of_timesteps',)) 140 141 fid.variables['ymomentum'][:] = 0.0 141 142
Note: See TracChangeset
for help on using the changeset viewer.