Changeset 5546
- Timestamp:
- Jul 22, 2008, 11:39:25 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/data_manager.py
r5541 r5546 5015 5015 # Check output filename 5016 5016 if basename_out is None: 5017 msg = 'STS filename must be specified' 5017 msg = 'STS filename must be specified as basename_out' 5018 msg += ' in function urs2sts' 5018 5019 raise Exception, msg 5019 stsname = basename_out + '.sts' 5020 5021 if basename_out.endswith('.sts'): 5022 stsname = basename_out 5023 else: 5024 stsname = basename_out + '.sts' 5020 5025 5021 5026 # Create input filenames from basenames and check their existence … … 5158 5163 geo_ref = write_NetCDF_georeference(origin, outfile) 5159 5164 5160 z = elevation 5165 5161 5166 5162 5167 #print geo_ref.get_xllcorner() 5163 5168 #print geo_ref.get_yllcorner() 5164 5169 5165 z = resize(z,outfile.variables['z'][:].shape)5170 elevation = resize(elevation,outfile.variables['elevation'][:].shape) 5166 5171 outfile.variables['x'][:] = x - geo_ref.get_xllcorner() 5167 5172 outfile.variables['y'][:] = y - geo_ref.get_yllcorner() 5168 outfile.variables['z'][:] = z #FIXME HACK for bacwards compat. 5169 outfile.variables['elevation'][:] = z 5173 outfile.variables['elevation'][:] = elevation 5170 5174 5171 5175 stage = outfile.variables['stage'] … … 5680 5684 outfile.variables[q+Write_sts.RANGE][1] = -max_float # Max 5681 5685 5682 outfile.createVariable('z', sts_precision, ('number_of_points',))5683 5686 # Doing sts_precision instead of Float gives cast errors. 5684 5687 outfile.createVariable('time', Float, ('number_of_timesteps',))
Note: See TracChangeset
for help on using the changeset viewer.