Skip to content

Commit 714ff9e

Browse files
authored
Merge pull request #3941 from CliMA/fix-ci-plot-align
Reorder `make_plots` for `EDMFSpherePlots` and make comparison plot column widths equal
2 parents 9793487 + a95332b commit 714ff9e

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

.buildkite/ci_driver.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# (See also Base.type_limited_string_from_context())
66
redirect_stderr(IOContext(stderr, :stacktrace_types_limited => Ref(false)))
77
# PrecompileCI is a local package that forces commonly used methods to be precompiled,
8-
# allowing them to be reused between Julia sessions.
9-
# To load in the precompiled methods, run `using PrecompileCI` before loading ClimaAtmos.
8+
# allowing them to be reused between Julia sessions.
9+
# To load in the precompiled methods, run `using PrecompileCI` before loading ClimaAtmos.
1010
# To see what methods are precompiled, open julia: `julia --project=.buildkite/PrecompileCI`
1111
# and run `using PrecompileTools; PrecompileTools.verbose[] = true; include(".buildkite/PrecompileCI/src/PrecompileCI.jl")`
1212
haskey(ENV, "CI") && (using PrecompileCI)

post_processing/ci_plots.jl

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ function make_plots_generic(
227227
for (col, path) in enumerate(output_path)
228228
# CairoMakie seems to use this Label to determine the width of the figure.
229229
# Here we normalize the length so that all the columns have the same width.
230-
LABEL_LENGTH = 40
230+
LABEL_LENGTH = 50
231231
normalized_path =
232232
lpad(path, LABEL_LENGTH + 1, " ")[(end - LABEL_LENGTH):end]
233233

234-
CairoMakie.Label(fig[0, col], path)
234+
CairoMakie.Label(fig[0, col], normalized_path)
235235
end
236236
end
237237
return fig
@@ -1606,25 +1606,20 @@ function make_plots(::EDMFSpherePlots, output_paths::Vector{<:AbstractString})
16061606

16071607
short_name_tuples = pair_edmf_names(short_names)
16081608

1609-
# The hierarchy is:
1610-
# - A vector looping over variables
1611-
# - Containing, a vector looping over latitudes
1612-
# - Containing, tuples with one or two variables
1613-
# - Repeated for each simdir
1614-
# All of this is flattened out to be a vector of tuples (with the two gridmean/updraft
1615-
# variables)
1609+
# Create a flat sequence of variable groups iterating over variable,
1610+
# latitude, and simulation directory
16161611
var_groups_zt = vcat(
1617-
map_comparison(simdirs, short_name_tuples) do simdir, name_tuple
1618-
return [
1619-
(
1612+
[
1613+
map_comparison(simdirs, latitudes) do simdir, lat
1614+
return (
16201615
slice(
16211616
get(simdir; short_name, reduction, period),
16221617
lon = 0.0,
16231618
lat = lat,
16241619
) for short_name in name_tuple
1625-
) for lat in latitudes
1626-
]
1627-
end...,
1620+
)
1621+
end for name_tuple in short_name_tuples
1622+
]...,
16281623
)
16291624

16301625
var_groups_z = [

0 commit comments

Comments
 (0)