Changeset 5710


Ignore:
Timestamp:
Aug 29, 2008, 10:39:35 AM (17 years ago)
Author:
duncan
Message:

comments

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • anuga_validation/Hinwood_2008/create_mesh.py

    r5682 r5710  
    55from anuga.pmesh.mesh import *
    66from anuga.coordinate_transforms.geo_reference import Geo_reference
    7 
    8 xslope = 5.0 # Distance between the boundary and the start of the slope
    9 
    107
    118def generate(mesh_filename, slope, width,
     
    1815   
    1916    """
    20     #Basic geometry
    21     global xslope
    2217   
    2318    xleft = slope['xleft'][0]
     
    2722    ytop    = width/2.0
    2823    ybottom = -ytop
    29     ###xslope = slope
    30 
     24   
    3125    #Outline
    3226    point_sw = [xleft, ybottom]
     
    7569    m.add_points_and_segments(points, segments, segment_tags)
    7670   
    77 #     dam = m.add_region(xslope - 0.0000001,(ytop - ybottom)/2)
    78 #     # this is the location of the reservoir region.
    79 #     dam.setTag("flat")
    80    
    81 #     slope = m.add_region(xslope + 0.0000001,(ytop - ybottom)/2)
    82 #     # this is the location of the slope region.
    83 #     slope.setTag("slope")
    84    
    8571    m.generate_mesh(maximum_triangle_area=maximum_triangle_area)
    8672
  • anuga_validation/Hinwood_2008/run_dam.py

    r5696 r5710  
    11"""
    22
    3 Script for running a breaking wave simulation of Jon Hinwoods wave tank.
     3Script for running a breaking wave simulation of Jon Hinwood's wave tank.
    44
    55Duncan Gray, GA - 2007
  • anuga_validation/Hinwood_2008/scenarios.py

    r5691 r5710  
    11"""
    2 
     2Scenario information, used to run simulations and create graphs.
    33"""
     4
    45# A list of scenario dictionaries
    56scenarios = []
  • anuga_work/development/Hinwood_2008/calc_rmsd.py

    r5709 r5710  
    11"""
     2Functions used to calculate the root mean square deviation.
     3
     4Duncan Gray, GA - 2007
    25
    36"""
     
    2730
    2831def get_max_min_condition_array(min, max, vector):
     32    """
     33    Given a vector of values, and minimum and maximum values, return a
     34    vector of 0/1's that can be used to cut arrays so only the times
     35    in the min max range are used.
     36   
     37    precondition: The vector values are ascending.
     38   
     39    """
    2940   
    3041    SMALL_MIN = -1e10  # Not that small, but small enough
     
    3849def auto_rrms(outputdir_tag, scenarios, quantity, y_location_tag=':0.0'):
    3950    """
    40     Given a bunch of scenarios that have CSV guage files, calc the
     51    Given a list of scenarios that have CSV guage files, calc the
    4152    err, Number_of_samples and rmsd for all gauges in each scenario.
    4253    Write this info to a file for each scenario.
     
    322333def err_files(scenarios, outputdir_tag, rmsd_dir, quantity):
    323334    """
    324     The err files, for a list of scenarios
     335    Create a list of err files, for a list of scenarios.
    325336    """
    326337    file_errs = []
     
    337348                   save_as=None,
    338349                   is_interactive=False):
     350    """
     351    Calculate the RMSD for all the tests in a scenario
     352    """
    339353
    340354    # A bit hacky.  Getting a pro_instance to get the rmsd_dir.
  • anuga_work/development/Hinwood_2008/create_mesh.py

    r5577 r5710  
    55from anuga.pmesh.mesh import *
    66from anuga.coordinate_transforms.geo_reference import Geo_reference
    7 
    8 xslope = 5.0 # Distance between the boundary and the start of the slope
    9 
    107
    118def generate(mesh_filename, slope, width,
     
    1815   
    1916    """
    20     #Basic geometry
    21     global xslope
    2217   
    2318    xleft = slope['xleft'][0]
     
    2722    ytop    = width/2.0
    2823    ybottom = -ytop
    29     ###xslope = slope
    3024
    3125    #Outline
     
    7569    m.add_points_and_segments(points, segments, segment_tags)
    7670   
    77 #     dam = m.add_region(xslope - 0.0000001,(ytop - ybottom)/2)
    78 #     # this is the location of the reservoir region.
    79 #     dam.setTag("flat")
    80    
    81 #     slope = m.add_region(xslope + 0.0000001,(ytop - ybottom)/2)
    82 #     # this is the location of the slope region.
    83 #     slope.setTag("slope")
    84    
    8571    m.generate_mesh(maximum_triangle_area=maximum_triangle_area)
    8672
  • anuga_work/development/Hinwood_2008/prepare_time_boundary.py

    r5681 r5710  
    3131   
    3232def csv2tms(filename, offshore_bed_elevation):
    33     """Convert benchmark 2 time series to NetCDF tms file.
     33    """
     34    Convert Hinwood boundary file to NetCDF tms file.
    3435    the filename is the name of the output tms file, eg 'hi.tsm'.
    3536    There must be an equivalent .csv file, eg 'hi.csv'.
    3637   
    3738    """
    38 
    39 
    4039
    4140    print 'Creating', filename
  • anuga_work/development/Hinwood_2008/scenarios.py

    r5681 r5710  
    11"""
    2 
     2Scenario information, used to run simulations and create graphs.
    33"""
     4
    45# A list of scenario dictionaries
    56scenarios = []
  • anuga_work/development/Hinwood_2008/slope.py

    r5659 r5710  
    2727    Load a csv file, where the first row is the column header and
    2828    the first colum explains the rows.
     29
     30    returns the data as two vectors and an array.
    2931    """
    3032    #slope, _ = csv2dict(file_sim)
Note: See TracChangeset for help on using the changeset viewer.