diff --git a/modules/Workflow/whale/main.py b/modules/Workflow/whale/main.py index 4175c503b..f51a60435 100644 --- a/modules/Workflow/whale/main.py +++ b/modules/Workflow/whale/main.py @@ -1732,10 +1732,6 @@ def perform_regional_mapping(self, AIM_file_path, assetType, doParallel=True): for input_ in reg_mapping_app.inputs: if input_['id'] == 'assetFile': input_['default'] = str(AIM_file_path) - # Get the event file path - eventFilePath = self.shared_data.get('RegionalEvent', {}).get( # noqa: N806 - 'eventFilePath', self.reference_dir - ) reg_mapping_app.inputs.append( { @@ -1743,7 +1739,7 @@ def perform_regional_mapping(self, AIM_file_path, assetType, doParallel=True): 'type': 'path', 'default': resolve_path( self.shared_data['RegionalEvent']['eventFile'], - eventFilePath, + self.reference_dir, ), } ) diff --git a/modules/performRegionalEventSimulation/regionalGroundMotion/HazardSimulationEQ.py b/modules/performRegionalEventSimulation/regionalGroundMotion/HazardSimulationEQ.py index 3d9eaed21..b39773d71 100644 --- a/modules/performRegionalEventSimulation/regionalGroundMotion/HazardSimulationEQ.py +++ b/modules/performRegionalEventSimulation/regionalGroundMotion/HazardSimulationEQ.py @@ -99,6 +99,15 @@ def hazard_job(hazard_info): # noqa: C901, D103, PLR0915 event_info = hazard_info['Event'] # When vector IM is used. The PGA/SA needs to be computed before PGV im_info = event_info['IntensityMeasure'] + # To make the SA format consistent with R2D requirement + if im_info['Type'] == 'Vector' and 'SA' in im_info.keys(): # noqa: SIM118 + periods = im_info['SA']['Periods'] + periods = [float(i) for i in periods] + im_info['SA']['Periods'] = periods + if im_info['Type'] == 'SA': + periods = im_info['Periods'] + periods = [float(i) for i in periods] + im_info['Periods'] = periods if im_info['Type'] == 'Vector' and 'PGV' in im_info.keys(): # noqa: SIM118 PGV_info = im_info.pop('PGV') # noqa: N806 im_info.update({'PGV': PGV_info})