def old_max_simulation(): """ attribute # JSON attribute events 8,000,000* len_events Sites 3,000,000 len_block_sites periods 10 len_atten_periods return periods 10 len_return_periods source zones 150 len_source_zones SA surfaces (Sa soil and Sa bed rock) 2 len_SA_surfaces # of GM models 5 len_max_GMPEs Note, i'm not doing 150 source zones. The mem estimate's have been good, without taking it into account. """ runs = [] num_sources = 4 sdp = create_base() ### sdp.site_indexes = range(1, 400) events = 80000 events = 800 events = 8000000 events = 80 sdp.return_periods = [100.75, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0, 800.0, 900, 1000.] sdp.atten_periods = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0] sdp.use_amplification = True sdp.atten_spawn_bins = 1 sites_needed = 17278 sdp.file_parallel_log_level = 'debug' sdp.use_site_indexes = False ### num_sites = 17277 events_source = events/num_sources sdp.prob_number_of_events_in_zones = [events_source]*num_sources sdp.prob_number_of_events_in_zones[0] += events%num_sources sdp.use_site_indexes = True sdp.site_indexes = create_sites_list(num_sites, sites_needed) assert sum(sdp.prob_number_of_events_in_zones) == events assert len(sdp.site_indexes) == sites_needed sdp.event_control_tag = "4GMPE" dir_last = 'old_max_sim_again_' + str(sum( sdp.prob_number_of_events_in_zones)) + \ "_sites" + str(len(sdp.site_indexes)) sdp.output_dir = os.path.join(eqrm_data_home(), 'test_national', 'memory_output', dir_last) runs.append({"processes":1, "sdp":sdp}) return runs
def risk_simulation(): """ """ runs = [] num_sources = 6 ### sdp = create_base_risk() sdp.atten_collapse_Sa_of_atten_models = True sdp.atten_variability_method = 2 ### sites_needed = 1 events = 80 ### events_source = events/num_sources num_sites = 17278 sdp.prob_number_of_events_in_zones = [events_source]*num_sources sdp.prob_number_of_events_in_zones[0] += events%num_sources sdp.site_indexes = create_sites_list(num_sites, sites_needed) dir_last = 'initial_risk_' + str(events) + \ "_sites" + str(sites_needed) sdp.output_dir = os.path.join(eqrm_data_home(), 'test_national', 'memory_output_riskB', dir_last) runs.append({"processes":1, "sdp":sdp}) sdp = create_base_risk() sdp.atten_collapse_Sa_of_atten_models = True sdp.atten_variability_method = 2 ### sites_needed = 2 events = 80 ### events_source = events/num_sources num_sites = 17278 sdp.prob_number_of_events_in_zones = [events_source]*num_sources sdp.prob_number_of_events_in_zones[0] += events%num_sources sdp.site_indexes = create_sites_list(num_sites, sites_needed) dir_last = 'initial_risk_' + str(events) + \ "_sites" + str(sites_needed) sdp.output_dir = os.path.join(eqrm_data_home(), 'test_national', 'memory_output_riskB', dir_last) runs.append({"processes":1, "sdp":sdp}) sdp = create_base_risk() sdp.atten_collapse_Sa_of_atten_models = True sdp.atten_variability_method = 2 ### sites_needed = 1 events = 800 ### events_source = events/num_sources num_sites = 17278 sdp.prob_number_of_events_in_zones = [events_source]*num_sources sdp.prob_number_of_events_in_zones[0] += events%num_sources sdp.site_indexes = create_sites_list(num_sites, sites_needed) dir_last = 'initial_risk_' + str(events) + \ "_sites" + str(sites_needed) sdp.output_dir = os.path.join(eqrm_data_home(), 'test_national', 'memory_output_risk', dir_last) #runs.append({"processes":1, "sdp":sdp}) sdp = create_base_risk() sdp.atten_collapse_Sa_of_atten_models = True sdp.atten_variability_method = 2 ### sites_needed = 10 events = 800 ### events_source = events/num_sources num_sites = 17278 sdp.prob_number_of_events_in_zones = [events_source]*num_sources sdp.prob_number_of_events_in_zones[0] += events%num_sources sdp.site_indexes = create_sites_list(num_sites, sites_needed) dir_last = 'initial_risk_' + str(events) + \ "_sites" + str(sites_needed) sdp.output_dir = os.path.join(eqrm_data_home(), 'test_national', 'memory_output_risk', dir_last) #runs.append({"processes":1, "sdp":sdp}) sdp = create_base_risk() sdp.atten_collapse_Sa_of_atten_models = True sdp.atten_variability_method = 2 ### sites_needed = 1 events = 80000 ### events_source = events/num_sources num_sites = 17278 sdp.prob_number_of_events_in_zones = [events_source]*num_sources sdp.prob_number_of_events_in_zones[0] += events%num_sources sdp.site_indexes = create_sites_list(num_sites, sites_needed) dir_last = 'initial_risk_' + str(events) + \ "_sites" + str(sites_needed) sdp.output_dir = os.path.join(eqrm_data_home(), 'test_national', 'memory_output_risk', dir_last) #runs.append({"processes":1, "sdp":sdp}) return runs