Changeset 5707


Ignore:
Timestamp:
Aug 28, 2008, 2:08:28 PM (14 years ago)
Author:
kristy
Message:

one or many sww files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/boxingday08/export_results_GA.py

    r5704 r5707  
    66
    77home = getenv('INUNDATIONHOME') + sep +'data'+sep #Sandpit's parent dir
    8 output_dir = home + 'anuga_validation/boxing_day_sceanario/anuga/outputs/20080813/good_polyline20080813_'
     8name = home + 'anuga_validation/boxing_day_sceanario/anuga/outputs/20080825/good_polyline20080825_130706_0.8'
    99
    10 name1= output_dir +'101348_0.45'
    11 name2= output_dir +'101521_0.55'
    12 name3= output_dir +'101610_0.35'
    13 name4= output_dir +'101741_0.25'
    14 name5= output_dir +'101819_0.15'
    1510
    16 names= [name1, name2, name3, name4, name5]
     11##output_dir = home + 'anuga_validation/boxing_day_sceanario/anuga/outputs/20080813/good_polyline20080813_'
     12##
     13##name1= output_dir +'101348_0.45'
     14##name2= output_dir +'101521_0.55'
     15##name3= output_dir +'101610_0.35'
     16##name4= output_dir +'101741_0.25'
     17##name5= output_dir +'101819_0.15'
     18##
     19##names= [name1, name2, name3, name4, name5]
     20##
     21##for the_name in names:
     22##
     23##    name = the_name[-11:]
     24##    print 'sww filename', name
    1725
    18 for the_name in names:
    1926
    20     name = the_name[-11:]
    21     print 'sww filename', name
     27bay_west = 417348.0
     28bay_east = 425656.0
     29bay_south = 870565.0
     30bay_north = 877008.0
    2231
    23     bay_west = 417348.0
    24     bay_east = 425656.0
    25     bay_south = 870565.0
    26     bay_north = 877008.0
     32which_var = 2
    2733
    28     which_var = 2
     34if which_var == 0:  # Stage
     35    outname = name + '_stage-eq-thurs-test'
     36    quantityname = 'stage'
    2937
    30     if which_var == 0:  # Stage
    31         outname = name + '_stage-eq-thurs-test'
    32         quantityname = 'stage'
     38if which_var == 1:  # Absolute Momentum
     39    outname = name + '_momentum_i1'
     40    quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 
    3341
    34     if which_var == 1:  # Absolute Momentum
    35         outname = name + '_momentum_i1'
    36         quantityname = '(xmomentum**2 + ymomentum**2)**0.5
     42if which_var == 2:  # Depth
     43    outname = name + '_depth'
     44    quantityname = 'stage-elevation
    3745
    38     if which_var == 2:  # Depth
    39         outname = name + '_depth'
    40         quantityname = 'stage-elevation' 
     46if which_var == 3:  # Speed
     47    outname = name + '_speed_i0'
     48    quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))'  #Speed
    4149
    42     if which_var == 3:  # Speed
    43         outname = name + '_speed_i0'
    44         quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))'  #Speed
     50if which_var == 4:  # Elevation
     51    outname = name + '_elevation'
     52    quantityname = 'elevation'  #Elevation
    4553
    46     if which_var == 4:  # Elevation
    47         outname = name + '_elevation'
    48         quantityname = 'elevation'  #Elevation
    49 
    50     print 'start sww2dem'
    51     sww2dem(the_name, basename_out = outname,
    52             quantity = quantityname,
    53             cellsize = 20,
    54             easting_min = bay_west,
    55             easting_max = bay_east,
    56             northing_min = bay_south,
    57             northing_max = bay_north,   
    58             reduction = max,
    59             verbose = True,
    60             format = 'asc')
     54print 'start sww2dem'
     55sww2dem(name, basename_out = outname,
     56        quantity = quantityname,
     57        cellsize = 20,
     58        easting_min = bay_west,
     59        easting_max = bay_east,
     60        northing_min = bay_south,
     61        northing_max = bay_north,   
     62        reduction = max,
     63        verbose = True,
     64        format = 'asc')
Note: See TracChangeset for help on using the changeset viewer.