Skip to content

Commit 9cf0298

Browse files
authored
Merge pull request #4142 from CliMA/he/ci-optional-jpeg-copy-of-ci
ci: optional jpeg copy of ci summary figures
2 parents a85ba64 + 496c6f8 commit 9cf0298

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

post_processing/ci_plots.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import ClimaAnalysis.Utils: kwargs as ca_kwargs
4747

4848
import ClimaCoreSpectra: power_spectrum_2d
4949

50-
using Poppler_jll: pdfunite
50+
using Poppler_jll: pdfunite, pdftoppm
5151
import Base.Filesystem
5252
import Statistics: mean
5353

@@ -190,6 +190,7 @@ function make_plots_generic(
190190
summary_files = String[],
191191
MAX_NUM_COLS = 1,
192192
MAX_NUM_ROWS = min(4, length(vars)),
193+
save_jpeg_copy = false,
193194
kwargs...,
194195
)
195196
# When output_path is a Vector with multiple elements, this means that this function is
@@ -275,6 +276,12 @@ function make_plots_generic(
275276
run(Cmd([unite, summary_files..., output_file]))
276277
end
277278

279+
if save_jpeg_copy
280+
pdftoppm() do exe
281+
run(Cmd([exe, "-jpeg", output_file, joinpath(save_path, output_name)]))
282+
end
283+
end
284+
278285
# Cleanup
279286
Filesystem.rm.(summary_files, force = true)
280287
return output_file

0 commit comments

Comments
 (0)