Changeset 3828


Ignore:
Timestamp:
Oct 19, 2006, 5:40:26 PM (18 years ago)
Author:
nick
Message:

updates to dampier

Location:
anuga_work/production/dampier_2006
Files:
2 edited

Legend:

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

    r3808 r3828  
    1313from anuga.geospatial_data.geospatial_data import *
    1414
    15 # Location and naming of scenario data
    16 state = 'western_australia'
    17 scenario_dir_name = 'dampier_tsunami_scenario_2006'
    18 #scenario_dir_name = 'karratha_tsunami_scenario_2005' # Tmp location
    19 
    20 basename = 'elevation50m'
    21 boundary_basename = 'dampier'
    22 
    23 
    24 # Data output
     15# file and system info
     16#---------------------------------
    2517codename = 'project.py'
    2618
     
    3426# INUNDATIONHOME is the inundation directory, not the data directory.
    3527home += sep +'data'
     28#----------------------------------
     29# Location and naming of scenario data
     30#----------------------------------
     31state = 'western_australia'
     32scenario_name = 'dampier_tsunami'
     33scenario_datas_name = 'dampier_tsunami_scenario_2006'  #name of the directory where the data is stored
     34#scenario_datas_name = 'karratha_tsunami_scenario_2005' # Tmp location
     35
     36#mesh_name = 'elevation50m'
     37boundary_name = 'dampier9'
     38boundary_source = 'mag_9'
     39
     40# topography file names
     41onshore_name = 'dli_no_islands'
     42coast_name = 'DTED_05_Contour'
     43islands_name = 'dted_islands'
     44offshore_name = 'XY100003902'
     45offshore_name1 = 'XY100003903'
     46offshore_name2 = 'XY100003951'
     47offshore_name3 = 'XY100006321'
     48offshore_name4 = 'XY100011756'
     49offshore_name5 = 'XY100014243'
     50offshore_name6 = 'XY100014244'
     51offshore_name7 = 'XY100021081'
     52offshore_name8 = 'XY100021082'
     53offshore_name9 = 'XY100021083'
     54offshore_name10 = 'XY100021085'
     55offshore_name11 = 'XY100021086'
     56offshore_name12 = 'XY100026309'
     57offshore_name13 = 'XY100026338'
     58offshore_name14 = 'XYDM83'
     59
     60combined_name ='dampier_combined_elevation'
     61
     62
    3663
    3764#Derive subdirectories and filenames
     65
     66meshes_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'meshes'+sep
     67topographies_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'topographies'+sep
     68gauges_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'gauges'+sep
     69polygons_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'polygons'+sep
     70boundaries_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+boundary_source+sep
     71#outputdir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'output'+sep
     72tide_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'tide_data'+sep
     73
    3874time = strftime('%Y%m%d_%H%M%S',localtime()) #gets time for new dir
    39 outputtimedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'output'+sep+time+sep
    40 
    41 meshdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'meshes'+sep
    42 datadir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'topographies'+sep
    43 gaugedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'gauges'+sep
    44 polygondir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'polygons'+sep
    45 boundarydir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'boundaries'+sep+'urs'+sep+'test'+sep
    46 outputdir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'output'+sep
    47 tidedir = home+sep+state+sep+scenario_dir_name+sep+'anuga'+sep+'tide_data'+sep
     75
     76output_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'outputs'+sep+time+sep
     77topographies_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'topographies'+sep+time+sep
     78boundaries_time_dir = home+sep+state+sep+scenario_datas_name+sep+'anuga'+sep+'boundaries'+sep+time+sep
     79
     80
    4881
    4982#gauge_filename = gaugedir + 'gauge_location_broome.csv'
    5083
    51 meshname = meshdir + basename
    52 outputname = outputtimedir + basename  #Used by post processing
    53 boundaryname = boundarydir + boundary_basename  #Used by post processing
     84onshore_dir_name = topographies_dir + onshore_name
     85coast_dir_name = topographies_dir + coast_name
     86islands_dir_name = topographies_dir + islands_name
     87offshore_dir_name = topographies_dir + offshore_name
     88offshore_dir_name1 = topographies_dir + offshore_name1
     89offshore_dir_name2 = topographies_dir + offshore_name2
     90offshore_dir_name3 = topographies_dir + offshore_name3
     91offshore_dir_name4 = topographies_dir + offshore_name4
     92offshore_dir_name5 = topographies_dir + offshore_name5
     93offshore_dir_name6 = topographies_dir + offshore_name6
     94offshore_dir_name7 = topographies_dir + offshore_name7
     95offshore_dir_name8 = topographies_dir + offshore_name8
     96offshore_dir_name9 = topographies_dir + offshore_name9
     97offshore_dir_name10 = topographies_dir + offshore_name10
     98offshore_dir_name11 = topographies_dir + offshore_name11
     99offshore_dir_name12 = topographies_dir + offshore_name12
     100offshore_dir_name13 = topographies_dir + offshore_name13
     101offshore_dir_name14 = topographies_dir + offshore_name14
     102
     103combined_dir_name = topographies_dir + combined_name
     104
     105mesh_dir_name = meshes_dir + scenario_name
     106output_dir_name = output_time_dir + scenario_name  #Used by post processing
     107boundary_dir_name = boundaries_dir + boundary_name  #Used by post processing
    54108
    55109
     
    61115west = degminsec2decimal_degrees(116,17,0)
    62116east = degminsec2decimal_degrees(118,10,0)
     117
     118#only used to clip boundary condition
     119north_boundary = north + 0.5
     120south_boundary = south - 0.5
     121west_boundary = west - 0.5
     122east_boundary = east + 0.5
     123
    63124
    64125p0 = [south, degminsec2decimal_degrees(116,32,0)]
     
    72133p8 = [south, east]
    73134
    74 
    75135bounding_polygon, zone =\
    76136                  convert_from_latlon_to_utm([p0, p1, p2, p3, p4,
     
    94154assert zone == refzone
    95155
    96 
     156e_min_area = 474000
     157e_max_area = 480000
     158n_min_area = 7719000
     159n_max_area = 7725000
    97160
    98161#Interior regions
  • anuga_work/production/dampier_2006/run_dampier.py

    r3808 r3828  
    5151from anuga.shallow_water.data_manager import urs2sww
    5252
    53 urs2sww(boundary_file, verbose='true',
    54        minlat=project.south,
    55        maxlat=project.north,
    56        minlon=project.west,
    57        maxlon=project.east)
    58 
    59 import sys; sys.exit()
    60 Bf = File_boundary(source_dir + project.boundary_basename + '.sww',
    61                    domain, verbose = True)
    62                    
    63 Br = Reflective_boundary(domain)
    64 Bd = Dirichlet_boundary([tide,0,0])
    65 domain.set_boundary({'back': Br,
    66                      'side': Bd,
    67                      'ocean': Bf})
    6853
    6954
    7055# creates copy of code in output dir if dir doesn't exist
    7156if access(project.outputtimedir,F_OK) == 0:
    72     mkdir (project.outputtimedir)
     57    print 'project.outputtimedir',dirname(project.outputtimedir)
     58    mkdir (project.outputtimedir,0777)
    7359copy (dirname(project.__file__) +sep+ project.__name__+'.py',
    7460      project.outputtimedir + project.__name__+'.py')
     
    9177                    #[project.point_polygon, 2000]]
    9278                    #[project.cipma_polygon, 20000]]
    93                     [project.cipma_polygon, 4000]]    # Caused memory error?
    94 
     79                    [project.cipma_polygon, 40000]]    # Caused memory error?
    9580
    9681#---------------------------
    9782# this is check that no interior polygon is outside the bounding poly
    9883#------------------------------
     84
     85"""
    9986count = 0
    10087for i in range(len(interior_regions)):
     
    11299    print 'check %s in production directory' %figname
    113100    import sys; sys.exit()
    114 
     101"""
    115102#-------------------------------------
    116103
     
    156143#-------------------------------------------------------------------------
    157144
     145
    158146print 'Available boundary tags', domain.get_boundary_tags()
    159147
     148from anuga.shallow_water.data_manager import urs2sww
    160149
    161 
    162 urs2sww(boundary_file,
    163        minlat=project.south,
    164        maxlat=project.north,
    165        minlon=project.west,
    166        maxlon=project.east)
     150urs2sww(boundary_file, verbose='true')
    167151
    168152Bf = File_boundary(source_dir + project.boundary_basename + '.sww',
     
    174158                     'ocean': Bf})
    175159
    176 
    177160#----------------------------------------------------------------------------
    178161# Evolve system through time
     
    181164t0 = time.time()
    182165
    183 for t in domain.evolve(yieldstep = 60, finaltime = 28600):
     166for t in domain.evolve(yieldstep = 120, finaltime = 28800):
    184167    domain.write_time()
    185168    domain.write_boundary_statistics(tags = 'ocean')     
Note: See TracChangeset for help on using the changeset viewer.