Ignore:
Timestamp:
Nov 20, 2008, 1:46:04 PM (16 years ago)
Author:
kristy
Message:

Ready to run export_results_max.py, copied from perth.
Set for event 27283 at 0.6 for one sww

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/geraldton/export_results_max.py

    r5941 r5987  
    2020directory = project.output_dir
    2121
    22 time_dir1 = '20081102_104418_run_final_0_27283_alpha0.1_kvanputt'
    23 time_dir2 = '20081002_110950_run_final_0_27283_250m_all_kvanputt'
     22time_dir1 = '20081117_141443_run_final_0.6_27283_alpha0.1_kvanputt'
     23##time_dir2 = '20081114_155508_run_final_0.6_27283_alpha0.1_kvanputt' Perth
     24##time_dir3 = '20081114_155610_run_final_0.6_27255_alpha0.1_kvanputt'
     25##time_dir4 = '20081114_155642_run_final_0_27255_alpha0.1_kvanputt'
     26##time_dir5 = '20081114_155725_run_final_0_68693_alpha0.1_kvanputt'
     27##time_dir6 = '20081114_155802_run_final_0.6_68693_alpha0.1_kvanputt'
    2428
    25 time_dirs = [time_dir1, time_dir2]#, time_dir3]
     29time_dirs = [time_dir1] #, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]
    2630
    27 #cellsize = 20
    28 cellsize = 250
     31 
     32
     33cellsize = 20
     34#cellsize = 250
    2935
    3036timestep = None    # None means no timestep!
     
    3541######
    3642
    37 #area = ['Geordie', 'Sorrento', 'Fremantle', 'Rockingham']  # strings must match keys in var_equations below
    38 area = ['All']      # 'All' means no special areas - the whole thing
     43area = ['CBD']  # strings must match keys in var_equations below
     44#area = ['All']      # 'All' means no special areas - the whole thing
    3945
    4046######
     
    4955
    5056# one or more key strings from var_equations above
    51 var = ['stage', 'elevation']
     57var = ['depth', 'speed']
    5258
    5359######
    5460# Start running the various conversions we require.
    5561######
     62
    5663for which_var in var:
    5764    if which_var not in var_equations:
     
    5966        break
    6067
    61     asc_name = []
     68    for which_area in area:
     69        if which_area == 'All':
     70            easting_min = None
     71            easting_max = None
     72            northing_min = None
     73            northing_max = None
     74        else:
     75            try:
     76                easting_min = eval('project.xmin%s' % which_area)
     77                easting_max = eval('project.xmax%s' % which_area)
     78                northing_min = eval('project.ymin%s' % which_area)
     79                northing_max = eval('project.ymax%s' % which_area)
     80            except AttributeError:
     81                print 'Unrecognized area name: %s' % which_area
     82                break
    6283
    63     for time_dir in time_dirs:
    64         name1 = directory+time_dir+sep+project.scenario_name
    65         name2 = directory+time_dir+sep+project.scenario_name+'_time_41700_0'
    66         names = [name1, name2]       
    67        
    68         for name in names:
    69             for which_area in area:
    70                 if which_area == 'All':
    71                     easting_min = None
    72                     easting_max = None
    73                     northing_min = None
    74                     northing_max = None
    75                 else:
    76                     try:
    77                         easting_min = eval('project.xmin%s' % which_area)
    78                         easting_max = eval('project.xmax%s' % which_area)
    79                         northing_min = eval('project.ymin%s' % which_area)
    80                         northing_max = eval('project.ymax%s' % which_area)
    81                     except AttributeError:
    82                         print 'Unrecognized area name: %s' % which_area
    83                         break
    84                  
     84        for time_dir in time_dirs:
     85
     86            name1 = directory+time_dir+sep+project.scenario_name
     87##            name2 = directory+time_dir+sep+project.scenario_name+'_time_39900_0'
     88##            name3 = directory+time_dir+sep+project.scenario_name+'_time_79800_0'
     89
     90            names = [name1] #, name2, name3]
     91     
     92##            asc_name = []   
     93               
     94            for name in names:
     95                         
    8596                outname = name + '_' + which_area + '_' + which_var
    8697                quantityname = var_equations[which_var]
     
    99110                            verbose = True,
    100111                            format = 'asc')
    101 
    102                 asc_name.append(outname + '.asc')
    103    
    104         maxasc_outname = directory+time_dir+sep+project.scenario_name+'_'+which_area+'_'+which_var+'_max.asc'
    105 
    106         maxasc.MaxAsc(maxasc_outname, asc_name)
     112##
     113##                asc_name.append(outname + '.asc')
     114##   
     115##            maxasc_outname = directory+time_dir+sep+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(maxasc_outname, asc_name)
Note: See TracChangeset for help on using the changeset viewer.