Ignore:
Timestamp:
Mar 5, 2009, 10:20:00 AM (15 years ago)
Author:
kristy
Message:

Changed all files for new wave input

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/australia_ph2/gold_coast/run_model.py

    r6393 r6460  
    3535from anuga.interface import Reflective_boundary
    3636from anuga.interface import Field_boundary
     37from anuga.interface import Time_boundary
     38from anuga.interface import file_function
     39
    3740from anuga.interface import create_sts_boundary
    3841from anuga.interface import csv2building_polygons
     
    4750from setup_model import project
    4851import build_urs_boundary as bub
     52import prepare_timeboundary as TB
    4953
    5054#-------------------------------------------------------------------------------
     
    135139print 'Set boundary - available tags:', domain.get_boundary_tags()
    136140
     141# Prepare time boundary
     142TB.prepare_timeboundary(project.boundary_csv)
     143f = file_function(project.boundary_csv[:-4] + '.tms')
     144
    137145Br = Reflective_boundary(domain)
    138146Bt = Transmissive_stage_zero_momentum_boundary(domain)
    139147Bd = Dirichlet_boundary([project.tide, 0, 0])
    140 Bf = Field_boundary(project.event_sts+'.sts',
    141                     domain, mean_stage=project.tide,
    142                     time_thinning=1,
    143                     default_boundary=Bd,
    144                     boundary_polygon=bounding_polygon_sts,                   
    145                     use_cache=True,
    146                     verbose=True)
    147148
    148 domain.set_boundary({'back': Br,
     149if project.wave == 'Bf':
     150    Bf = Field_boundary(project.event_sts+'.sts',
     151                        domain, mean_stage=project.tide,
     152                        time_thinning=1,
     153                        default_boundary=Bd,
     154                        boundary_polygon=bounding_polygon_sts,                   
     155                        use_cache=True,
     156                        verbose=True)
     157    domain.set_boundary({'back': Br,
    149158                     'side': Bd,
    150159                     'ocean': Bf})
     160   
     161elif project.wave == 'Tb':
     162    Tb = Time_boundary(domain,f,default_boundary=Bd )
     163
     164    domain.set_boundary({'back': Br,
     165                         'side': Bd,
     166                         'ocean': Tb})
     167else:
     168    print 'No wave specified in project script (Bf or Tb)'
     169   
    151170
    152171#-------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.