diff --git a/src/seismic_hazard_forecasting.py b/src/seismic_hazard_forecasting.py index d0b0605..a7fad20 100644 --- a/src/seismic_hazard_forecasting.py +++ b/src/seismic_hazard_forecasting.py @@ -111,6 +111,14 @@ verbose: {verbose}") dask.config.set(scheduler='processes') + # validate m_max against the grond motion model if forecasting was selected + models_anthro_limited = ['Lasocki2013', 'Atkinson2015', 'ConvertitoEtAl2012Geysers'] # these models require that m_max<=4.5 + if forecast_select: + if m_max > 4.5 and model in models_anthro_limited: + msg = "Selected ground motion model only valid up to a maximum magnitude of 4.5. Please try again with a lower maximum magnitude." + logger.error(msg) + raise Exception(msg) + # run magnitude distribution modeling if selected by user and no magnitude pdf file provided if m_select and m_range[0] == None and m_pdf[0] == None: logger.info("Magnitude distribution modeling selected")