Changeset 6284


Ignore:
Timestamp:
Feb 5, 2009, 4:28:52 PM (16 years ago)
Author:
kristy
Message:

Updated scripts for working standards

Location:
anuga_work/production/busselton/standardised_version
Files:
2 added
1 edited
2 moved

Legend:

Unmodified
Added
Removed
  • anuga_work/production/busselton/standardised_version/build_elevation.py

    r6281 r6284  
    44Input: elevation data from project.py
    55Output: pts file stored in project.topographies_dir
    6 The run_busselton.py is reliant on the output of this script.
     6The run_model.py is reliant on the output of this script.
    77
    88"""
     
    1414# Standard modules
    1515import os
     16from os.path import join
    1617
    1718# Related major packages
     
    5051geospatial_data = {}
    5152for filename in project.ascii_grid_filenames:
    52     absolute_filename = project.topographies_folder + os.sep + filename
     53    absolute_filename = join(project.topographies_folder, filename)
    5354    convert_dem_from_ascii2netcdf(absolute_filename,
    5455                                  basename_out=absolute_filename,
     
    6263# Create Geospatial data from TXT files
    6364for filename in project.point_filenames:
    64     absolute_filename = project.topographies_folder  + os.sep + filename
     65    absolute_filename = join(project.topographies_folder, filename)
    6566    geospatial_data[filename] = Geospatial_data(file_name=absolute_filename,
    6667                                                verbose=True)
     
    8889
    8990print 'Export combined DEM file'
    90 G_clip.export_points_file(project.combined_dir_name + '.pts')
     91G_clip.export_points_file(project.combined_elevation + '.pts')
    9192print 'Do txt version too'
    9293# Use for comparision in ARC
    93 G_clip.export_points_file(project.combined_dir_name + '.txt')
     94G_clip.export_points_file(project.combined_elevation + '.txt')
    9495
  • anuga_work/production/busselton/standardised_version/project.py

    r6282 r6284  
    4040# Model specific parameters. One or all can be changed each time the
    4141# run_scenario script is executed
     42tide = 0              #0.6
     43event_number = 27255 # Java 9.3 worst case for Perth
     44#event_number = 68693 # Sumatra 9.2
     45#event_number = 27283  # Java 9.3 original
    4246tide = 0                #0.6
    4347#event_number = 27255   # Java 9.3 worst case for Perth
     
    8286#------------------------------------------------------------------------------
    8387# ELEVATION DATA
    84 # Used in build_busselton.py
     88# Used in build_elevation.py
    8589# Format for ascii grids, as produced in ArcGIS + a projection file
    8690ascii_grid_filenames = ['busselton_v2',   # Topo
     
    100104
    101105# LAND - used to set the initial stage/water to be offcoast only
    102 # Used in run_busselton,py
     106# Used in run_model,py
    103107# Format for points easting,northing (no header)
    104108land_initial_conditions_filename = [['initial_condition_extend.csv', 0],
     
    106110
    107111# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
    108 # Used in build_busselton.py
     112# Used in build_elevation.py
    109113# Format for points easting,northing (no header)
    110114bounding_polygon_filename = 'bounding_polygon.csv'
    111115
    112116# INTERIOR REGIONS -  for designing the mesh
    113 # Used in run_busselton.py
     117# Used in run_model.py
    114118# Format for points easting,northing (no header)                   
    115119interior_regions_data = [['busselton_1km.csv', 500],
     
    132136
    133137# BOUNDING POLYGON
    134 # used in build_boundary.py and run_busselton.py respectively
     138# used in build_boundary.py and run_model.py respectively
    135139# NOTE: when files are put together the points must be in sequence
    136140# For ease go clockwise!
    137 # Check the run_busselton.py for boundary_tags
     141# Check the run_model.py for boundary_tags
    138142
    139143# Thinned ordering file from Hazard Map (geographic)
     
    167171#------------------------------------------------------------------------------
    168172# Output filename for elevation
    169 # this is a combination of all the data generated in build_busselton.py
     173# this is a combination of all the data generated in build_elevation.py
    170174combined_elevation_basename = scenario_name + '_combined_elevation'
    171175
     
    185189#------------------------------------------------------------------------------
    186190
    187 # The absolute pathname of the all elevation, generated in build_busselton.py
     191# The absolute pathname of the all elevation, generated in build_elevation.py
    188192combined_elevation = join(topographies_folder, combined_elevation_basename)
    189193
    190 # The absolute pathname of the mesh, generated in run_busselton.py
    191 meshes = join(meshes_folder, scenario_name, '.msh')
     194
     195# The absolute pathname of the mesh, generated in run_model.py
     196meshes = join(meshes_folder, scenario_name) + '.msh'
    192197
    193198# The absolute pathname for the urs order points, used within build_boundary.py
     
    195200
    196201# The absolute pathname for the landward points of the bounding polygon,
    197 # Used within run_busselton.py)
     202# Used within run_model.py)
    198203landward_boundary = join(boundaries_folder, landward_boundary_filename)
    199204
     
    202207
    203208# The absolute pathname for the output folder names
    204 # Used for build_busselton.py
    205 output_build = output_folder + sep + build_time + '_' + str(user)
    206 # Used for run_busselton.py
    207 output_run = output_folder + sep + run_time + output_comment
     209# Used for build_elevation.py
     210output_build = join(output_folder, build_time) + '_' + str(user)
     211# Used for run_model.py
     212output_run = join(output_folder, run_time) + output_comment
    208213# Used by post processing
    209214output_run_time = join(output_run, scenario_name)
     
    225230for filename, MSL in land_initial_conditions_filename:
    226231    polygon = read_polygon(join(polygons_folder, filename))
    227     land_initial_conditions.append([filename, MSL])
     232    land_initial_conditions.append([polygon, MSL])
    228233
    229234# Create list of interior polygons with scaling factor
  • anuga_work/production/busselton/standardised_version/run_model.py

    r6281 r6284  
    22
    33The scenario is defined by a triangular mesh created from project.polygon, the
    4 elevation data is compiled into a pts file through build_busselton.py and a
     4elevation data is compiled into a pts file through build_elevation.py and a
    55simulated tsunami is generated through an sts file from build_boundary.py.
    66
    77Input: sts file (build_boundary.py for respective event)
    8        pts file (build_busselton.py)
     8       pts file (build_elevation.py)
    99       information from project file
    1010Outputs: sww file stored in project.output_run_time_dir
     
    7373# Boundary tags refer to project.landward_boundary
    7474# 4 points equals 5 segments start at N
    75 boundary_tags={'back': [N+1,N+2,N+3,N+4, N+5],
    76                'side': [N,N+6],
     75boundary_tags={'back': [N+1, N+2, N+3, N+4, N+5, N+6, N+7],
     76               'side': [N, N+8],
    7777               'ocean': range(N)}
    7878
     
    8080domain = create_domain_from_regions(bounding_polygon_sts,
    8181                                    boundary_tags=boundary_tags,
    82                                     maximum_triangle_area=project.res_poly_all,
     82                                    maximum_triangle_area=project.bounding_maxarea,
    8383                                    interior_regions=project.interior_regions,
    8484                                    mesh_filename=project.meshes,
Note: See TracChangeset for help on using the changeset viewer.