Changeset 6432


Ignore:
Timestamp:
Mar 2, 2009, 11:59:23 AM (15 years ago)
Author:
rwilson
Message:

Added sanity checks for landward_boundary_filename and urs_order_filename parameters.

Location:
anuga_work/production/busselton/standardised_version
Files:
2 edited

Legend:

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

    r6377 r6432  
    7878##    add_csv_header(join(topographies_folder, f), headerlist)
    7979
    80     # BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
     80# BOUNDING POLYGON - for data clipping and estimate of triangles in mesh
    8181# Used in build_elevation.py
    8282# Format for points easting,northing (no header)
     
    219219
    220220# The pathname for the urs order points, used within build_urs_boundary.py
    221 urs_order = join(boundaries_folder, urs_order_filename)
     221if urs_order_filename:
     222    urs_order = join(boundaries_folder, urs_order_filename)
    222223
    223224# The absolute pathname for the landward points of the bounding polygon,
    224225# Used within run_model.py)
    225 landward_boundary = join(boundaries_folder, landward_boundary_filename)
     226if landward_boundary_filename:
     227    landward_boundary = join(boundaries_folder, landward_boundary_filename)
    226228
    227229# The absolute pathname for the .sts file, generated in build_boundary.py
     
    238240# The absolute pathname for the gauges file
    239241# Used for get_timeseries.py
    240 gauges = join(gauges_folder, gauges_filename)       
     242if gauges_filename:
     243    gauges = join(gauges_folder, gauges_filename)       
    241244
    242245# The absolute pathname for the building file
    243246# Used for run_building_inundation.py
    244 building_exposure = join(gauges_folder, building_exposure_filename)
     247if building_exposure_filename:
     248    building_exposure = join(gauges_folder, building_exposure_filename)
    245249
    246250# full path to where MUX files (or meta-files) live
  • anuga_work/production/busselton/standardised_version/setup_model.py

    r6363 r6432  
    2929if os.getenv(project.ENV_MUXHOME) is None:
    3030    print "Environment variable '%s' is not set" % project.ENV_MUXHOME
     31    sanity_error = True
     32
     33#-------------------------------------------------------------------------------
     34# Check filename strings that MUST be set
     35#-------------------------------------------------------------------------------
     36
     37if not urs_order_filename:
     38    print ("Sorry, thinned ordering file parameter 'urs_order_filename' "
     39           "isn't set")
     40    sanity_error = True
     41
     42if not landward_boundary_filename:
     43    print ("Sorry, landward bounding points parameter "
     44           "'landward_boundary_filename' isn't set")
    3145    sanity_error = True
    3246
Note: See TracChangeset for help on using the changeset viewer.