GeoscienceAustralia / eqrm

Automatically exported from code.google.com/p/eqrm
Other
5 stars 4 forks source link

Building parameters file reference issues #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The building parameters file references are potentially problematic.

1. building_parameters

File name determined by function in structures.py build_par_file

def build_par_file(buildpars_flag):
    # Build lookup table for building parameters
    buildpars_map={0: 'building_parameters_workshop_1',
                   1: 'building_parameters_workshop',
                   2: 'building_parameters_hazus',
                   3: 'building_parameters_workshop_2',
                   4: 'building_parameters_workshop_3'}

    # create links to required building parameters
    if isinstance(buildpars_flag, str):
        buildpars = 'building_parameters_' + buildpars_flag
    else:
        buildpars = buildpars_map[buildpars_flag]

    return buildpars

Where buildpars_flag comes from eqrm_flags.buildpars_flag. This is not an 
option available to the user and is hardcoded in parse_in_parameters like so:

# Old style attributes that have not been removed yet.
OLD_STYLE_PARAS_HARD_WIRED = {'buildpars_flag':4, 'grid_flag':1}

This means that building_parameters_workshop_3_params.csv is always used and is 
referenced from a non-changeable input directory resources/data. 

2. building_nsd_parameters (non-structural damage parameters)

File name is hard coded in building_params_from_csv.building_params_from_csv:

    file_location = join(
        default_input_dir,
        'building_parameters_workshop_3_non_structural_damage_params.csv')    

These parameters should be able to be controlled via eqrm_flags. A suggestion 
would be:

- Structural damage file - <input_dir>/<site_tag>_building_parameters.csv
- Non-structural damage file - 
<input_dir>/<site_tag>_building_parameters_non_structural_damage.csv

Original issue reported on code.google.com by b...@girorosso.com on 19 Jun 2012 at 3:45

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Requirements from Duncan:

- The introduction of two new eqrm_flags:
-- building_classification_tag -> default: empty string
-- damage_extent_tag -> default: empty string
- File references
-- building_parameters<building_classification_tag>.csv
-- damage_extent<damage_extent_tag>.csv --> renamed non-structural damage file

Original comment by b...@girorosso.com on 29 Jun 2012 at 6:16

GoogleCodeExporter commented 9 years ago
This change is implemented in the trunk revision 1179.

Original comment by b...@girorosso.com on 29 Jun 2012 at 6:49

GoogleCodeExporter commented 9 years ago
Documentation of new eqrm_flags committed in revision 1180.

Original comment by b...@girorosso.com on 29 Jun 2012 at 7:06