Changeset 4246


Ignore:
Timestamp:
Feb 8, 2007, 10:01:26 AM (18 years ago)
Author:
nick
Message:

updates to dampier

Location:
anuga_work/production/dampier_2006
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/dampier_2006/build_dampier.py

    r4212 r4246  
    127127G_small.export_points_file(project.combined_dir_name + '_small' + '.pts')
    128128G_other.export_points_file(project.combined_dir_name + '_other' + '.pts')
    129 '''
     129
    130130print 'start reading:',project.combined_dir_name + '.pts'
    131131G = Geospatial_data(file_name = project.combined_dir_name + '.pts')
    132132print 'start export',project.combined_dir_name + '.txt'
    133133G.export_points_file(project.combined_dir_name + '.txt')
     134'''
     135#-------------------------------------------------------------------------
     136# Convert URS to SWW file for boundary conditions
     137#-------------------------------------------------------------------------
     138print 'starting to create boundary conditions'
     139boundaries_in_dir_name = project.boundaries_in_dir_name
     140
     141from anuga.shallow_water.data_manager import urs2sww
     142
     143print 'minlat=project.north_boundary, maxlat=project.south_boundary',project.north_boundary, project.south_boundary
     144print 'minlon= project.west_boundary, maxlon=project.east_boundary',project.west_boundary, project.east_boundary
     145
     146#import sys; sys.exit()
     147
     148#if access(project.boundaries_dir,F_OK) == 0:
     149#    mkdir (project.boundaries_dir)
     150
     151from caching import cache
     152cache(urs2sww,
     153      (boundaries_in_dir_name,
     154       project.boundaries_dir_name1),
     155      {'verbose': True,
     156       'minlat': project.south_boundary,
     157       'maxlat': project.north_boundary,
     158       'minlon': project.west_boundary,
     159       'maxlon': project.east_boundary,
     160       'mint': 0, 'maxt': 40000,
     161#       'origin': domain.geo_reference.get_origin(),
     162       'mean_stage': project.tide,
     163       'zscale': 1,                 #Enhance tsunami
     164       'fail_on_NaN': False},
     165       verbose = True,
     166       )
     167#       dependencies = source_dir + project.boundary_basename + '.sww')
    134168
    135169
  • anuga_work/production/dampier_2006/project.py

    r4228 r4246  
    7878boundaries_source = ''
    7979boundaries_name = 'o'
     80boundaries_name1 = 'o_new'
     81
    8082#boundaries locations
    8183boundaries_in_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'
     
    8486boundaries_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep
    8587boundaries_dir_name = boundaries_dir + boundaries_name
     88boundaries_dir_name1 = boundaries_dir + boundaries_name1
    8689#boundaries_time_dir = home+sep+state+sep+scenario+sep+'anuga'+sep+'boundaries'+sep+build_time+sep
    8790#boundaries_time_dir_name = boundaries_time_dir + boundaries_name  #Used by post processing
     
    125128print 'Area of bounding polygon', polygon_area(poly_all)/1000000.0
    126129
    127 #res_poly_all = 100000
    128 res_poly_all = 500000
     130res_poly_all = 100000
     131#res_poly_all = 500000
    129132
    130133###############################
     
    136139
    137140poly_dampier = read_polygon(polygons_dir+'dampier_town.csv')
    138 #res_dampier = 500
    139 res_dampier = 5000
     141res_dampier = 500
     142#res_dampier = 5000
    140143
    141144poly_karratha = read_polygon(polygons_dir+'karrathav2.csv')
     
    143146
    144147poly_karratha_town = read_polygon(polygons_dir+'karratha_townv2.csv')
    145 #res_karratha_town = 500
    146 res_karratha_town = 5000
     148res_karratha_town = 500
     149#res_karratha_town = 5000
    147150
    148151poly_facility = read_polygon(polygons_dir+'facility.csv')
     
    153156
    154157poly_coast = read_polygon(polygons_dir+'coastpoly.csv')
    155 #res_coast = 1000
    156 res_coast = 10000
     158res_coast = 1000
     159#res_coast = 10000
    157160
    158161poly_NWislands = read_polygon(polygons_dir+'nw_islands_area.csv')
     
    171174res_island0 = res_poly_all
    172175
    173 #res_islands = 5000
    174 res_islands = 15000
     176res_islands = 5000
     177#res_islands = 15000
    175178
    176179poly_ref_nw4 = read_polygon(polygons_dir+'ref_nw4.csv')
  • anuga_work/production/dampier_2006/run_dampier.py

    r4212 r4246  
    3333from anuga.abstract_2d_finite_volumes.util import start_screen_catcher, copy_code_files
    3434from anuga_parallel.parallel_api import distribute, numprocs, myid, barrier
    35 
     35from anuga_parallel.parallel_abstraction import get_processor_name
    3636# Application specific imports
    3737import project                 # Definition of file names and polygons
     
    4343
    4444start_screen_catcher(project.output_run_time_dir, myid, numprocs)
     45print "Processor Name:",get_processor_name()
    4546
    4647# filenames
     
    148149# MUST USE TXT FILES FOR CACHING TO WORK!
    149150                    filename = project.combined_dir_name + '.txt',
    150                     use_cache = True,
     151                    use_cache = False,
    151152                    verbose = True,
    152153                    alpha = 0.1)
     
    181182print 'Reading Boundary file'
    182183Bf = File_boundary(boundaries_dir_name + '.sww',
    183                   domain, time_thinning=1, use_cache=True, verbose=True)
     184                  domain, time_thinning=4, use_cache=True, verbose=True)
    184185
    185186print 'finished reading boundary file'
Note: See TracChangeset for help on using the changeset viewer.