Changeset 1753 for inundation/pyvolution/data_manager.py
- Timestamp:
- Aug 24, 2005, 1:49:47 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/data_manager.py
r1740 r1753 963 963 964 964 import os 965 from Scientific.IO.NetCDF import NetCDFFile965 #from Scientific.IO.NetCDF import NetCDFFile 966 966 from Numeric import Float, arrayrange, concatenate 967 967 … … 1010 1010 1011 1011 if verbose: print 'Store to NetCDF file %s' %ptsname 1012 write_ptsfile(ptsname, points, attribute, attribute_name) 1013 1014 1015 def write_ptsfile(ptsname, points, attribute, attribute_name = None): 1016 """Write points and associated attribute to pts (NetCDF) format 1017 """ 1018 1019 from Numeric import Float 1020 1021 if attribute_name is None: 1022 attribute_name = 'attribute' 1023 1024 1025 from Scientific.IO.NetCDF import NetCDFFile 1026 1012 1027 # NetCDF file definition 1013 1028 outfile = NetCDFFile(ptsname, 'w') 1029 1014 1030 1015 1031 #Create new file … … 1040 1056 nc_attribute[:] = attribute 1041 1057 1042 infile.close()1043 1058 outfile.close() 1044 1059 1060 1045 1061 def dem2pts(basename_in, basename_out=None, verbose=False, 1046 1062 easting_min=None, easting_max=None, … … 1063 1079 elevation: N Float array 1064 1080 """ 1081 1082 #FIXME: Can this be written feasibly using write_pts? 1065 1083 1066 1084 import os
Note: See TracChangeset
for help on using the changeset viewer.