Ignore:
Timestamp:
Apr 11, 2006, 5:05:36 PM (19 years ago)
Author:
nick
Message:

added functionality to export_results.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • production/onslow_2006/export_results.py

    r2682 r2700  
    11import project, os
    2 from os import sep
     2import sys
    33
    44from pyvolution.data_manager import sww2dem
    55from pyvolution.ermapper_grids import read_ermapper_grid
     6from pyvolution.util import Screen_Catcher
     7from os import sep
    68
    7 #name = project.outputname
    8 
    9 time_dir = "20060328_094539_alpha_0.1"
     9time_dir = "20060327_095435"
    1010directory = project.outputdir
    1111name = directory + time_dir +sep + "source"
    1212
    13 print'output dir:', name
     13#normal screen output is stored in 'outname'
     14screen_output_name = directory + time_dir + sep + "export_output.txt"
     15
     16#used to catch screen output to file
     17sys.stdout = Screen_Catcher(screen_output_name)
     18sys.stderr = Screen_Catcher(screen_output_name)
     19
     20print 'output dir:', name
    1421#print 'Which variable do you want to export?'
    1522#which_var = int(raw_input('Stage = 0, Absolute Momentum = 1, Depth = 2, Speed = 3  '  ))
     
    3845    quantityname = 'elevation'  #Elevation
    3946
    40    
     47print 'start sww2dem'
    4148sww2dem(name, basename_out = outname,
    4249            quantity = quantityname,
    43             cellsize = 30,       # Trevor would like this at 25
     50            cellsize = 1000,       # Trevor would like this at 25
    4451            # define region for viz purposes
    4552            easting_min = project.e_min_area,
     
    5158            format = 'asc')
    5259
     60sys.stderr.write(sys.stdout.data)
     61
    5362#Check
    5463
Note: See TracChangeset for help on using the changeset viewer.