Skip to content

Commit

Permalink
Rename timeseries pickles
Browse files Browse the repository at this point in the history
  • Loading branch information
dzalkind committed Jan 16, 2025
1 parent ba01eba commit 18ab484
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/19_controller_test_bench/controller_testbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def main():
# Post-processing here
outputs = {}
discrete_outputs = {}
flc.post_process(summary_stats, extreme_table, DELs, Damage, case_list, dlc_generator, chan_time, inputs, discrete_inputs, outputs, discrete_outputs)
flc.post_process(summary_stats, extreme_table, DELs, Damage, case_list, case_name, dlc_generator, chan_time, inputs, discrete_inputs, outputs, discrete_outputs)

print('here')

Expand Down
8 changes: 4 additions & 4 deletions weis/aeroelasticse/openmdao_openfast.py
Original file line number Diff line number Diff line change
Expand Up @@ -2233,7 +2233,7 @@ def post_process(self, summary_stats, extreme_table, DELs, damage, case_list, dl

# Save Data
if modopt['General']['openfast_configuration']['save_timeseries']:
self.save_timeseries(chan_time)
self.save_timeseries(case_name, chan_time)

if modopt['General']['openfast_configuration']['save_iterations']:
self.save_iterations(summary_stats,DELs,discrete_outputs)
Expand Down Expand Up @@ -2816,7 +2816,7 @@ def writeCpsurfaces(self, inputs):

return file_name

def save_timeseries(self,chan_time):
def save_timeseries(self,case_name, chan_time):
'''
Save ALL the timeseries: each iteration and openfast run thereof
TODO: move this deeper into runFAST so we can clear chan_time
Expand All @@ -2827,9 +2827,9 @@ def save_timeseries(self,chan_time):
os.makedirs(save_dir, exist_ok=True)

# Save each timeseries as a pickled dataframe
for i_ts, timeseries in enumerate(chan_time):
for cn, timeseries in zip(case_name, chan_time):
output = AeroelasticOutput(timeseries, dlc=self.FAST_namingOut)
output.to_df().to_pickle(os.path.join(save_dir,self.FAST_namingOut + '_' + str(i_ts) + '.p'))
output.to_df().to_pickle(os.path.join(save_dir,cn + '.p'))

def save_iterations(self,summ_stats,DELs,discrete_outputs):
'''
Expand Down

0 comments on commit 18ab484

Please sign in to comment.