Changeset 5946
 Timestamp:
 Nov 12, 2008, 11:52:17 AM (14 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

anuga_core/source_numpy_conversion/anuga/load_mesh/loadASCII.py
r5910 r5946 60 60 from os.path import splitext 61 61 62 from anuga.config import Float, Character, Int 62 63 from anuga.coordinate_transforms.geo_reference import Geo_reference,TITLE, TitleError 63 64 … … 699 700 if (mesh['vertices'].shape[0] > 0): 700 701 outfile.createDimension('num_of_vertices', mesh['vertices'].shape[0]) 701 outfile.createVariable('vertices', numpy.float, ('num_of_vertices',702 outfile.createVariable('vertices', Float, ('num_of_vertices', 702 703 'num_of_dimensions')) 703 704 outfile.variables['vertices'][:] = mesh['vertices'] … … 709 710 mesh['vertex_attribute_titles'].shape[1]) 710 711 outfile.createVariable('vertex_attributes', 711 numpy.float,712 Float, 712 713 ('num_of_vertices', 713 'num_of_vertex_attributes')) 714 'num_of_vertex_attributes')) 714 715 outfile.createVariable('vertex_attribute_titles', 715 numpy.character,716 Character, 716 717 ( 'num_of_vertex_attributes', 717 718 'num_of_vertex_attribute_title_chars' )) … … 725 726 mesh['segments'].shape[0]) 726 727 outfile.createVariable('segments', 727 Int Type,728 Int, 728 729 ('num_of_segments', 'num_of_segment_ends')) 729 730 outfile.variables['segments'][:] = mesh['segments'] … … 732 733 mesh['segment_tags'].shape[1]) 733 734 outfile.createVariable('segment_tags', 734 numpy.character,735 Character, 735 736 ('num_of_segments', 736 737 'num_of_segment_tag_chars')) … … 741 742 mesh['triangles'].shape[0]) 742 743 outfile.createVariable('triangles', 743 Int Type,744 Int, 744 745 ('num_of_triangles', 745 746 'num_of_triangle_vertices')) 746 747 outfile.createVariable('triangle_neighbors', 747 Int Type,748 Int, 748 749 ('num_of_triangles', 749 750 'num_of_triangle_faces')) … … 755 756 mesh['triangle_tags'].shape[1]) 756 757 outfile.createVariable('triangle_tags', 757 numpy.character,758 Character, 758 759 ('num_of_triangles', 759 760 'num_of_triangle_tag_chars')) … … 765 766 if (mesh['points'].shape[0] > 0): 766 767 outfile.createDimension('num_of_points', mesh['points'].shape[0]) 767 outfile.createVariable('points', numpy.float, ('num_of_points',768 outfile.createVariable('points', Float, ('num_of_points', 768 769 'num_of_dimensions')) 769 770 outfile.variables['points'][:] = mesh['points'] … … 772 773 mesh['point_attributes'].shape[1]) 773 774 outfile.createVariable('point_attributes', 774 numpy.float,775 Float, 775 776 ('num_of_points', 776 777 'num_of_point_attributes')) … … 781 782 mesh['outline_segments'].shape[0]) 782 783 outfile.createVariable('outline_segments', 783 Int Type,784 Int, 784 785 ('num_of_outline_segments', 785 786 'num_of_segment_ends')) … … 789 790 mesh['outline_segment_tags'].shape[1]) 790 791 outfile.createVariable('outline_segment_tags', 791 numpy.character,792 Character, 792 793 ('num_of_outline_segments', 793 794 'num_of_outline_segment_tag_chars')) … … 796 797 if (mesh['holes'].shape[0] > 0): 797 798 outfile.createDimension('num_of_holes', mesh['holes'].shape[0]) 798 outfile.createVariable('holes', numpy.float, ('num_of_holes',799 outfile.createVariable('holes', Float, ('num_of_holes', 799 800 'num_of_dimensions')) 800 801 outfile.variables['holes'][:] = mesh['holes'] … … 802 803 if (mesh['regions'].shape[0] > 0): 803 804 outfile.createDimension('num_of_regions', mesh['regions'].shape[0]) 804 outfile.createVariable('regions', numpy.float, ('num_of_regions',805 outfile.createVariable('regions', Float, ('num_of_regions', 805 806 'num_of_dimensions')) 806 807 outfile.createVariable('region_max_areas', 807 numpy.float,808 Float, 808 809 ('num_of_regions',)) 809 810 outfile.variables['regions'][:] = mesh['regions'] … … 813 814 mesh['region_tags'].shape[1]) 814 815 outfile.createVariable('region_tags', 815 numpy.character,816 Character, 816 817 ('num_of_regions', 817 818 'num_of_region_tag_chars'))
Note: See TracChangeset
for help on using the changeset viewer.