Update src/seismic_hazard_forecasting.py
put AOI_extent as a parameter of the main function
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
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, AOI_extent, model, products_string, verbose):
|
||||||
"""
|
"""
|
||||||
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:
|
||||||
@@ -33,6 +33,8 @@ def main(catalog_file, mc_file, pdf_file, m_file, m_select, mag_label, mc, m_max
|
|||||||
forecasting.
|
forecasting.
|
||||||
forecast_len: Length of the forecast for seismic hazard assessment.
|
forecast_len: Length of the forecast for seismic hazard assessment.
|
||||||
time_unit: Times units for the inputs Time Window Duration, Custom Activity Rate, and Forecast Length.
|
time_unit: Times units for the inputs Time Window Duration, Custom Activity Rate, and Forecast Length.
|
||||||
|
AOI_extent: The forecast geographical area of interest specified as a latitude and longitude range in decimal degrees
|
||||||
|
in the form [lat_min, lat_max, lon_min, lon_max].
|
||||||
model: Select from the following ground motion models available. Other models in the Openquake library are
|
model: Select from the following ground motion models available. Other models in the Openquake library are
|
||||||
available but have not yet been tested.
|
available but have not yet been tested.
|
||||||
products_string: The ground motion intensity types to output. Use a space between names to select more than
|
products_string: The ground motion intensity types to output. Use a space between names to select more than
|
||||||
@@ -91,8 +93,8 @@ def main(catalog_file, mc_file, pdf_file, m_file, m_select, mag_label, mc, m_max
|
|||||||
exclude_low_fxy = False # skip low probability areas of the map
|
exclude_low_fxy = False # skip low probability areas of the map
|
||||||
thresh_fxy = 1e-3 # minimum fxy value (location PDF) needed to do PGA estimation (to skip low probability areas); also should scale according to number of grid points
|
thresh_fxy = 1e-3 # minimum fxy value (location PDF) needed to do PGA estimation (to skip low probability areas); also should scale according to number of grid points
|
||||||
|
|
||||||
AOI_lat = np.array([51.48, 51.54]) # temporary hard-coding to area of Zelazny Most. To be replaced with user-defined lat and lon range
|
AOI_lat = np.array(AOI_extent[:2])
|
||||||
AOI_lon = np.array([16.15, 16.24])
|
AOI_lon = np.array(AOI_extent[2:])
|
||||||
|
|
||||||
# log user selections
|
# log user selections
|
||||||
logger.debug(f"User input files\n Catalog: {catalog_file}\n Mc: {mc_file}\n Mag_PDF: {pdf_file}\n Mag: {m_file}")
|
logger.debug(f"User input files\n Catalog: {catalog_file}\n Mc: {mc_file}\n Mag_PDF: {pdf_file}\n Mag: {m_file}")
|
||||||
|
|||||||
Reference in New Issue
Block a user