Closed GoogleCodeExporter closed 9 years ago
The site file for run_type = risk does not contain a VS30 column and so is
calculated as follows:
# Load the site_class 2 Vs30 mapping
amp_factor_file = 'site_class2vs30.csv'
amp_factor_file = get_local_or_default(amp_factor_file,
eqrm_flags.default_input_dir,
eqrm_flags.input_dir)
# Load Vs30 mapping
site_class2Vs30 = load_site_class2Vs30(amp_factor_file)
# Use the mapping to add Vs30 info to add Vs30 info to structures
sites.set_Vs30(site_class2Vs30)
run_type = hazard, however, relies on the VS30 column in the site file and so
the csv reader expects it to be present and populated.
There are two options here:
1. Remove VS30 from the site input file for all run_types and calculate based
on site class defined in site_class2vs30.csv
2. Keep the files as is. If the VS30 column is present and populated use it. If
not, calculate based on site class defined in site_class2vs30.csv
Original comment by b...@girorosso.com
on 14 Jun 2012 at 2:00
Option 2 is consistent with the original request. Currently testing an
implementation of this which applies to all run_types.
- The sites csv file is loaded without VS30 as an attribute. This loads up the
relevant attributes without failing completely if VS30 is not present.
- It will then inspect the VS30 attribute of the sites file.
-- If it works correctly then VS30 is used as the sites attribute.
-- If it throws an exception, catch and pass. The VS30 attribute is not added
to sites.
- The load_data function of analysis checks for the presence of this attribute.
If it is not present, load based on site class.
Original comment by b...@girorosso.com
on 14 Jun 2012 at 5:07
The changes in comment 2 are implemented in trunk revision 1156
Original comment by b...@girorosso.com
on 14 Jun 2012 at 6:25
Original issue reported on code.google.com by
duncan.g...@gmail.com
on 8 Jun 2012 at 6:20