Changeset 4545
- Timestamp:
- Jun 18, 2007, 10:38:47 AM (17 years ago)
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/data_manager.py
r4541 r4545 89 89 pmesh_to_domain_instance 90 90 from anuga.abstract_2d_finite_volumes.util import get_revision_number, \ 91 remove_lone_verts 91 remove_lone_verts, sww2timeseries 92 92 from anuga.load_mesh.loadASCII import export_mesh_file 93 93 # formula mappings … … 1689 1689 #print "basenames_out after",basenames_out 1690 1690 return files_out 1691 1692 1693 def get_timeseries(production_dirs, output_dir, scenario_name, gauges_dir_name, 1694 plot_quantity, generate_fig = False, 1695 reportname = None, surface = False, time_min = None, 1696 time_max = None, title_on = False, verbose = True, 1697 nodes=None): 1698 """ 1699 nodes - number of processes used. 1700 1701 warning - this function has no tests 1702 """ 1703 if reportname == None: 1704 report = False 1705 else: 1706 report = True 1707 1708 if nodes is None: 1709 is_parallel = False 1710 else: 1711 is_parallel = True 1712 1713 # Generate figures 1714 swwfiles = {} 1715 1716 if is_parallel is True: 1717 for i in range(nodes): 1718 print 'Sending node %d of %d' %(i,nodes) 1719 swwfiles = {} 1720 if not reportname == None: 1721 reportname = report_name + '_%s' %(i) 1722 for label_id in production_dirs.keys(): 1723 if label_id == 'boundaries': 1724 swwfile = best_boundary_sww 1725 else: 1726 file_loc = output_dir + label_id + sep 1727 sww_extra = '_P%s_%s' %(i,nodes) 1728 swwfile = file_loc + scenario_name + sww_extra + '.sww' 1729 print 'swwfile',swwfile 1730 swwfiles[swwfile] = label_id 1731 1732 texname, elev_output = sww2timeseries(swwfiles, 1733 gauges_dir_name, 1734 production_dirs, 1735 report = report, 1736 reportname = reportname, 1737 plot_quantity = plot_quantity, 1738 generate_fig = generate_fig, 1739 surface = surface, 1740 time_min = time_min, 1741 time_max = time_max, 1742 title_on = title_on, 1743 verbose = verbose) 1744 else: 1745 for label_id in production_dirs.keys(): 1746 if label_id == 'boundaries': 1747 print 'boundaries' 1748 file_loc = project.boundaries_in_dir 1749 swwfile = project.boundaries_dir_name3 + '.sww' 1750 # swwfile = boundary_dir_filename 1751 else: 1752 file_loc = output_dir + label_id + sep 1753 swwfile = file_loc + scenario_name + '.sww' 1754 swwfiles[swwfile] = label_id 1755 1756 texname, elev_output = sww2timeseries(swwfiles, 1757 gauges_dir_name, 1758 production_dirs, 1759 report = report, 1760 reportname = reportname, 1761 plot_quantity = plot_quantity, 1762 generate_fig = generate_fig, 1763 surface = surface, 1764 time_min = time_min, 1765 time_max = time_max, 1766 title_on = title_on, 1767 verbose = verbose) 1768 1769 1691 1770 1692 1771 def sww2dem(basename_in, basename_out = None,
Note: See TracChangeset
for help on using the changeset viewer.