Changeset 3094
- Timestamp:
- Jun 6, 2006, 12:01:52 PM (18 years ago)
- Files:
-
- 1 deleted
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/util.py
r3083 r3094 544 544 def sww2timeseries(swwfiles, 545 545 gauge_filename, 546 #label_id,547 546 production_dirs, 548 547 report = None, … … 566 565 - assume that all conserved quantities have been stored 567 566 - assume each sww file has been simulated with same timestep 568 567 569 568 gauge_filename - name of file containing gauge data 570 569 - name, easting, northing … … 625 624 k = _sww2timeseries(swwfiles, 626 625 gauge_filename, 627 #label_id,628 626 production_dirs, 629 627 report, … … 638 636 def _sww2timeseries(swwfiles, 639 637 gauge_filename, 640 #label_id,641 638 production_dirs, 642 639 report = None, … … 646 643 title_on = None, 647 644 verbose = False): 648 649 #assert type(swwfile) == type(''),\650 # 'The sww filename must be a string'651 652 #try:653 # fid = open(swwfile)654 #except Exception, e:655 # msg = 'File "%s" could not be opened: Error="%s"'\656 # %(swwfile, e)657 # raise msg658 659 #index = swwfile.rfind(sep)660 #file_loc = swwfile[:index+1]661 645 662 646 assert type(gauge_filename) == type(''),\ … … 683 667 if title_on is None: 684 668 title_on = True 685 686 #assert type(label_id) == type(''),\687 # 'label_id to sww2timeseries must be a string'688 669 689 670 if verbose: print '\n Gauges obtained from: %s \n' %gauge_filename … … 695 676 f_list = [] 696 677 label_id = [] 678 leg_label = [] 679 themaxT = 0.0 680 theminT = 0.0 697 681 698 682 for swwfile in swwfiles.keys(): … … 710 694 verbose = True, 711 695 use_cache = True) 712 713 #if max(f.quantities['xmomentum']) > 1.e10:714 # msg = 'Not all conserved quantities available from sww file. \n sww2timeseries requires all conserved quantities stored in sww file'715 # raise Exception, msg716 696 717 697 index = swwfile.rfind(sep) 718 698 file_loc.append(swwfile[:index+1]) 719 699 label_id.append(swwfiles[swwfile]) 700 leg_label.append(production_dirs[swwfiles[swwfile]]) 701 720 702 f_list.append(f) 721 722 #T.append(f.get_time()) 723 T = f.get_time() 724 703 maxT = max(f.get_time()) 704 minT = min(f.get_time()) 705 if maxT > themaxT: themaxT = maxT 706 if minT > theminT: theminT = minT 707 725 708 if time_min is None: 726 time_min = min(T)709 time_min = theminT # min(T) 727 710 else: 728 if time_min < min(T):711 if time_min < theminT: # min(T): 729 712 msg = 'Minimum time entered not correct - please try again' 730 713 raise Exception, msg 731 714 732 715 if time_max is None: 733 time_max = max(T)716 time_max = themaxT # max(T) 734 717 else: 735 if time_max > max(T):718 if time_max > themaxT: # max(T): 736 719 msg = 'Maximum time entered not correct - please try again' 737 720 raise Exception, msg … … 739 722 if verbose: print 'Inputs OK - going to generate figures' 740 723 741 return generate_figures(plot_quantity, file_loc, report, 742 f_list, gauges, locations, production_dirs,724 return generate_figures(plot_quantity, file_loc, report, leg_label, 725 f_list, gauges, locations, elev, production_dirs, 743 726 time_min, time_max, title_on, label_id, verbose) 744 727 … … 801 784 return bearing 802 785 803 def generate_figures(plot_quantity, file_loc, report, f_list, gauges,804 locations, production_dirs, time_min, time_max,786 def generate_figures(plot_quantity, file_loc, report, leg_label, f_list, gauges, 787 locations, elev, production_dirs, time_min, time_max, 805 788 title_on, label_id, verbose): 806 789 … … 810 793 from pylab import ion, hold, plot, axis, figure, legend, savefig, \ 811 794 xlabel, ylabel, title, close, subplot 812 813 #filename = file_loc.split(sep)814 795 815 796 if report == True: … … 831 812 if verbose: print '\n Latex output printed to %s \n' %texfilename 832 813 fid = open(texfilename, 'w') 833 leg_label = []834 for label_id in production_dirs.keys():835 leg_label.append(production_dirs[label_id])836 814 else: 837 815 texfile = '' … … 1036 1014 1037 1015 word_quantity += ' and ' + plot_quantity[nn-1] 1038 caption = 'Time series for %s at %s gauge location ' %(word_quantity, locations[k]) #gaugeloc.replace('_',' '))1016 caption = 'Time series for %s at %s gauge location (elevation %.2fm)' %(word_quantity, locations[k], elev[k]) #gaugeloc.replace('_',' ')) 1039 1017 label = '%sgauge%s' %(label_id2, gaugeloc2) 1040 1018 s = '\end{tabular} \n \\caption{%s} \n \label{fig:%s} \n \end{figure} \n \n' %(caption, label) … … 1055 1033 for which_quantity in plot_quantity: 1056 1034 where1 += 1 1057 #index = j*len(plot_quantity)*k1058 1035 s = '\includegraphics[width=0.49\linewidth, height=50mm]{%s%s}' %(graphname_report[index], '.png') 1059 1036 index += 1 … … 1067 1044 word_quantity += ' and ' + plot_quantity[nn-1] 1068 1045 label = 'gauge%s' %(gaugeloc2) 1069 caption = 'Time series for %s at %s gauge location ' %(word_quantity, locations[k]) #gaugeloc.replace('_',' '))1046 caption = 'Time series for %s at %s gauge location (elevation %.2fm)' %(word_quantity, locations[k], elev[k]) 1070 1047 1071 #s = '\\caption{%s} \n \label{fig:%s} \n \end{figure} \n \n' %(caption, label)1072 1048 s = '\end{tabular} \n \\caption{%s} \n \label{fig:%s} \n \end{figure} \n \n' %(caption, label) 1073 1049 fid.write(s) 1074 1050 c += 1 1075 if c % 25 == 0: fid.write('\\clearpage \n') 1076 1051 if c % 25 == 0: fid.write('\\clearpage \n') 1077 1052 1078 1053 #### finished generating figures ### -
production/onslow_2006/make_report.py
r3082 r3094 93 93 texname = sww2timeseries(swwfiles, 94 94 project.gauge_filename, 95 #label_id,96 95 production_dirs, 97 96 report = True, … … 168 167 169 168 \section{Tsunami scenarios} 170 \label{sec:tsunamiscenario s}169 \label{sec:tsunamiscenario} 171 170 \input{tsunami_scenario} 172 171 -
production/onslow_2006/report/latexoutput.tex
r3077 r3094 5 5 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugeBeadonPointLoadingBerthspeed.png}\\ 6 6 \end{tabular} 7 \caption{Time series for stage and speed at Beadon Point Loading Berth gauge location }7 \caption{Time series for stage and speed at Beadon Point Loading Berth gauge location (elevation -8.69m)} 8 8 \label{fig:gaugeBeadonPointLoadingBerth} 9 9 \end{figure} … … 15 15 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugeHospitalspeed.png}\\ 16 16 \end{tabular} 17 \caption{Time series for stage and speed at Hospital gauge location }17 \caption{Time series for stage and speed at Hospital gauge location (elevation 7.56m)} 18 18 \label{fig:gaugeHospital} 19 19 \end{figure} … … 25 25 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugeBindiBindiCommunityspeed.png}\\ 26 26 \end{tabular} 27 \caption{Time series for stage and speed at Bindi Bindi Community gauge location }27 \caption{Time series for stage and speed at Bindi Bindi Community gauge location (elevation 1.00m)} 28 28 \label{fig:gaugeBindiBindiCommunity} 29 29 \end{figure} … … 35 35 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugePowerStationspeed.png}\\ 36 36 \end{tabular} 37 \caption{Time series for stage and speed at Power Station gauge location }37 \caption{Time series for stage and speed at Power Station gauge location (elevation 5.17m)} 38 38 \label{fig:gaugePowerStation} 39 39 \end{figure} … … 45 45 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugeAirportRunwayspeed.png}\\ 46 46 \end{tabular} 47 \caption{Time series for stage and speed at Airport Runway gauge location }47 \caption{Time series for stage and speed at Airport Runway gauge location (elevation 3.00m)} 48 48 \label{fig:gaugeAirportRunway} 49 49 \end{figure} … … 55 55 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugeBeadonCreekDocksspeed.png}\\ 56 56 \end{tabular} 57 \caption{Time series for stage and speed at Beadon Creek Docks gauge location }57 \caption{Time series for stage and speed at Beadon Creek Docks gauge location (elevation 1.76m)} 58 58 \label{fig:gaugeBeadonCreekDocks} 59 59 \end{figure} … … 65 65 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugeWestofGroynespeed.png}\\ 66 66 \end{tabular} 67 \caption{Time series for stage and speed at West of Groyne gauge location }67 \caption{Time series for stage and speed at West of Groyne gauge location (elevation -2.10m)} 68 68 \label{fig:gaugeWestofGroyne} 69 69 \end{figure} … … 75 75 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugeBeadonCreekmouthspeed.png}\\ 76 76 \end{tabular} 77 \caption{Time series for stage and speed at Beadon Creek mouth gauge location }77 \caption{Time series for stage and speed at Beadon Creek mouth gauge location (elevation -2.80m)} 78 78 \label{fig:gaugeBeadonCreekmouth} 79 79 \end{figure} … … 85 85 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugeBeadonCreeksouthofdockspeed.png}\\ 86 86 \end{tabular} 87 \caption{Time series for stage and speed at Beadon Creek south of dock gauge location }87 \caption{Time series for stage and speed at Beadon Creek south of dock gauge location (elevation -1.49m)} 88 88 \label{fig:gaugeBeadonCreeksouthofdock} 89 89 \end{figure} … … 95 95 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugeCentredamwallspeed.png}\\ 96 96 \end{tabular} 97 \caption{Time series for stage and speed at Centre dam wall gauge location }97 \caption{Time series for stage and speed at Centre dam wall gauge location (elevation 3.00m)} 98 98 \label{fig:gaugeCentredamwall} 99 99 \end{figure} … … 105 105 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugeDamoverflowspeed.png}\\ 106 106 \end{tabular} 107 \caption{Time series for stage and speed at Dam overflow gauge location }107 \caption{Time series for stage and speed at Dam overflow gauge location (elevation 1.53m)} 108 108 \label{fig:gaugeDamoverflow} 109 109 \end{figure} … … 115 115 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugeLightTowerspeed.png}\\ 116 116 \end{tabular} 117 \caption{Time series for stage and speed at Light Tower gauge location }117 \caption{Time series for stage and speed at Light Tower gauge location (elevation 1.47m)} 118 118 \label{fig:gaugeLightTower} 119 119 \end{figure} … … 125 125 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugeBeadonBaywestspeed.png}\\ 126 126 \end{tabular} 127 \caption{Time series for stage and speed at Beadon Bay west gauge location }127 \caption{Time series for stage and speed at Beadon Bay west gauge location (elevation -4.61m)} 128 128 \label{fig:gaugeBeadonBaywest} 129 129 \end{figure} … … 135 135 \includegraphics[width=0.49\linewidth, height=50mm]{../report_figures/gaugeBeadonBayeastspeed.png}\\ 136 136 \end{tabular} 137 \caption{Time series for stage and speed at Beadon Bay east gauge location }137 \caption{Time series for stage and speed at Beadon Bay east gauge location (elevation -3.56m)} 138 138 \label{fig:gaugeBeadonBayeast} 139 139 \end{figure} -
production/onslow_2006/report/onslow_2006_report.tex
r3082 r3094 52 52 53 53 \section{Tsunami scenarios} 54 \label{sec:tsunamiscenario s}54 \label{sec:tsunamiscenario} 55 55 \input{tsunami_scenario} 56 56 -
production/pt_hedland_2006/make_report.py
r3082 r3094 168 168 169 169 \section{Tsunami scenarios} 170 \label{sec:tsunamiscenario s}170 \label{sec:tsunamiscenario} 171 171 \input{tsunami_scenario} 172 172 -
production/pt_hedland_2006/project.py
r3082 r3094 108 108 # region to export (used from export_results.py) 109 109 110 e_min_area = 6 33000111 e_max_area = 6 90000112 n_min_area = 774 0000113 n_max_area = 77 61000110 e_min_area = 659000#633000 111 e_max_area = 678000#690000 112 n_min_area = 7746000#7740000 113 n_max_area = 7757000#7761000 114 114 115 115 refzone = 50 # confirm with Hamish
Note: See TracChangeset
for help on using the changeset viewer.