Changeset 7778 for trunk/anuga_core/source/anuga/file/sts.py
- Timestamp:
- Jun 4, 2010, 10:03:48 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/file/sts.py
r7766 r7778 1 1 import numpy as num 2 import log 3 from Scientific.IO.NetCDF import NetCDFFile 4 2 5 from anuga.config import max_float 3 6 from anuga.config import netcdf_float, netcdf_float32, netcdf_int … … 5 8 from anuga.coordinate_transforms.geo_reference import Geo_reference, \ 6 9 ensure_geo_reference 7 10 from anuga.config import netcdf_mode_r, netcdf_mode_w, netcdf_mode_a 8 11 9 12 class Write_sts: … … 268 271 # @param stsname Stem of path to the STS file to read. 269 272 # @return A list of boundary points. 270 def create_sts_boundary(sts name):273 def create_sts_boundary(sts_filename): 271 274 """Create a list of points defining a boundary from an STS file. 272 275 … … 280 283 """ 281 284 285 if sts_filename.endswith('.sts'): 286 stsname_postfixed = sts_filename 287 else: 288 stsname_postfixed = sts_filename + '.sts' 289 282 290 try: 283 fid = NetCDFFile(stsname + '.sts', netcdf_mode_r)284 except :285 msg = 'Cannot open %s' % stsname + '.sts'291 fid = NetCDFFile(stsname_postfixed, netcdf_mode_r) 292 except IOError: 293 msg = 'Cannot open %s' % stsname_postfixed 286 294 raise IOError(msg) 287 295
Note: See TracChangeset
for help on using the changeset viewer.