Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
9f1eae9551 | |||
2efa92f59c | |||
5eea239f3d | |||
30f6cdcbe2 | |||
6cb4f7210d |
@@ -4,6 +4,27 @@
|
|||||||
def main(catalog_file, mc_file, pdf_file, m_file, m_select, mag_label, mc, m_max,
|
def main(catalog_file, mc_file, pdf_file, m_file, m_select, mag_label, mc, m_max,
|
||||||
m_kde_method, xy_select, grid_dim, xy_win_method, rate_select, time_win_duration,
|
m_kde_method, xy_select, grid_dim, xy_win_method, rate_select, time_win_duration,
|
||||||
forecast_select, custom_rate, forecast_len, time_unit, model, products_string, verbose):
|
forecast_select, custom_rate, forecast_len, time_unit, model, products_string, verbose):
|
||||||
|
#catalog_file = 'LGCD_catalog_2024.mat'
|
||||||
|
mc_file = None
|
||||||
|
pdf_file = None
|
||||||
|
m_file = None
|
||||||
|
m_select = True
|
||||||
|
mag_label = 'Mw'
|
||||||
|
mc = 1.8
|
||||||
|
m_max = 4.5
|
||||||
|
m_kde_method = 'arviz-silverman'
|
||||||
|
xy_select = True
|
||||||
|
grid_dim = 5000
|
||||||
|
xy_win_method = False
|
||||||
|
rate_select = True
|
||||||
|
time_win_duration = 100
|
||||||
|
forecast_select = True
|
||||||
|
custom_rate = None
|
||||||
|
forecast_len = 100
|
||||||
|
time_unit = 'days'
|
||||||
|
model = 'Lasocki2013'
|
||||||
|
products_string = 'PGA'
|
||||||
|
verbose = True
|
||||||
"""
|
"""
|
||||||
Python application that reads an earthquake catalog and performs seismic hazard forecasting.
|
Python application that reads an earthquake catalog and performs seismic hazard forecasting.
|
||||||
Arguments:
|
Arguments:
|
||||||
@@ -69,6 +90,7 @@ def main(catalog_file, mc_file, pdf_file, m_file, m_select, mag_label, mc, m_max
|
|||||||
from matplotlib.contour import ContourSet
|
from matplotlib.contour import ContourSet
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
import json
|
import json
|
||||||
|
import multiprocessing as mp
|
||||||
|
|
||||||
logger = getDefaultLogger('igfash')
|
logger = getDefaultLogger('igfash')
|
||||||
|
|
||||||
@@ -457,8 +479,9 @@ verbose: {verbose}")
|
|||||||
use_pp = True
|
use_pp = True
|
||||||
|
|
||||||
if use_pp: # use dask parallel computing
|
if use_pp: # use dask parallel computing
|
||||||
pbar = ProgressBar()
|
mp.set_start_method("fork", force=True)
|
||||||
pbar.register()
|
#pbar = ProgressBar()
|
||||||
|
#pbar.register()
|
||||||
# iter = range(0,len(distances))
|
# iter = range(0,len(distances))
|
||||||
iter = indices
|
iter = indices
|
||||||
iml_grid_raw = [] # raw ground motion grids
|
iml_grid_raw = [] # raw ground motion grids
|
||||||
|
Reference in New Issue
Block a user