Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Rayner Maurício e Silva Machado
RunEnergyPlus
Commits
ecf8e2c1
Commit
ecf8e2c1
authored
1 week ago
by
Rayner Maurício e Silva Machado
Browse files
Options
Download
Email Patches
Plain Diff
Update run_job.py
parent
9d4f34c9
main
Pipeline
#15086
passed with stage
in 2 minutes and 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inir_parametrico_inmet/src/run_job.py
+10
-10
inir_parametrico_inmet/src/run_job.py
with
10 additions
and
10 deletions
+10
-10
inir_parametrico_inmet/src/run_job.py
View file @
ecf8e2c1
...
...
@@ -19,18 +19,18 @@ size = int(sys.argv[2])
dftmax
=
pd
.
read_csv
(
'../app/inir_parametrico_inmet/src/TBSm_TOMax_INMET.csv'
)
dftmax
.
columns
=
[
'cidades'
,
'TBSm'
,
'TOMax'
]
df
=
pd
.
read_csv
(
'../app/inir_parametrico_inmet/sample/sample_parametrico.zip'
)
df
=
df
.
merge
(
dftmax
,
'left'
,
'cidades'
)
.
sample
(
32
)
df
=
df
.
merge
(
dftmax
,
'left'
,
'cidades'
)
#
col_epws = ['BRA_SP_Sao.Paulo.837810_INMET.epw', 'BRA_PE_Recife.819580_INMET.epw', 'BRA_CE_Fortaleza-Pinto.Martins.Intl.AP.817580_INMET.epw']
#
cond = (df.arquetipos.str.startswith('MH-POS') & df.cidades.isin(col_epws))
#
cond = cond | (df.arquetipos.str.startswith('UT-POS') & df.cidades.isin(col_epws))
#
df = df.loc[cond].reset_index(drop=True)
col_epws
=
[
'BRA_SP_Sao.Paulo.837810_INMET.epw'
,
'BRA_PE_Recife.819580_INMET.epw'
,
'BRA_CE_Fortaleza-Pinto.Martins.Intl.AP.817580_INMET.epw'
]
cond
=
(
df
.
arquetipos
.
str
.
startswith
(
'MH-POS'
)
&
df
.
cidades
.
isin
(
col_epws
))
cond
=
cond
|
(
df
.
arquetipos
.
str
.
startswith
(
'UT-POS'
)
&
df
.
cidades
.
isin
(
col_epws
))
df
=
df
.
loc
[
cond
].
reset_index
(
drop
=
True
)
#
indices = df.index.values
#
np.random.seed(0)
#
np.random.shuffle(indices)
#
indices = np.array_split(indices, size)[rank]
#
df = df.loc[indices]
indices
=
df
.
index
.
values
np
.
random
.
seed
(
0
)
np
.
random
.
shuffle
(
indices
)
indices
=
np
.
array_split
(
indices
,
size
)[
rank
]
df
=
df
.
loc
[
indices
]
print
(
'Número de casos:'
,
df
.
shape
[
0
])
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help