Changeset 3188
- Timestamp:
- Jun 20, 2006, 5:59:42 PM (19 years ago)
- Location:
- production/onslow_2006
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
production/onslow_2006/MOST_timeseries.py
r3159 r3188 4 4 Inputs: 5 5 6 output dirs: dictionary of output directories with a 7 association to simulation, eg 50m boundary, 100m boundary 8 6 production dirs: dictionary of output directories with a 7 association to simulation, eg 50m boundary, 100m boundary 8 9 gauge_map: graphical output from make_gauges.py 10 9 11 Outputs: 10 12 … … 22 24 23 25 # User defined inputs 24 production_dirs = {'SU-AU_clip': 'MOST'} 26 production_dirs = {'20060515_001733': '100m boundary', 27 #'20060530_102753': '50m boundary'}#, 28 'MOST': 'MOST'} 25 29 26 30 gauge_map = 'boundarycomparison.png' 27 plot_quantity = ['stage', 'speed']28 31 29 32 # Create sections and graphs for each designated production directory … … 32 35 for label_id in production_dirs.keys(): 33 36 34 file_loc = project.boundarydir 35 swwfile = file_loc + project.boundary_basename + '.sww' 37 file_loc = project.outputdir + label_id + sep 38 swwfile = file_loc + project.basename + '.sww' 39 if label_id == 'MOST': 40 swwfile = project.boundarydir + project.boundary_basename + '.sww' 36 41 swwfiles[swwfile] = label_id 42 43 print 'swwfiles', swwfiles 37 44 38 45 texname, vec = sww2timeseries(swwfiles, … … 40 47 production_dirs, 41 48 report = True, 42 reportname = 'latexoutput_MOST_input', 43 plot_quantity = plot_quantity, 49 reportname = 'latexoutput_MOST_ANUGA_comparison', 50 plot_quantity = ['stage', 'speed'], 51 surface = False, 44 52 time_min = None, 45 53 time_max = None, … … 49 57 latex_output.append(texname) 50 58 59 from shutil import copy, move 60 copy ('report' + sep + texname + '.tex', project.comparereportdir + sep + texname + '.tex') 51 61 52 62 # Start report generation 53 reportdir = getcwd()+sep+'report'+sep 54 if access(reportdir,F_OK) == 0: 55 mkdir (reportdir) 56 input_name = reportdir + sep + 'MOST_input_onslow.tex' 63 input_name = project.comparereportdir + sep + 'comparison_onslow.tex' 57 64 fid = open(input_name, 'w') 65 66 s = '\\begin{figure}[hbt] \n \centerline{ \includegraphics[width=150mm, height=100mm]{../report_figures/%s}}' %gauge_map 67 fid.write(s) 68 69 s = """ 70 \caption{Point locations used to compare MOST and ANUGA for Onslow region.} 71 \label{fig:comparisonpoints} 72 \end{figure} 73 """ 74 fid.write(s) 75 76 s = '\input{%s} \n \clearpage \n \n' %latex_output[0] 77 fid.write(s) 78 58 79 59 80 # Generate latex output for location points … … 81 102 #s = '\\end{tabular} \n \end{center} \n \end{table} \n \n' 82 103 #fid.write(s) 83 84 s = '\\begin{figure}[hbt] \n \centerline{ \includegraphics[width=150mm, height=100mm]{../report_figures/%s}}' %gauge_map85 fid.write(s)86 87 s = """88 \caption{Point locations used for MOST input for Onslow region.}89 \label{fig:boundarypoints}90 \end{figure}91 """92 fid.write(s)93 94 s = '\input{%s} \n \clearpage \n \n' %latex_output[0]95 fid.write(s) -
production/onslow_2006/compare_timeseries.py
r3150 r3188 43 43 report = True, 44 44 reportname = 'latexoutput_compare', 45 surface = False, 45 46 plot_quantity = plot_quantity, 46 47 time_min = None, -
production/onslow_2006/make_gauges.py
r3169 r3188 1 """ Make a line of gauges from outside boundary to near centre polygon1 """ Make a line of gauges from near the boundary to near centre polygon 2 2 for Onslow study to look at MOST wave and compare to ANUGA output 3 Output from here is used as the gauge file input in MOST_timeseries.py 3 4 """ 4 5 import project 5 6 from pylab import plot, xlabel, ylabel, title, ion, axis, savefig, close, text 6 from utilities.polygon import poly_xy 7 from utilities.polygon import poly_xy, is_inside_polygon 7 8 from Numeric import arange 8 9 from pmesh.create_mesh import convert_points_from_latlon_to_utm … … 33 34 34 35 MOSTymax = MOSTymax-3000.0 35 print 'MOST clipping: ', MOSTxmin, MOSTxmax, MOSTymin, MOSTymax36 36 # nominated point in centre region for Onslow 37 37 x2 = 305000.0 … … 64 64 for j, xpoint in enumerate(plotx): 65 65 ypoint = m*xpoint+c 66 if ypoint > testy and ypoint <= d0[1]:67 #if ypoint >= testy and ypoint <= MOSTymax:68 if xpoint > MOSTxmin and xpoint < MOSTxmax:66 test = is_inside_polygon([xpoint,ypoint],project.polyAll,closed=True) 67 if test == True: 68 if ypoint > testy and ypoint < MOSTymax: 69 69 xplot.append(xpoint) 70 70 yplot.append(ypoint) … … 78 78 for j, xpoint in enumerate(plotx): 79 79 ypoint = m*xpoint+c 80 if ypoint > testy and ypoint < MOSTymax: #testy 81 if xpoint > MOSTxmin and xpoint < MOSTxmax: 80 test = is_inside_polygon([xpoint,ypoint],project.polyAll,closed=True) 81 if test == True: 82 if ypoint > testy and ypoint < MOSTymax: 82 83 xplot.append(xpoint) 83 84 yplot.append(ypoint) -
production/onslow_2006/make_report.py
r3181 r3188 92 92 swwfiles[swwfile] = label_id 93 93 94 texname, elev_output, = sww2timeseries(swwfiles, 95 project.gauge_filename, 96 production_dirs, 97 report = True, 98 reportname = 'latexoutput', 99 plot_quantity = ['stage', 'speed'], 100 time_min = None, 101 time_max = None, 102 title_on = False, 103 verbose = True) 94 texname, elev_output = sww2timeseries(swwfiles, 95 project.gauge_filename, 96 production_dirs, 97 report = True, 98 reportname = 'latexoutput', 99 plot_quantity = ['stage', 'speed'], 100 surface = False, 101 time_min = None, 102 time_max = None, 103 title_on = False, 104 verbose = True) 104 105 105 106 latex_output.append(texname) -
production/onslow_2006/project.py
r3158 r3188 61 61 gauges50 = gaugedir + '50_gauges.xya' 62 62 gauge_comparison = gaugedir + 'MOST_comparison_gauges.xya' 63 gauge_comparison_3d = gaugedir + 'MOST_comparison_gauges_3d.xya' 63 64 community_filename = gaugedir + 'CHINS_v2.csv' 64 65 community_scenario = gaugedir + 'community_onslow.csv' -
production/onslow_2006/report/data.tex
r3169 r3188 18 18 (about 30 metres), produced from 1:50 000 contours, elevations and 19 19 drainage. In addition, the Department of Land Information (DLI) has provided a 20 20m DEM and orthophotography covering the NW Shelf. However, the 30m 20 20m Digital Elevation Model (DEM) and orthophotography 21 covering the NW Shelf. However, the 30m 21 22 DTED Level 2 data is ``bare earth'' whereas the DLI data is distorted by 22 23 vegetation 23 24 and buildings so we have chosen to use the DTED as the onshore 24 topographic data set. 25 topographic data set. It is also important to note that the DEM does 26 not include features such as rock walls, berths etc. 25 27 26 28 With respect to the offshore data, the Department of Planning and
Note: See TracChangeset
for help on using the changeset viewer.