Skip to content

Commit 84bfc19

Browse files
authored
Merge pull request #391 from amnp95/M9
bug fix for M9
2 parents f8a1f55 + 25dc939 commit 84bfc19

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

modules/createEVENT/M9/M9App2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ def Submit_tapis_job(username, password): # noqa: N802, D103
9292
'maxMinutes': 30,
9393
'archiveOnAppError': True,
9494
'archiveSystemId': 'designsafe.storage.default',
95-
'archiveSystemDir': f'{t.username}/physics_based/M9/',
9695
'fileInputs': fileInputs,
9796
'parameterSet': parameterSet,
9897
'tags': ['portalName: DESIGNSAFE'],

modules/createEVENT/M9/TapisFiles/M9.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def M9(information): # noqa: N802
2222
] # grid type (options: A, B, C, D, E, Y, and Z, can be "all")
2323

2424
randomFLag = True # if True, the realizations are selected randomly, otherwise, the first numSiteGM sites are selected # noqa: N806
25-
maxnumSiteGM = 30 # noqa: N806
25+
maxnumSiteGM = 32 # noqa: N806
2626
numSiteGM = min(numSiteGM, maxnumSiteGM) # number of realizations # noqa: N806
2727

2828
my_Directory = os.getcwd() # noqa: PTH109, N806
@@ -33,8 +33,8 @@ def M9(information): # noqa: N802
3333

3434
# changing realizations order
3535
# indices = list(range(maxnumSiteGM));
36-
Realizations = ['032'] # noqa: N806
37-
indices = [0]
36+
Realizations = [f"{i:03}" for i in range(1, 33)] # noqa: N806
37+
indices = [i for i in range(32)]
3838
if randomFLag:
3939
np.random.shuffle(indices)
4040
indices = indices[:numSiteGM]
@@ -65,6 +65,8 @@ def M9(information): # noqa: N802
6565
APIFLAG = information[ # noqa: N806
6666
'APIFLAG'
6767
] # if the APIFLAG is True, we use M9 API to get the motion data
68+
69+
6870

6971
if not (APIFLAG):
7072
for i in indices:
@@ -93,7 +95,7 @@ def M9(information): # noqa: N802
9395
break
9496

9597
if LocationFlag:
96-
gdf = gdf.loc[[0]]
98+
gdf = gdf.iloc[[0]]
9799

98100
# save the gdf to a csv file in the directory just "Station Name", "Latitude", "Longitude"
99101
gdf[['filename', 'Latitude', 'Longitude']].to_csv(

0 commit comments

Comments
 (0)