Changeset 6288


Ignore:
Timestamp:
Feb 6, 2009, 9:04:49 AM (16 years ago)
Author:
jgriffin
Message:

new format scripts added, old ones deleted

Location:
anuga_work/production/australia_ph2/sydney
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/australia_ph2/sydney/Arc_asc2raster_GDA94z56.py

    r6241 r6288  
    3131##time_dir1 = '20081031_133353_run_final_0.6_68693_alpha0.1_kvanputt'
    3232##time_dir2 = '20081031_133511_run_final_0_68693_alpha0.1_kvanputt'
    33 time_dir3 = '20090123_155045_run_final_0_7875_250m_large_jgriffin'
    34 time_dir4 = '20090123_154945_run_final_0_7875_250m_small_jgriffin'
     33time_dir3 = '20090130_160955_run_final_0_7875_250m_vlarge_jgriffin'
     34#time_dir4 = '20090123_154945_run_final_0_7875_250m_small_jgriffin'
    3535##time_dir5 = '20081031_133841_run_final_0_27283_alpha0.1_kvanputt'
    3636##time_dir6 = '20081031_133925_run_final_0.6_27283_alpha0.1_kvanputt'
    3737
    3838
    39 time_dirs = [time_dir3, time_dir4] #, time_dir3, time_dir4, time_dir5, time_dir6]
     39time_dirs = [time_dir3]#, time_dir4] #, time_dir3, time_dir4, time_dir5, time_dir6]
    4040
    4141for time_dir in time_dirs:
     
    6262
    6363    generate_filename = []
    64     input_ascii = glob.glob(folder + 'sydney_All_stage.asc')
     64    input_ascii = glob.glob(folder + '*stage_max.asc')
    6565    print time_dir
    6666
  • anuga_work/production/australia_ph2/sydney/build_boundary_7875.py

    r6176 r6288  
    6464
    6565    scenario_name=project_250m.scenario_name
    66     order_filename=os.path.join(project_250m.order_filename_dir)
     66    order_filename=os.path.join(project_250m.urs_boundary_name)
    6767
    6868    print 'reading', order_filename
  • anuga_work/production/australia_ph2/sydney/build_model.py

    r6286 r6288  
    8989
    9090print 'Export combined DEM file'
    91 G_clip.export_points_file(project.combined_dir_name + '.pts')
     91G_clip.export_points_file(project.combined_elevation + '.pts')
    9292print 'Do txt version too'
    9393# Use for comparision in ARC
    94 G_clip.export_points_file(project.combined_dir_name + '.txt')
     94G_clip.export_points_file(project.combined_elevation + '.txt')
    9595
  • anuga_work/production/australia_ph2/sydney/export_results_max.py

    r6176 r6288  
    2020directory = project_250m.output_dir
    2121
    22 time_dir1 = '20081125_135917_run_final_0_27283_250m_none_lfountai'
    23 
    24 time_dirs = [time_dir1]#, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]
     22time_dir1 = '20090123_155045_run_final_0_7875_250m_large_jgriffin'
     23#time_dir2 = '20090123_155045_run_final_0_7875_250m_large_jgriffin'
     24#time_dir3 = '20090123_154945_run_final_0_7875_250m_small_jgriffin'
     25time_dirs = [time_dir1]#,time_dir2,time_dir3]#, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]
    2526
    2627#cellsize = 20
     
    4849
    4950# one or more key strings from var_equations above
    50 var = ['stage', 'speed']
     51#var = ['stage', 'speed','depth']
     52var = ['elevation']
    5153
    5254######
     
    7880
    7981            name1 = directory+time_dir+sep+project_250m.scenario_name
    80             name2 = directory+time_dir+sep+project_250m.scenario_name+'_time_59580_0'
     82            #name2 = directory+time_dir+sep+project_250m.scenario_name+'_time_52620_0'
    8183           # name3 = directory+time_dir+sep+project_250m.scenario_name+'_time_78360_0'
    8284
    83             names = [name1, name2] #, name3]
     85            names = [name1]#, name2] #, name3]
    8486     
    8587            asc_name = []   
  • anuga_work/production/australia_ph2/sydney/run_sydney_250m.py

    r6176 r6288  
    2626from os import mkdir, access, F_OK
    2727from shutil import copy
     28from math import pi, sin, exp
    2829import time
    2930import sys
     
    3132# Related major packages
    3233from anuga.shallow_water import Domain
     34from anuga.shallow_water.shallow_water_domain import Transmissive_stage_zero_momentum_boundary
    3335from anuga.shallow_water import Dirichlet_boundary
    3436from anuga.shallow_water import File_boundary
    3537from anuga.shallow_water import Reflective_boundary
    3638from anuga.shallow_water import Field_boundary
     39from anuga.shallow_water import Time_boundary
    3740from Numeric import allclose
    3841from anuga.shallow_water.data_manager import export_grid, create_sts_boundary
     
    7679    # Domain definitions
    7780    #-----------------------------------------------------------------------
    78 
    79     # Read in boundary from ordered sts file
    80     urs_bounding_polygon=create_sts_boundary(os.path.join(project_250m.boundaries_dir_event,project_250m.scenario_name))
    81 
    82     # Reading the landward defined points, this incorporates the original clipping
    83     # polygon minus the 100m contour
    84     landward_bounding_polygon = read_polygon(project_250m.landward_dir)
    85 
    86     # Combine sts polyline with landward points
    87     bounding_polygon = urs_bounding_polygon + landward_bounding_polygon
    88    
    89     # counting segments
    90     N = len(urs_bounding_polygon)-1
    91 
    92     # boundary tags refer to project_250m.landward 4 points equals 5 segments start at N
    93     boundary_tags={'back': [N+1,N+2,N+3,N+4,N+5,N+6,N+7,N+8,N+9,N+10,N+11,N+12,N+13,N+14,N+15,N+16,N+17], 'side': [N,N+18], 'ocean': range(N)}
    94 
     81##
     82##    # Read in boundary from ordered sts file
     83##    urs_bounding_polygon=create_sts_boundary(os.path.join(project_250m.boundaries_dir_event,project_250m.scenario_name))
     84##
     85##    # Reading the landward defined points, this incorporates the original clipping
     86##    # polygon minus the 100m contour
     87##    landward_bounding_polygon = read_polygon(project_250m.landward_dir)
     88##
     89##    # Combine sts polyline with landward points
     90##    bounding_polygon = urs_bounding_polygon + landward_bounding_polygon
     91##   
     92##    # counting segments
     93##    N = len(urs_bounding_polygon)-1
     94##    print 'N'+str(N)
     95##    # boundary tags refer to project_250m.landward 4 points equals 5 segments start at N
     96##    boundary_tags={'back': [N+1,N+2,N+3,N+4,N+5,N+6,N+7,N+8,N+9,N+10,N+11,N+12,N+13,N+14,N+15,N+16,N+17,N+18,N+19], 'side': [N,N+20], 'ocean': range(N)}
     97    if project_250m.area =='large':
     98        land = [2,3,4,]
     99        sea = [0]
     100        side1 = [1]
     101        side2 = [5]
     102        bounding_polygon = project_250m.poly_all
     103        boundary_tags={'back': land, 'ocean': sea, 'side1':side1,'side2':side2}
     104    elif project_250m.area =='small':
     105        land = [2,3,4,]
     106        sea = [0]
     107        side1 = [1]
     108        side2 = [5]
     109        bounding_polygon = project_250m.poly_all
     110        boundary_tags={'back': land, 'ocean': sea, 'side1':side1,'side2':side2}
     111    elif project_250m.area =='medium':
     112        land = [2,3,4]
     113        sea = [0]
     114        side1 = [1]
     115        side2 = [5]
     116        bounding_polygon = project_250m.poly_all
     117        boundary_tags={'back': land, 'ocean': sea, 'side1':side1,'side2':side2}
     118    elif project_250m.area =='vlarge':
     119        land = [9,10,11,12,13,14]
     120        sea = [0,1,2,3,4,5,6,7]
     121        side1 = [8]
     122        side2 = [15]
     123        bounding_polygon = project_250m.poly_all
     124        boundary_tags={'back': land, 'ocean': sea, 'side1':side1,'side2':side2}
     125    else:
     126        print 'area not defined therefore bondary_tags not defined'
    95127    #--------------------------------------------------------------------------
    96128    # Create the triangular mesh based on overall clipping polygon with a tagged
     
    109141                         interior_regions=project_250m.interior_regions,
    110142                         filename=project_250m.meshes_dir_name,
    111                          use_cache=True,
     143                         use_cache=False,
    112144                         verbose=True)
    113145   
     
    177209    Br = Reflective_boundary(domain)
    178210    Bd = Dirichlet_boundary([kwargs['tide'],0,0])
    179     Btr = Transmissive_stage_zero_momentum_boundary(domain)
    180    
    181     print 'Available boundary tags', domain.get_boundary_tags()
    182     Bf = Field_boundary(boundary_urs_out+'.sts',  # Change from file_boundary
    183                    domain, mean_stage= project_250m.tide,
    184                    time_thinning=1,
    185                    default_boundary=Bd,
    186                    use_cache=True,
    187                    verbose = True,
    188                    boundary_polygon=bounding_polygon)
     211    Bt = Transmissive_stage_zero_momentum_boundary(domain)
     212    Rb = Time_boundary (domain, f=lambda t: [(sin(t*pi/600) * exp(-(t/3600)**2)), 0.0, 0.0])
     213##    print 'Available boundary tags', domain.get_boundary_tags()
     214##    Bf = Field_boundary(boundary_urs_out+'.sts',  # Change from file_boundary
     215##                   domain, mean_stage= project_250m.tide,
     216##                   time_thinning=1,
     217##                   default_boundary=Bd,
     218##                   use_cache=False,
     219##                   verbose = True,
     220##                   boundary_polygon=bounding_polygon)
    189221
    190222    domain.set_boundary({'back': Br,
    191                          'side': Btr,
    192                          'ocean': Bf})
     223                         'side1': Bt,
     224                         'side2':Bt,
     225                         'ocean':Rb})
    193226
    194227    kwargs['input_start_time']=domain.starttime
Note: See TracChangeset for help on using the changeset viewer.