Skip to content

Commit 154905c

Browse files
committed
fmk - for regional, was looking to RegionalEvent for uints in input file, now checking i units already set in AIM file before going to Regional
1 parent cf3a0cf commit 154905c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/createEVENT/SimCenterEvent/SimCenterEvent.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ def write_RV(AIM_file, EVENT_file): # noqa: N802, N803, D103
6363
if 'RegionalEvent' in aim_file.keys(): # noqa: SIM118
6464
input_units = aim_file['RegionalEvent'].get('units', None)
6565

66+
# if units are specified in the AIM file, use these instead
67+
if 'Events' in aim_file.keys():
68+
if 'units' in aim_file['Events'][0].keys():
69+
event_units = aim_file['Events'][0]['units']
70+
if event_units:
71+
input_units = event_units
72+
73+
6674
output_units = aim_file.get('units', None)
6775

6876
# scale the input data to the event unit used internally

0 commit comments

Comments
 (0)