Changeset 8143
- Timestamp:
- Mar 10, 2011, 9:10:48 PM (14 years ago)
- Location:
- trunk/anuga_core/source/anuga/file
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/file/csv_file.py
r8125 r8143 140 140 141 141 142 ##143 # @brief Store keyword params into a CSV file.144 # @param verbose True if this function is to be verbose.145 # @param kwargs Dictionary of keyword args to store.146 # @note If kwargs dict contains 'file_name' key, that has the output filename.147 # If not, make up a filename in the output directory.148 142 def store_parameters(verbose=False, **kwargs): 149 143 """ -
trunk/anuga_core/source/anuga/file/sts.py
r7859 r8143 17 17 EXTREMA = ':extrema' 18 18 19 ##20 # @brief Instantiate this STS writer class.21 19 def __init__(self): 22 20 pass 23 21 24 ##25 # @brief Write a header to the underlying data file.26 # @param outfile Handle to open file to write.27 # @param times A list of the time slice times *or* a start time.28 # @param number_of_points The number of URS gauge sites.29 # @param description Description string to write into the STS file.30 # @param sts_precision Format of data to write (netcdf constant ONLY).31 # @param verbose True if this function is to be verbose.32 # @note If 'times' is a list, the info will be made relative.33 22 def store_header(self, 34 23 outfile, … … 38 27 sts_precision=netcdf_float32, 39 28 verbose=False): 40 """ 41 outfile - the name of the file that will be written 42 times - A list of the time slice times OR a start time 43 Note, if a list is given the info will be made relative. 44 number_of_points - the number of urs gauges sites 29 """Write a header to the underlying data file. 30 31 outfile handle to open file to write 32 times list of the time slice times *or* a start time 33 number_of_points the number of URS gauge sites 34 description description string to write into the STS file 35 sts_precision format of data to write (netcdf constant ONLY) 36 verbose True if this function is to be verbose 37 38 If 'times' is a list, the info will be made relative. 45 39 """ 46 40 … … 96 90 self.write_dynamic_quantities(outfile, Write_sts.sts_quantities, times) 97 91 98 ##99 # @brief100 # @param outfile101 # @param points_utm102 # @param elevation103 # @param zone104 # @param new_origin105 # @param points_georeference106 # @param verbose True if this function is to be verbose.107 92 def store_points(self, 108 93 outfile, … … 188 173 outfile.variables[q + Write_sts.RANGE][1] = max(elevation) 189 174 190 ##191 # @brief Store quantity data in the underlying file.192 # @param outfile193 # @param sts_precision194 # @param slice_index195 # @param time196 # @param verboseTrue if this function is to be verbose.197 # @param **quant Extra keyword args.198 175 def store_quantities(self, outfile, sts_precision=num.float32, 199 176 slice_index=None, time=None, … … 275 252 276 253 277 ##278 # @brief Create a list of points defining a boundary from an STS file.279 # @param stsname Stem of path to the STS file to read.280 # @return A list of boundary points.281 254 def create_sts_boundary(sts_filename): 282 255 """Create a list of points defining a boundary from an STS file. -
trunk/anuga_core/source/anuga/file/urs.py
r8124 r8143 22 22 """ 23 23 24 ##25 # @brief Initialize this instance of Urs_points.26 # @param urs_file Path to the underlying data file.27 24 def __init__(self, urs_file): 28 25 self.iterated = False … … 59 56 # check this array 60 57 61 ##62 # @brief Allow iteration over quantity data wrt time.63 58 def __iter__(self): 64 59 """ … … 78 73 return self 79 74 80 ##81 # @brief82 75 def next(self): 83 76 if self.time_step_count == self.iter_time_step: … … 93 86 return hz_p 94 87 95 ##96 # @brief Close the mux file.97 88 def close(self): 98 89 self.mux_file.close() … … 110 101 #LONG_AMOUNT = 3600 111 102 112 113 ##114 # @brief115 # @param file_name116 # @param boundary_polygon117 # @param zone118 # @param ll_lat119 # @param ll_long120 # @param grid_spacing121 # @param lat_amount122 # @param long_amount123 # @param isSouthernHemisphere124 # @param export_csv125 # @param use_cache126 # @param verbose True if this function is to be verbose.127 # @return128 103 129 104 def save_boundary_as_urs(file_name, boundary_polygon, zone, … … 181 156 182 157 183 ##184 # @brief185 # @param boundary_polygon186 # @param zone187 # @param ll_lat188 # @param ll_long189 # @param grid_spacing190 # @param lat_amount191 # @param long_amount192 # @param isSouthHemisphere193 # @param use_cache194 # @param verbose195 158 def calculate_boundary_points(boundary_polygon, zone, ll_lat, 196 159 ll_long, grid_spacing, … … 221 184 222 185 223 ##224 # @brief225 # @param boundary_polygon An iterable of points that describe a polygon.226 # @param zone227 # @param ll_lat Lower left latitude, in decimal degrees228 # @param ll_long Lower left longitude, in decimal degrees229 # @param grid_spacing Grid spacing in decimal degrees.230 # @param lat_amount231 # @param long_amount232 # @param isSouthHemisphere233 186 def _calculate_boundary_points(boundary_polygon, 234 187 zone, ll_lat, … … 277 230 278 231 279 ##280 # @brief Get the points that are needed to interpolate any point a a segment.281 # @param seg Two points in the UTM.282 # @param ll_lat Lower left latitude, in decimal degrees283 # @param ll_long Lower left longitude, in decimal degrees284 # @param grid_spacing285 # @param lat_amount286 # @param long_amount287 # @param zone288 # @param isSouthHemisphere289 # @return A list of points.290 232 def points_needed(seg, ll_lat, ll_long, grid_spacing, 291 233 lat_amount, long_amount, zone, … … 346 288 347 289 348 ##349 # @brief350 # @param lat351 # @param long352 # @param seg Two points in UTM.353 # @param max_distance354 290 def keep_point(lat, long, seg, max_distance): 355 291 """
Note: See TracChangeset
for help on using the changeset viewer.