Changeset 6985


Ignore:
Timestamp:
May 6, 2009, 4:06:54 PM (11 years ago)
Author:
myall
Message:

making rasters

Location:
anuga_work/production/australia_ph2
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/australia_ph2/adelaide/Arc_asc2raster_GDA94z50.py

    r6883 r6985  
    2525output_dir="anuga\\outputs\\"
    2626
    27 time_dir1 = '20090414_104456_run_final_0_27346_1936_Tb__kvanputt'
    28 time_dir2 = '20090416_012314_run_final_0_58334_1936_Tb__kvanputt'
    29 time_dir3 = '20090417_082435_run_final_0_64322_1936_Tb__kvanputt'
     27##time_dir1 = '20090414_104456_run_final_0_27346_1936_Tb__kvanputt'
     28##time_dir2 = '20090416_012314_run_final_0_58334_1936_Tb__kvanputt'
     29##time_dir3 = '20090417_082435_run_final_0_64322_1936_Tb__kvanputt'
    3030
    31 time_dirs = [time_dir1, time_dir2, time_dir3]
     31time_dir1 = '20090421_153519_run_final_0_64322_1936_Tb_internal_mhingee'
     32
     33time_dirs = [time_dir1]#, time_dir2, time_dir3]
    3234
    3335for time_dir in time_dirs:
     
    3840##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
    3941
    40     print 'Process: Create File GDB'
    41     gp.CreateFileGDB_management(folder, "raster")
     42##    print 'Process: Create File GDB'
     43##    gp.CreateFileGDB_management(folder, "raster")
    4244
    4345    gp.Workspace = raster_gbd
  • anuga_work/production/australia_ph2/carnarvon/export_results_max.py

    r6940 r6985  
    2222directory = project.output_folder
    2323
    24 time_dir1 = '20090429_170742_run_trial_0_27285_84_Tb__kvanputt'
    25 #time_dir2 = '20090324_161452_run_final_0_27285_109_Tb_mhingee'
    26 ##time_dir3 = ''
    27 ##time_dir4 = ''
     24time_dir1 = '20090504_114635_run_final_0_68754_84_Tb__mhingee'
     25time_dir2 = '20090504_114715_run_final_0_70881_84_Tb__mhingee'
     26time_dir3 = '20090505_100250_run_final_0_27285_84_Tb__mhingee'
     27time_dir4 = '20090505_173023_run_final_0_27285_84_Tb_internal_mhingee'
    2828##time_dir5 = ''
    2929##time_dir6 = ''
    3030##
    31 time_dirs = [time_dir1] #, time_dir2] # , time_dir4, time_dir5, time_dir6]
     31time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4]
    3232 
    3333
     
    3535##cellsize = 5
    3636
    37 ##timestep = None    # None means no timestep!
    38 timestep = 0
     37timestep = None    # None means no timestep!
     38##timestep = 0
    3939
    4040######
     
    5656
    5757# one or more key strings from var_equations above
    58 var = ['elevation']
     58var = ['stage']
    5959
    6060######
     
    8686
    8787            name1 = join(directory, time_dir, project.scenario_name)
    88 ##            name2 = join(directory, time_dir, project.scenario_name)+'_time_8760_0'
    89 ##            name3 = join(directory, time_dir, project.scenario_name)+'_time_17520_0'
    90 ##            name4 = join(directory, time_dir, project.scenario_name)+'_time_26280_0'
    91 ##            name5 = join(directory, time_dir, project.scenario_name)+'_time_35040_0'
    92 ##            name6 = join(directory, time_dir, project.scenario_name)+'_time_43800_0'
    93 ##            name7 = join(directory, time_dir, project.scenario_name)+'_time_52560_0'
    94 ##            name8 = join(directory, time_dir, project.scenario_name)+'_time_61320_0'
    95 ##            name9 = join(directory, time_dir, project.scenario_name)+'_time_70080_0'
    96 ##            name10 = join(directory, time_dir, project.scenario_name)+'_time_78840_0'
    97 ##           
    98             names = [name1] #, name2, name3, name4, name5, name6, name7, name8, name9, name10]
    99      
    100 ##            asc_name = []   
     88            name2 = join(directory, time_dir, project.scenario_name)+'_time_31980_0'
     89
     90            names = [name1, name2]
     91           
     92            asc_name = []   
    10193               
    10294            for name in names:
     
    119111                            format = 'asc')
    120112
    121 ##                asc_name.append(outname + '.asc')
    122 ##   
    123 ##            maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc'
    124 ##
    125 ##            print 'max asc outname ', maxasc_outname
    126 ##            print 'asc_name ', str(asc_name)
    127 ##           
    128 ##            MaxAsc(maxasc_outname, asc_name)
     113                asc_name.append(outname + '.asc')
     114   
     115            maxasc_outname = join(directory, time_dir, project.scenario_name)+'_'+which_area+'_'+which_var+'_max.asc'
     116
     117            print 'max asc outname ', maxasc_outname
     118            print 'asc_name ', str(asc_name)
     119           
     120            MaxAsc(maxasc_outname, asc_name)
  • anuga_work/production/australia_ph2/ceduna/Arc_asc2raster_GDA94z50.py

    r6842 r6985  
    2828time_dir2 = '20090409_095708_run_final_0_64448_1884_Tb__kvanputt'
    2929time_dir3 = '20090410_000802_run_final_0_58331_1884_Tb__kvanputt'
     30time_dir4 = '20090421_155143_run_final_0_27347_1884_Tb_internal_mhingee'
    3031
    31 events = [[time_dir1,0.314774],[time_dir2,0.27307],[time_dir3,0.315495]]
     32##time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4]
    3233
    33 for event in events:
    34 ##for time_dir in time_dirs:
    35     time_dir = event[0]
    36     max_wave = event[1]
    37     print time_dir
    38     print max_wave
     34time_dirs = [time_dir1]
     35
     36for time_dir in time_dirs:
    3937    # Local variables...
    4038    folder = scenario_dir + output_dir +  time_dir +'\\'
     
    4341##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
    4442
    45     print 'Process: Create File GDB'
    46     gp.CreateFileGDB_management(folder, "raster")
     43##    print 'Process: Create File GDB'
     44##    gp.CreateFileGDB_management(folder, "raster")
    4745
    4846    gp.Workspace = raster_gbd
     
    5755
    5856    generate_filename = []
    59     input_ascii = glob.glob(folder + '*max.asc')
     57    input_ascii = glob.glob(folder + '*elevation.asc')
    6058
    6159    for infile in input_ascii:
     
    8381##        print 'Process: Extract by Mask'
    8482##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
    85         # do this bit only if there are only stage asc files
    86         div_file = output_DEM.replace('stage','div_stage')
    87         if not div_file == output_DEM:
    88             print 'divide', output_DEM,' by', max_wave,' and call',div_file
    89             gp.Divide_sa(output_DEM,max_wave,div_file)
    9083
     84
  • anuga_work/production/australia_ph2/esperance/Arc_asc2raster_GDA94z50.py

    r6842 r6985  
    2828time_dir2 = '20090408_205317_run_final_0_58367_1699_Tb__mhingee'
    2929time_dir3 = '20090409_024308_run_final_0_64449_1699_Tb__mhingee'
     30time_dir4 = '20090421_164728_run_final_0_64449_1699_Tb_internal_mhingee'
    3031
    31 events = [[time_dir1,0.352214],[time_dir2,0.356316],[time_dir3,0.357256]]
     32##time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4]
    3233
    33 for event in events:
    34 ##for time_dir in time_dirs:
    35     time_dir = event[0]
    36     max_wave = event[1]
    37     print time_dir
    38     print max_wave
     34time_dirs = [time_dir3] #time_dir1,
     35
     36
     37for time_dir in time_dirs:
    3938    # Local variables...
    4039    folder = scenario_dir + output_dir +  time_dir +'\\'
     
    4342##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
    4443
    45     print 'Process: Create File GDB'
    46     gp.CreateFileGDB_management(folder, "raster")
     44##    print 'Process: Create File GDB'
     45##    gp.CreateFileGDB_management(folder, "raster")
    4746
    4847    gp.Workspace = raster_gbd
     
    5756
    5857    generate_filename = []
    59     input_ascii = glob.glob(folder + '*stage.asc')
     58    input_ascii = glob.glob(folder + '*elevation.asc')
    6059
    6160    for infile in input_ascii:
     
    8382##        print 'Process: Extract by Mask'
    8483##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
    85         # do this bit only if there are only stage asc files
    86         div_file = output_DEM.replace('stage','div_stage')
    87         if not div_file == output_DEM:
    88             print 'divide', output_DEM,' by', max_wave,' and call',div_file
    89             gp.Divide_sa(output_DEM,max_wave,div_file)
    9084
     85
  • anuga_work/production/australia_ph2/eucla_motel/Arc_asc2raster_GDA94z50.py

    r6842 r6985  
    2828time_dir2 = '20090409_073114_run_final_0_64449_1837_Tb__mhingee'
    2929time_dir3 = '20090409_222301_run_final_0_68755_1837_Tb__mhingee'
     30time_dir4 = '20090421_164640_run_final_0_64449_1837_Tb_internal_mhingee'
    3031
    31 events = [[time_dir1,0.265183],[time_dir2,0.27574],[time_dir3,0.267985]]
     32##time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4]
    3233
    33 for event in events:
    34 ##for time_dir in time_dirs:
    35     time_dir = event[0]
    36     max_wave = event[1]
    37     print time_dir
    38     print max_wave
     34time_dirs = [time_dir2]
     35
     36for time_dir in time_dirs:
    3937    # Local variables...
    4038    folder = scenario_dir + output_dir +  time_dir +'\\'
     
    4341##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
    4442
    45     print 'Process: Create File GDB'
    46     gp.CreateFileGDB_management(folder, "raster")
     43##    print 'Process: Create File GDB'
     44##    gp.CreateFileGDB_management(folder, "raster")
    4745
    4846    gp.Workspace = raster_gbd
     
    5755
    5856    generate_filename = []
    59     input_ascii = glob.glob(folder + '*max.asc')
     57    input_ascii = glob.glob(folder + '*elevation.asc')
    6058
    6159    for infile in input_ascii:
     
    8381##        print 'Process: Extract by Mask'
    8482##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
    85         # do this bit only if there are only stage asc files
    86         div_file = output_DEM.replace('stage','div_stage')
    87         if not div_file == output_DEM:
    88             print 'divide', output_DEM,' by', max_wave,' and call',div_file
    89             gp.Divide_sa(output_DEM,max_wave,div_file)
    90 
     83   
  • anuga_work/production/australia_ph2/maningrida/Arc_asc2raster_GDA94z53.py

    r6969 r6985  
    3030time_dir4 = '20090422_115416_run_final_0_64970_1878_Tb_internal_mhingee'
    3131
     32##time_dirs = [time_dir2, time_dir3, time_dir4]
     33time_dirs = [time_dir4]
    3234
    33 events = [[time_dir1,0.430643],[time_dir2,0.462943],[time_dir3,0.418183],[time_dir4,0.418183]]
    34 
    35 for event in events:
    36 ##for time_dir in time_dirs:
    37     time_dir = event[0]
    38     max_wave = event[1]
     35for time_dir in time_dirs:
    3936    # Local variables...
    4037    folder = scenario_dir + output_dir + time_dir +'\\'
     
    4441
    4542   
    46     print 'Process: Create File GDB'
    47     gp.CreateFileGDB_management(folder, "raster")
     43##    print 'Process: Create File GDB'
     44##    gp.CreateFileGDB_management(folder, "raster")
    4845
    4946    gp.Workspace = raster_gbd
     
    5249   
    5350    #replication dictionary
    54     replicate = (('maningrida', ''),('_', ''),
    55                  ('depth','_depth'),('speed', '_speed'),
     51    replicate = (('maningrida', ''),('_', ''),('All',''),
     52                 ('depth','_depth'),('speed', '_speed'),('max','_M'),
    5653                 ('elevation', '_ele_'), ('stage','_stage'))
    5754
    5855    generate_filename = []
    59     input_ascii = glob.glob(folder + '*.asc')
     56    input_ascii = glob.glob(folder + '*elevation.asc')
    6057
    6158    for infile in input_ascii:
     
    7572
    7673        print 'Process: Define Projection'
    77         gp.DefineProjection_management(output_DEM, "PROJCS['GDA_1994_MGA_Zone_53',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
    78                                                    ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',135.0],PARAMETER['Scale_Factor',0.9996]"
     74        gp.DefineProjection_management(output_DEM, "PROJCS['CM_133',GEOGCS['GCS_GDA_1994',DATUM['D_GDA_1994',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
     75                                                   ",PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',10000000.0],PARAMETER['Central_Meridian',133.0],PARAMETER['Scale_Factor',0.9996]"
    7976                                                   ",PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]")
    8077##        output_extract = output_DEM + '_E'
     
    8279##        print 'Process: Extract by Mask'
    8380##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
    84         # do this bit only if there are only stage asc files
    85 div_file = output_DEM.replace('stage','div_stage')
    86 print 'divide', output_DEM,' by', max_wave,' and call',div_file
    87 gp.Divide_sa(output_DEM,max_wave,div_file)
    8881
    8982
    9083
     84
  • anuga_work/production/australia_ph2/melbourne_east/Arc_asc2raster_GDA94z50.py

    r6971 r6985  
    3030time_dir4 = '20090416_102418_run_final_0_58348_1979_Tb_west__kvanputt'
    3131time_dir5 = '20090421_151342_run_final_0_64288_1979_Tb_west__kvanputt'
    32 ##time_dir6 = '20090426_042056_run_final_0_68793_1979_Tb_west__kvanputt'
     32time_dir6 = '20090426_042056_run_final_0_68793_1979_Tb_west__kvanputt'
    3333
    3434time_dir7 = '20090421_152359_run_final_0_58115_2649_Tb_east_internal_mhingee'
    3535
    3636##time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir7]
    37 time_dirs = [time_dir1, time_dir7]
     37time_dirs = [time_dir6]
    3838   
    3939for time_dir in time_dirs:
     
    4444##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
    4545
    46 ##    print 'Process: Create File GDB'
    47 ##    gp.CreateFileGDB_management(folder, "raster")
     46    print 'Process: Create File GDB'
     47    gp.CreateFileGDB_management(folder, "raster")
    4848
    4949    gp.Workspace = raster_gbd
     
    5858
    5959    generate_filename = []
    60     input_ascii = glob.glob(folder + '*elevation.asc')
     60    input_ascii = glob.glob(folder + '*max.asc')
    6161
    6262    for infile in input_ascii:
  • anuga_work/production/australia_ph2/portland/Arc_asc2raster_GDA94z50.py

    r6842 r6985  
    2929time_dir3 = '20090409_001857_run_final_0_64322_1969_Tb__mhingee'
    3030
    31 events = [[time_dir1,0.430643],[time_dir2,0.462943],[time_dir3,0.418183]]
     31time_dir4 = '20090421_153138_run_final_0_64322_1969_Tb_internal_mhingee'
    3232
    33 for event in events:
    34 ##for time_dir in time_dirs:
    35     time_dir = event[0]
    36     max_wave = event[1]
    37     print time_dir
    38     print max_wave
     33time_dirs = [time_dir3]
     34
     35for time_dir in time_dirs:
    3936    # Local variables...
    4037    folder = scenario_dir + output_dir +  time_dir +'\\'
     
    4340##    ocean = scenario_dir + "map_work\\\port_hedland.gdb\\outlines\\initial_conditions_ocean"
    4441
    45     print 'Process: Create File GDB'
    46     gp.CreateFileGDB_management(folder, "raster")
     42##    print 'Process: Create File GDB'
     43##    gp.CreateFileGDB_management(folder, "raster")
    4744
    4845    gp.Workspace = raster_gbd
     
    5754
    5855    generate_filename = []
    59     input_ascii = glob.glob(folder + '*.asc')
     56    input_ascii = glob.glob(folder + '*elevation.asc')
    6057
    6158    for infile in input_ascii:
     
    8279##        print 'Process: Extract by Mask'
    8380##        gp.ExtractByMask_sa(output_DEM, land, output_extract)
    84         # do this bit only if there are only stage asc files
    85         div_file = output_DEM.replace('stage','div_stage')
    86         print 'divide', output_DEM,' by', max_wave,' and call',div_file
    87         gp.Divide_sa(output_DEM,max_wave,div_file)
    88 
  • anuga_work/production/australia_ph2/sydney/Arc_asc2raster_GDA94z56.py

    r6959 r6985  
    2929time_dir3 = '20090409_085101_run_final_0_58326_2938_Tb__kvanputt'
    3030
     31time_dir4 = '20090505_105902_run_final_0_31865_2938_Tb__mhingee'
     32time_dir5 = '20090505_110022_run_final_0_51418_2938_Tb__mhingee'
     33
    3134##time_dir1 = '20090421_150708_run_final_0_58152_2938_Tb_internal_mhingee'
    3235
    33 time_dirs = [time_dir1]#, time_dir2, time_dir3]
     36##time_dirs = [time_dir1]#, time_dir2, time_dir3]
     37
     38time_dirs = [time_dir4, time_dir5]
    3439
    3540for time_dir in time_dirs:
     
    4247    #ocean = scenario_dir + "map_work\\Perth.gdb\\Outlines\\initial_conditions_ocean1"
    4348   
    44 ##    print 'Process: Create File GDB'
    45 ##    gp.CreateFileGDB_management(folder, "raster")
     49    print 'Process: Create File GDB'
     50    gp.CreateFileGDB_management(folder, "raster")
    4651
    4752    gp.Workspace = raster_gbd
     
    5661
    5762    generate_filename = []
    58     input_ascii = glob.glob(folder + '*elevation.asc')
     63    input_ascii = glob.glob(folder + '*.asc')
    5964    print time_dir
    6065
  • anuga_work/production/australia_ph2/townsville/export_results_max.py

    r6939 r6985  
    2424time_dir1 = '20090414_104809_run_final_0_31965_2740_Tb__kvanputt'
    2525time_dir2 = '20090420_064036_run_final_0_51469_2740_Tb__kvanputt'
    26 time_dir3 = '20090421_141635_run_final_0_31965_2740_Tb_internal_lfountai'
    27 time_dir4 = ''
     26time_dir3 = '20090429_145415_run_final_0_62890_2740_Tb__mhingee'
     27time_dir4 = '20090421_141635_run_final_0_31965_2740_Tb_internal_lfountai'
    2828##time_dir5 = ''
    2929##time_dir6 = ''
     
    3535##cellsize = 5
    3636
    37 #timestep = None    # None means no timestep!
    38 timestep = 0
     37timestep = None    # None means no timestep!
     38##timestep = 0
    3939
    4040######
Note: See TracChangeset for help on using the changeset viewer.