Skip to content

Commit 2ec7ae7

Browse files
Addressing Monte-Carlo suggestion: INPUT variograms NREL#197. Variograms now created. Also addressed issue where multiple processes were writing to the output file at the same time and corrupting parts of it using File Locking. The result is slower, but the results are better. Also, I forgot to close the plot and it was causing a memory leak.
1 parent 8beb7c4 commit 2ec7ae7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/geophires_monte_carlo/MC_GeoPHIRES3.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ def main(command_line_args=None):
531531
if html_path:
532532
save_path = Path(Path(html_path).parent, f'{fname}.png')
533533
plt.savefig(save_path)
534+
plt.close()
534535
full_names.add(save_path)
535536
short_names.add(fname)
536537

@@ -566,6 +567,7 @@ def main(command_line_args=None):
566567
if html_path:
567568
save_path = Path(Path(html_path).parent, f'{fname}.png')
568569
plt.savefig(save_path)
570+
plt.close()
569571
full_names.add(save_path)
570572
short_names.add(fname)
571573
annotations = ''

0 commit comments

Comments
 (0)