Ignore:
Timestamp:
May 30, 2008, 3:34:13 PM (16 years ago)
Author:
kristy
Message:

cleaned Perth python files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/perth/build_perth.py

    r5360 r5386  
    117117
    118118print'add all geospatial objects'
    119 G = G1 + G2 + G3 + G4 + G5 + G6 + G_off + G_off1
     119G = G1 + G2 + G3 + G4 + G5 + G6 + G_off
    120120
    121121print'clip combined geospatial object by bounding polygon'
    122 G_clipped = G.clip(project.bounding_polygon)
    123 #FIXME: add a clip function to pts
    124 #print'shape of clipped data', G_clipped.get_data_points().shape
     122G_clipped = G.clip(project.poly_all)
    125123
    126124print'export combined DEM file'
     
    128126    mkdir (project.topographies_dir)
    129127G_clipped.export_points_file(project.combined_dir_name + '.pts')
    130 #G_clipped.export_points_file(project.combined_dir_name + '.xya')
    131 
    132 '''
    133 print'project.combined_dir_name + 1.xya',project.combined_dir_name + '1.xya'
    134 G_all=Geospatial_data(file_name = project.combined_dir_name + '1.xya')
    135 print'split'
    136 G_all_1, G_all_2 = G_all.split(.10)
    137 print'export 1'
    138 G_all_1.export_points_file(project.combined_dir_name+'_small1' + '.xya')
    139 print'export 2'
    140 G_all_2.export_points_file(project.combined_dir_name+'_other1' + '.xya')
    141 
     128#G_clipped.export_points_file(project.combined_dir_name + '.xya') - use for comparision in ARC
    142129
    143130#-------------------------------------------------------------------------
     
    145132#-------------------------------------------------------------------------
    146133print 'starting to create boundary conditions'
     134from anuga.shallow_water.data_manager import urs2sww, urs_ungridded2sww
     135
    147136boundaries_in_dir_name = project.boundaries_in_dir_name
     137print 'boundaries_in_dir_name',project.boundaries_in_dir_name
    148138
    149 from anuga.shallow_water.data_manager import urs2sww
    150 
    151 print 'minlat=project.north_boundary, maxlat=project.south_boundary',project.north_boundary, project.south_boundary
    152 print 'minlon= project.west_boundary, maxlon=project.east_boundary',project.west_boundary, project.east_boundary
    153139
    154140#import sys; sys.exit()
    155141
    156 #if access(project.boundaries_dir,F_OK) == 0:
    157 #    mkdir (project.boundaries_dir)
    158 
    159 from caching import cache
    160 cache(urs2sww,
    161       (boundaries_in_dir_name,
    162        project.boundaries_dir_name1),
    163       {'verbose': True,
    164        'minlat': project.south_boundary,
    165        'maxlat': project.north_boundary,
    166        'minlon': project.west_boundary,
    167        'maxlon': project.east_boundary,
    168 #       'minlat': project.south,
    169 #       'maxlat': project.north,
    170 #       'minlon': project.west,
    171 #       'maxlon': project.east,
    172        'mint': 0, 'maxt': 40000,
    173 #       'origin': domain.geo_reference.get_origin(),
    174        'mean_stage': project.tide,
    175 #       'zscale': 1,                 #Enhance tsunami
    176        'fail_on_NaN': False},
    177        verbose = True,
    178        )
    179 #       dependencies = source_dir + project.boundary_basename + '.sww')
    180 
    181 '''
     142urs_ungridded2sww(project.boundaries_in_dir_name, project.boundaries_in_dir_name,
     143                  verbose=True, mint=4000, maxt=10000, zscale=1)
    182144
    183145
     
    187149
    188150
     151
     152
     153
Note: See TracChangeset for help on using the changeset viewer.