Changeset 3150 for production
- Timestamp:
- Jun 13, 2006, 4:37:58 PM (19 years ago)
- Location:
- production/onslow_2006
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
production/onslow_2006/compare_timeseries.py
r3136 r3150 27 27 gauge_map = 'onslow_boundary_gauges.png' 28 28 29 plot_quantity = ['stage', 'speed'] 30 29 31 # Create sections and graphs for each designated production directory 30 32 latex_output = [] … … 36 38 swwfiles[swwfile] = label_id 37 39 38 texname = sww2timeseries(swwfiles, 39 project.gauges50, 40 production_dirs, 41 report = True, 42 plot_quantity = ['stage', 'speed'], 43 time_min = None, 44 time_max = None, 45 title_on = False, 46 verbose = True) 40 texname, vec = sww2timeseries(swwfiles, 41 project.gauges50, 42 production_dirs, 43 report = True, 44 reportname = 'latexoutput_compare', 45 plot_quantity = plot_quantity, 46 time_min = None, 47 time_max = None, 48 title_on = False, 49 verbose = True) 47 50 48 texname = texname + '_compare'49 51 latex_output.append(texname) 50 52 51 from shutil import copy 52 copy (texname, project.comparereportdir + 'latex_input.tex') 53 from shutil import copy, move 54 copy ('report' + sep + texname + '.tex', project.comparereportdir + sep + texname + '.tex') 55 53 56 54 57 # Start report generation … … 57 60 58 61 # Generate latex output for location points 59 s = '\\begin{table} \label{table:locations } \n'62 s = '\\begin{table} \label{table:locationsonslow} \n' 60 63 fid.write(s) 61 64 s = '\caption{Defined point locations for comparison study for Onslow region.}' … … 64 67 \\begin{center} 65 68 \\begin{tabular}{|l|l|l|l|}\hline 66 \\bf{Point Name} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation }\\\\ \hline69 \\bf{Point Name} & \\bf{Easting} & \\bf{Northing} & \\bf{Elevation (m)}\\\\ \hline 67 70 """ 68 71 fid.write(s) 69 72 70 gauges, locations, elevation = get_gauges_from_file(project.gauges50) 71 72 for name, gauges, elev in zip(locations, gauges, elevation): 73 east = gauges[0]74 north = gauges[1]75 s = '%s & %.2f & %.2f & %.2f \\\\ \hline \n' %(name .replace('_',' '), east, north, elev)73 for i, thisvec in enumerate(vec): 74 name = thisvec[0] 75 east = thisvec[1] 76 north = thisvec[2] 77 elev = thisvec[3] 78 s = '%s & %.2f & %.2f & %.2f \\\\ \hline \n' %(name, east, north, elev) 76 79 fid.write(s) 80 for which_one in plot_quantity: 81 move ('report_figures' + sep + 'gauge'+name.replace(' ','')+which_one+'.png', project.comparereportfigdir) 77 82 78 83 s = '\\end{tabular} \n \end{center} \n \end{table} \n \n' … … 83 88 84 89 s = """ 85 \caption{Point locations used for Onslow study.}90 \caption{Point locations used for comparison between boundary at 50m and 100m contour for Onslow region.} 86 91 \label{fig:points} 87 92 \end{figure} … … 91 96 s = '\input{%s} \n \clearpage \n \n' %latex_output[0] 92 97 fid.write(s) 93 94 s = '\end{document}'95 fid.write(s) -
production/onslow_2006/plot_data_extent.py
r3136 r3150 59 59 x = [] 60 60 y = [] 61 name = [] 61 62 line1 = lines[0] 62 63 for line in lines[1:]: … … 64 65 x.append(float(fields[0])) 65 66 y.append(float(fields[1])) 67 if len(line) > 2: name.append(fields[2]) 66 68 67 return x, y 69 return x, y, name 68 70 69 71 if plot_data == True: … … 119 121 figure(4) 120 122 figname = 'onslow_gauges' 121 x, y = read_file(project.gauge_filename)123 x, y, name = read_file(project.gauge_filename) 122 124 plot(x1,y1,'r-',x,y,'r+') 123 125 savefig(figname) … … 125 127 figure(5) 126 128 figname = 'onslow_new_boundary_test' 127 gaugex, gaugey = read_file(project.gauges50)129 gaugex, gaugey, name = read_file(project.gauges50) 128 130 x50, y50 = poly_xy(project.bounding_poly50) 129 131 x_onslow, y_onslow = poly_xy(project.poly_onslow) … … 132 134 #plot(x50,y50,'r-',x25,y25,'r-',x1,y1,'g-') 133 135 plot(x50,y50,'r-',x1,y1,'g-', gaugex, gaugey, 'b+', x_onslow, y_onslow,'r-', x_coast, y_coast,'r-') 136 for i, string in enumerate(name): 137 text(gaugex[i],gaugey[i],string,fontsize=7) 134 138 savefig(figname) 135 139 close('all') -
production/onslow_2006/project.py
r3136 r3150 52 52 outputdir = home+sep+scenario_dir_name+sep+'output'+sep 53 53 tidedir = home+sep+scenario_dir_name+sep+'tide_data'+sep 54 comparereportdir = comparehome+sep+'documentation'+sep+'experimentation'+'boundary_ANUGA_MOST' 54 comparereportdir = comparehome+sep+'documentation'+sep+'experimentation'+sep+'boundary_ANUGA_MOST'+sep+'report' 55 comparereportfigdir = comparehome+sep+'documentation'+sep+'experimentation'+sep+'boundary_ANUGA_MOST'+sep+'report_figures' 55 56 print'bound', boundarydir 56 57
Note: See TracChangeset
for help on using the changeset viewer.