Changeset 5952


Ignore:
Timestamp:
Nov 12, 2008, 3:35:44 PM (16 years ago)
Author:
kristy
Message:

Running smoothly, for all var and area

File:
1 edited

Legend:

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

    r5926 r5952  
    2020directory = project.output_dir
    2121
    22 time_dir1 = '20081031_133841_run_final_0_27283_alpha0.1_kvanputt'
     22#time_dir1 = '20081031_133841_run_final_0_27283_alpha0.1_kvanputt'
    2323#time_dir1 = '20080924_123626_run_final_0_27283_250m_all_kvanputt' # This uses the 250m bathymetry with all interior polygons
    2424#time_dir2 = '20080912_154716_run_final_0_27283_alpha0.1_kvanputt' # This uses original bathyemetry data
    2525#time_dir3 = '20080924_123601_run_final_0_27283_250m_none_kvanputt' # This uses the 250m bathymetry without any interior polygons
    26 time_dirs = [time_dir1] #, time_dir2]#, time_dir3]
     26#time_dirs = [time_dir1] #, time_dir2]#, time_dir3]
    2727
    28 #cellsize = 20
    29 cellsize = 250
     28time_dir1 = '20081031_133353_run_final_0.6_68693_alpha0.1_kvanputt'
     29time_dir2 = '20081031_133511_run_final_0_68693_alpha0.1_kvanputt'
     30time_dir3 = '20081031_133624_run_final_0_27255_alpha0.1_kvanputt'
     31time_dir4 = '20081031_133735_run_final_0.6_27255_alpha0.1_kvanputt'
     32time_dir5 = '20081031_133841_run_final_0_27283_alpha0.1_kvanputt'
     33time_dir6 = '20081031_133925_run_final_0.6_27283_alpha0.1_kvanputt'
     34
     35time_dirs = [time_dir1, time_dir2, time_dir3, time_dir4, time_dir5, time_dir6]
     36
     37 
     38
     39cellsize = 20
     40#cellsize = 250
    3041
    3142timestep = None    # None means no timestep!
     
    3647######
    3748
    38 #area = ['Geordie', 'Sorrento', 'Fremantle', 'Rockingham']  # strings must match keys in var_equations below
    39 area = ['All']      # 'All' means no special areas - the whole thing
     49area = ['Rockingham', 'Sorrento', 'Fremantle','Geordie' ]  # strings must match keys in var_equations below
     50#area = ['All']      # 'All' means no special areas - the whole thing
    4051
    4152######
     
    5061
    5162# one or more key strings from var_equations above
    52 var = ['stage', 'elevation']
     63var = ['depth', 'speed']
    5364
    5465######
    5566# Start running the various conversions we require.
    5667######
     68
    5769for which_var in var:
    5870    if which_var not in var_equations:
     
    6072        break
    6173
    62     asc_name = []
     74    for which_area in area:
     75        if which_area == 'All':
     76            easting_min = None
     77            easting_max = None
     78            northing_min = None
     79            northing_max = None
     80        else:
     81            try:
     82                easting_min = eval('project.xmin%s' % which_area)
     83                easting_max = eval('project.xmax%s' % which_area)
     84                northing_min = eval('project.ymin%s' % which_area)
     85                northing_max = eval('project.ymax%s' % which_area)
     86            except AttributeError:
     87                print 'Unrecognized area name: %s' % which_area
     88                break
    6389
    64     for time_dir in time_dirs:
    65         name1 = directory+time_dir+sep+project.scenario_name
    66         name2 = directory+time_dir+sep+project.scenario_name+'_time_39900_0'
    67         name3 = directory+time_dir+sep+project.scenario_name+'_time_79800_0'
    68         names = [name1, name2, name3]
    69        
    70         for name in names:
    71             for which_area in area:
    72                 if which_area == 'All':
    73                     easting_min = None
    74                     easting_max = None
    75                     northing_min = None
    76                     northing_max = None
    77                 else:
    78                     try:
    79                         easting_min = eval('project.xmin%s' % which_area)
    80                         easting_max = eval('project.xmax%s' % which_area)
    81                         northing_min = eval('project.ymin%s' % which_area)
    82                         northing_max = eval('project.ymax%s' % which_area)
    83                     except AttributeError:
    84                         print 'Unrecognized area name: %s' % which_area
    85                         break
    86                  
     90        for time_dir in time_dirs:
     91
     92            name1 = directory+time_dir+sep+project.scenario_name
     93            name2 = directory+time_dir+sep+project.scenario_name+'_time_39900_0'
     94            name3 = directory+time_dir+sep+project.scenario_name+'_time_79800_0'
     95
     96            names = [name1, name2, name3]
     97     
     98            asc_name = []   
     99               
     100            for name in names:
     101                         
    87102                outname = name + '_' + which_area + '_' + which_var
    88103                quantityname = var_equations[which_var]
     
    104119                asc_name.append(outname + '.asc')
    105120   
    106         maxasc_outname = directory+time_dir+sep+project.scenario_name+'_'+which_area+'_'+which_var+'_max.asc'
     121            maxasc_outname = directory+time_dir+sep+project.scenario_name+'_'+which_area+'_'+which_var+'_max.asc'
    107122
    108         maxasc.MaxAsc(maxasc_outname, asc_name)
     123            print 'max asc outname ', maxasc_outname
     124            print 'asc_name ', str(asc_name)
     125           
     126            maxasc.MaxAsc(maxasc_outname, asc_name)
Note: See TracChangeset for help on using the changeset viewer.