GeoscienceAustralia / eqrm

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

Inconsistent use of csm_variability_method #85

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have noticed some unusual behavior when changing the variability use for the 
csm - also the EQRM appears to be missing the most important option in this 
area: 

(1) Why does the EQRM need both csm_use_variability and csm_variability_method 
to incorporate variability in the csm when the other sampling areas (e.g. 
attenuation and amplification) only require one parameter. That is, the EQRM 
bombs whenever csm_use_variability is not set (see error message 1 below)

(2) Why does the EQRM bomb when csm_variability_method = 2 (see error message 2 
below)? This is the random sampling technique and is probably the most 
important technique. 

FYI - I noticed these problems when running the setdata_ScenRisk.py (attached 
for your conevenience) from the demo area

===============
ERROR MESSAGE 1

Davids-iMac:test8 davidrobinson$ python setdata_ScenRisk.py
Logfile is './EQRM.log' with logging level of DEBUG, console logging level is 
INFO
WARNING: max_width term in EQRM control file is deprecated. Replaced with 
scenario_max_width=15.
Logfile is './output/scen_risk/log-0.txt' with logging level of DEBUG, console 
logging level is INFO
host name: Davids-iMac.local
SVN version: 1241
event_set_handler = generate
P0: Generating event set
P0: Saving event set to ./output/scen_risk/newc_event_set
P0: Event set created. Number of events=1002
P0: Sites set created. Number of sites=6305
P0: do site 1 of 6305

Traceback (most recent call last):
  File "setdata_ScenRisk.py", line 97, in <module>
    main(locals())
  File "/Users/davidrobinson/Documents/datafiles/workstuff/svn_sandpit/eqrm/eqrm_code/analysis.py", line 441, in main
    damage) = sites.calc_total_loss(SA, eqrm_flags, overloaded_MW)
  File "/Users/davidrobinson/Documents/datafiles/workstuff/svn_sandpit/eqrm/eqrm_code/structures.py", line 269, in calc_total_loss
    loss_aus_contents=eqrm_flags.loss_aus_contents)
  File "/Users/davidrobinson/Documents/datafiles/workstuff/svn_sandpit/eqrm/eqrm_code/damage_model.py", line 184, in aggregated_building_loss
    self.building_loss(ci=ci, loss_aus_contents=loss_aus_contents)
  File "/Users/davidrobinson/Documents/datafiles/workstuff/svn_sandpit/eqrm/eqrm_code/damage_model.py", line 150, in building_loss
    damage_states = self.get_building_states()
  File "/Users/davidrobinson/Documents/datafiles/workstuff/svn_sandpit/eqrm/eqrm_code/damage_model.py", line 109, in get_building_states
    raise RuntimeError(msg)
RuntimeError: ERROR in prep_build_vun: csm_use_variability not properly defined

===================
ERROR MESSAGE 2

Davids-iMac:test8 davidrobinson$ python setdata_ScenRisk.py
Logfile is './EQRM.log' with logging level of DEBUG, console logging level is 
INFO
WARNING: max_width term in EQRM control file is deprecated. Replaced with 
scenario_max_width=15.
Logfile is './output/scen_risk/log-0.txt' with logging level of DEBUG, console 
logging level is INFO
host name: Davids-iMac.local
SVN version: 1241
event_set_handler = generate
P0: Generating event set
P0: Saving event set to ./output/scen_risk/newc_event_set
P0: Event set created. Number of events=1002
P0: Sites set created. Number of sites=6305
P0: do site 1 of 6305

Traceback (most recent call last):
  File "setdata_ScenRisk.py", line 97, in <module>
    main(locals())
  File "/Users/davidrobinson/Documents/datafiles/workstuff/svn_sandpit/eqrm/eqrm_code/analysis.py", line 441, in main
    damage) = sites.calc_total_loss(SA, eqrm_flags, overloaded_MW)
  File "/Users/davidrobinson/Documents/datafiles/workstuff/svn_sandpit/eqrm/eqrm_code/structures.py", line 262, in calc_total_loss
    csm_params=csm_params)
  File "/Users/davidrobinson/Documents/datafiles/workstuff/svn_sandpit/eqrm/eqrm_code/damage_model.py", line 77, in __init__
    self.capacity_spectrum_model = Capacity_spectrum_model(**csm_params)
  File "/Users/davidrobinson/Documents/datafiles/workstuff/svn_sandpit/eqrm/eqrm_code/capacity_spectrum_model.py", line 98, in __init__
    building_parameters,magnitudes)
  File "/Users/davidrobinson/Documents/datafiles/workstuff/svn_sandpit/eqrm/eqrm_code/capacity_spectrum_model.py", line 257, in _calculate_parameters
    csm_variability_method=csm_variability_method)
  File "/Users/davidrobinson/Documents/datafiles/workstuff/svn_sandpit/eqrm/eqrm_code/capacity_spectrum_functions.py", line 234, in calculate_capacity_parameters
    raise NotImplementedError
NotImplementedError

Original issue reported on code.google.com by RobinsonDavidJ0@gmail.com on 4 Sep 2012 at 12:32

Attachments:

GoogleCodeExporter commented 9 years ago
With regards to 1) csm_use_variability does more than one thing.  So what the 
other parameters were updated this one was not, since it why it was doing what 
it was doing.

With regards to 2) 3 is actually random sampling.

I will close this ticket and open a new one with the issue being to improve csm 
variability parameters. 

Original comment by duncan.g...@gmail.com on 5 Sep 2012 at 3:27