Changeset 5704


Ignore:
Timestamp:
Aug 28, 2008, 9:42:21 AM (16 years ago)
Author:
kristy
Message:
 
File:
1 edited

Legend:

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

    r5603 r5704  
    66
    77home = getenv('INUNDATIONHOME') + sep +'data'+sep #Sandpit's parent dir
     8output_dir = home + 'anuga_validation/boxing_day_sceanario/anuga/outputs/20080813/good_polyline20080813_'
    89
    9 #name='good_simulation/good_simulation_polylinefriction20080529_115703'
    10 #name='good_simulation/good_simulation_ursfriction20080529_160110'
     10name1= output_dir +'101348_0.45'
     11name2= output_dir +'101521_0.55'
     12name3= output_dir +'101610_0.35'
     13name4= output_dir +'101741_0.25'
     14name5= output_dir +'101819_0.15'
    1115
    12 name= home + 'anuga_validation/boxing_day_sceanario/anuga/outputs/20080723/good_polyline20080723_45_141453'
     16names= [name1, name2, name3, name4, name5]
    1317
    14 print 'output dir:', name
     18for the_name in names:
    1519
    16 bay_west = 417348.0
    17 bay_east = 425656.0
    18 bay_south = 870565.0
    19 bay_north = 877008.0
     20    name = the_name[-11:]
     21    print 'sww filename', name
    2022
    21 which_var = 2
     23    bay_west = 417348.0
     24    bay_east = 425656.0
     25    bay_south = 870565.0
     26    bay_north = 877008.0
    2227
    23 if which_var == 0:  # Stage
    24     outname = name + '_stage-eq-thurs-test'
    25     quantityname = 'stage'
     28    which_var = 2
    2629
    27 if which_var == 1:  # Absolute Momentum
    28     outname = name + '_momentum_i1'
    29     quantityname = '(xmomentum**2 + ymomentum**2)**0.5' 
     30    if which_var == 0:  # Stage
     31        outname = name + '_stage-eq-thurs-test'
     32        quantityname = 'stage'
    3033
    31 if which_var == 2:  # Depth
    32     outname = name + '_depth'
    33     quantityname = 'stage-elevation
     34    if which_var == 1:  # Absolute Momentum
     35        outname = name + '_momentum_i1'
     36        quantityname = '(xmomentum**2 + ymomentum**2)**0.5
    3437
    35 if which_var == 3:  # Speed
    36     outname = name + '_speed_i0'
    37     quantityname = '(xmomentum**2 + ymomentum**2)**0.5/(stage-elevation+1.e-6/(stage-elevation))'  #Speed
     38    if which_var == 2:  # Depth
     39        outname = name + '_depth'
     40        quantityname = 'stage-elevation' 
    3841
    39 if which_var == 4:  # Elevation
    40     outname = name + '_elevation'
    41     quantityname = 'elevation'  #Elevation
     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
    4245
    43 print 'start sww2dem'
    44 sww2dem(name, basename_out = outname,
    45         quantity = quantityname,
    46         cellsize = 20,
    47         easting_min = bay_west,
    48         easting_max = bay_east,
    49         northing_min = bay_south,
    50         northing_max = bay_north,   
    51         reduction = max,
    52         verbose = True,
    53         format = 'asc')
     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')
Note: See TracChangeset for help on using the changeset viewer.