Changeset 7355


Ignore:
Timestamp:
Aug 12, 2009, 2:56:52 PM (11 years ago)
Author:
kristy
Message:
 
Location:
anuga_work/production/hobart_2009
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/hobart_2009/Arc_Inundation_polygon.py

    r7268 r7355  
    3030output_folder = scenario_folder + "anuga\\outputs\\"
    3131
    32 ##time_dir1 = '20090601_133348_run_final_0.8_58280_None_kvanputt'
    33 ##time_dir2 = '20090601_133503_run_final_0.8_58292_None_kvanputt'
    34 ##time_dir3 = '20090505_150711_run_final_0_58280_None_kvanputt'
    35 ##time_dir4 = '20090505_150805_run_final_0.8_58280_None_kvanputt'
    36 ##time_dir5 = '20090505_151322_run_final_0.8_64477_None_kvanputt'
    37 ##time_dir6 = '20090505_151447_run_final_0_64477_None_kvanputt'
    38 ##
    39 ##time_dirs = [time_dir1, time_dir2] #, time_dir3, time_dir4, time_dir5, time_dir6]
     32time_dir1 = '20090714_162136_run_final_0_58260_None_kvanputt'
     33time_dir2 = '20090714_162041_run_final_0.8_58292_None_kvanputt'
     34time_dir3 = '20090714_161944_run_final_0.8_58280_None_kvanputt'
     35time_dir4 = '20090714_161740_run_final_0.8_58260_None_kvanputt'
    4036
    41 time_dir1 = '20090619_165107_run_final_0_58260_None_kvanputt'
    42 time_dir2 = '20090619_165136_run_final_0.8_58260_None_kvanputt'
    43 
    44 time_dirs = [time_dir1, time_dir2]
     37time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4]
    4538
    4639for time_dir in time_dirs:
  • anuga_work/production/hobart_2009/Arc_txt2feature_class_runup.py

    r7268 r7355  
    2020output_folder = "anuga\\outputs\\"
    2121
    22 time_dir1 = '20090601_133348_run_final_0.8_58280_None_kvanputt'
    23 time_dir2 = '20090601_133503_run_final_0.8_58292_None_kvanputt'
    24 time_dir3 = '20090505_150711_run_final_0_58280_None_kvanputt'
    25 time_dir4 = '20090505_150805_run_final_0.8_58280_None_kvanputt'
    26 time_dir5 = '20090505_151322_run_final_0.8_64477_None_kvanputt'
    27 time_dir6 = '20090505_151447_run_final_0_64477_None_kvanputt'
     22time_dir1 = '20090714_162136_run_final_0_58260_None_kvanputt'
     23time_dir2 = '20090714_162041_run_final_0.8_58292_None_kvanputt'
     24time_dir3 = '20090714_161944_run_final_0.8_58280_None_kvanputt'
     25time_dir4 = '20090714_161740_run_final_0.8_58260_None_kvanputt'
    2826
    29 time_dirs = [time_dir1, time_dir2] #, time_dir3, time_dir4, time_dir5, time_dir6]
     27time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4]
    3028
    3129for time_dir in time_dirs:
     
    3331    # Local variables...
    3432    folder =  scenario_folder + output_folder + time_dir + '\\'
    35     runup = model + '_runup'
    36     input_dir_name = folder+ runup +'.csv'
     33    runup = model + '_runup.csv'
     34    input_dir_name = folder+ runup
    3735    raster = folder + "raster.gdb"
    3836    layer = 'layer'
    3937
    40     print 'Process: Create File GDB'
    41     gp.CreateFileGDB_management(folder, "raster")
     38##    print 'Process: Create File GDB'
     39##    gp.CreateFileGDB_management(folder, "raster")
    4240
    4341    print 'Process: Make XY Event Layer'
     
    5048
    5149    print 'Process: Feature Class to Feature Class'
    52     gp.FeatureClassToFeatureClass_conversion(layer, raster, runup, "", "area area true true false 255 Text 0 0 ,First,#,carnarvon_runup.csv_Features,area,-1,-1;q q true true false 8 Double 0 0 ,First,#,carnarvon_runup.csv_Features,q,-1,-1;x x true true false 8 Double 0 0 ,First,#,carnarvon_runup.csv_Features,x,-1,-1;y y true true false 8 Double 0 0 ,First,#,carnarvon_runup.csv_Features,y,-1,-1", "")
     50    gp.FeatureClassToFeatureClass_conversion(layer, raster, runup[:-4], "", "area area true true false 255 Text 0 0 ,First,#," +str(runup)+"_Features,area,-1,-1;q q true true false 8 Double 0 0 ,First,#,"
     51                                             +str(runup)+"_Features,q,-1,-1;x x true true false 8 Double 0 0 ,First,#," +str(runup)+"_Features,x,-1,-1;y y true true false 8 Double 0 0 ,First,#,"
     52                                             +str(runup)+"_Features,y,-1,-1", "")
    5353
    5454
  • anuga_work/production/hobart_2009/combine_gauges.py

    r7127 r7355  
    1212directory = project.output_folder
    1313
    14 time_dir1 = '20090505_150430_run_final_0.8_58292_None_kvanputt'
    15 time_dir2 = '20090505_150517_run_final_0_58292_None_kvanputt'
    16 time_dir3 = '20090505_150711_run_final_0_58280_None_kvanputt'
    17 time_dir4 = '20090505_150805_run_final_0.8_58280_None_kvanputt'
    18 time_dir5 = '20090505_151322_run_final_0.8_64477_None_kvanputt'
    19 time_dir6 = '20090505_151447_run_final_0_64477_None_kvanputt'
     14time_dir1 = 'Event1_MSL'
     15time_dir2 = 'Event2_MSL'
     16time_dir3 = '20090714_161944_run_final_0.8_58280_None_kvanputt'
     17time_dir4 = '20090714_161740_run_final_0.8_58260_None_kvanputt'
     18time_dir5 = '20090619_165107_run_final_0_58260_None_kvanputt'
     19time_dir6 = '20090619_165136_run_final_0.8_58260_None_kvanputt'
    2020
    21 time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]
     21time_dirs = [time_dir1, time_dir2] #, time_dir3, time_dir4] 
    2222
    2323data = 'stage'
  • anuga_work/production/hobart_2009/export_results_max.py

    r7268 r7355  
    2121
    2222directory = project.output_folder
    23 time_dir1 = '20090619_165107_run_final_0_58260_None_kvanputt'
    24 time_dir2 = '20090619_165136_run_final_0.8_58260_None_kvanputt'
     23time_dir1 = '20090714_162136_run_final_0_58260_None_kvanputt'
     24time_dir2 = '20090714_162041_run_final_0.8_58292_None_kvanputt'
     25time_dir3 = '20090714_161944_run_final_0.8_58280_None_kvanputt'
     26time_dir4 = '20090714_161740_run_final_0.8_58260_None_kvanputt'
    2527
    26 time_dirs = [time_dir1, time_dir2] #, time_dir2] #, time_dir3, time_dir4, time_dir5, time_dir6]
    27  
     28time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4] 
    2829
    29 #cellsize = 250
    30 cellsize = 20
     30# sww filename extensions ie. hobart_time_17640_0.sww, input into list 17640
     31# make sure numbers are in sequential order
     32times = [16980, 33960, 50940]
     33           
     34#Modify the cellsize value to set the size of the raster you require
     35#Take into account mesh size when aplying this paramater
     36cellsize = 20 #250
    3137
    32 timestep = None    # None means no timestep!
    33 #timestep = 0
     38#Now set the timestep at which you want the raster generated.
     39#Either set the actual timestep required or use 'None' to indicate that
     40#you want the maximum values in the raster over all timesteps
     41timestep = None   #0
    3442
    35 ######
    3643# Set the special areas of interest.  If none, do: area=['All']
    37 ######
     44# Areas identified below are specified by cooridinates in project.py 
    3845
    39 area = ['Hobart', 'NW', 'South'] 
    40 #area = ['All']      # 'All' means no special areas - the whole thing
     46area = ['South', 'NW', 'Hobart']
     47#area = ['All']     
     48
     49# one or more key strings from var_equations below
     50var = ['depth']
    4151
    4252######
     
    5060                 'elevation': 'elevation' }
    5161
    52 # one or more key strings from var_equations above
    53 var = ['depth', 'speed']
    5462
    5563######
    56 # Start running the various conversions we require.
     64# Start script, running through variables, area, folder, sww file (determine by times)
     65# Then creates a maximum asci if there is more than one sww file
    5766######
    5867
     
    7988
    8089        for time_dir in time_dirs:
    81             name1 = join(directory, time_dir, project.scenario_name)
    82             name2 = join(directory, time_dir, project.scenario_name)+'_time_17640_0'
    83 ##            name3 = join(directory, time_dir, project.scenario_name)+'_time_33960_0'
    84 ##            name4 = join(directory, time_dir, project.scenario_name)+'_time_50940_0'
     90            names = [join(directory, time_dir, project.scenario_name)]
     91            for time in times:
     92                names.append(join(directory, time_dir, project.scenario_name)+ '_time_' + str(time) + '_0')
    8593           
    86             names = [name1, name2] #, name3, name4]
    87      
    8894            asc_name = []   
    89                
     95            print 'start sww2dem: time_dir = %s' % time_dir               
    9096            for name in names:
    91                          
     97
    9298                outname = name + '_' + which_area + '_' + which_var
    9399                quantityname = var_equations[which_var]
    94100
    95                 print 'start sww2dem: time_dir=%s' % time_dir
     101                print 'start sww2dem: name = %s' % os.path.basename(name)
    96102               
    97103                sww2dem(name, basename_out = outname,
     
    108114
    109115                asc_name.append(outname + '.asc')
    110    
    111             maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc'
    112 
    113             print 'max asc outname ', maxasc_outname
    114             print 'asc_name ', str(asc_name)
    115            
    116             MaxAsc(maxasc_outname, asc_name)
     116            #print 'list = %s' % asc_name
     117            #print 'max asc outname ', maxasc_outname
     118            #print 'name=%s' % name
     119            print 'which area=%s' % which_area
     120            print 'which var=%s' % which_var
     121            #print 'asc_name ', str(asc_name)
     122            if times == []:     
     123                print 'Only one sww file, no Max file required'
     124            else:
     125                print 'Multiple sww files'
     126                maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc'
     127                print 'maxasc_outname = ', maxasc_outname
     128                MaxAsc(maxasc_outname, asc_name)
  • anuga_work/production/hobart_2009/project.py

    r7268 r7355  
    3232# Model specific parameters.
    3333# One or all can be changed each time the run_model script is executed
    34 tide = 0.8                # difference between MSL and HAT in metres
     34tide = 0                # difference between MSL and HAT in metres
    3535zone = 55               # specify UTM zone of model
    3636event_number = 58260    # 58280, 64477 the event number or the mux file name
  • anuga_work/production/hobart_2009/run_model.py

    r6984 r7355  
    137137Br = Reflective_boundary(domain)
    138138Bt = Transmissive_stage_zero_momentum_boundary(domain)
    139 Bd = Dirichlet_boundary([project.tide, 0, 0])
    140139Bf = Field_boundary(project.event_sts+'.sts',
    141140                    domain, mean_stage=project.tide,
    142141                    time_thinning=1,
    143                     default_boundary=Bd,
     142                    default_boundary=Dirichlet_boundary([0, 0, 0]),
    144143                    boundary_polygon=bounding_polygon_sts,                   
    145144                    use_cache=True,
Note: See TracChangeset for help on using the changeset viewer.