Skip to content

Commit e8aed40

Browse files
committed
Change order of iteration in make_plots for EDMFSpherePlots
1 parent 086bf00 commit e8aed40

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

post_processing/ci_plots.jl

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,25 +1615,20 @@ function make_plots(::EDMFSpherePlots, output_paths::Vector{<:AbstractString})
16151615

16161616
short_name_tuples = pair_edmf_names(short_names)
16171617

1618-
# The hierarchy is:
1619-
# - A vector looping over variables
1620-
# - Containing, a vector looping over latitudes
1621-
# - Containing, tuples with one or two variables
1622-
# - Repeated for each simdir
1623-
# All of this is flattened out to be a vector of tuples (with the two gridmean/updraft
1624-
# variables)
1618+
# Create a flat sequence of variable groups iterating over variable,
1619+
# latitude, and simulation directory
16251620
var_groups_zt = vcat(
1626-
map_comparison(simdirs, short_name_tuples) do simdir, name_tuple
1627-
return [
1628-
(
1621+
[
1622+
map_comparison(simdirs, latitudes) do simdir, lat
1623+
return (
16291624
slice(
16301625
get(simdir; short_name, reduction, period),
16311626
lon = 0.0,
16321627
lat = lat,
16331628
) for short_name in name_tuple
1634-
) for lat in latitudes
1635-
]
1636-
end...,
1629+
)
1630+
end for name_tuple in short_name_tuples
1631+
]...,
16371632
)
16381633

16391634
var_groups_z = [

0 commit comments

Comments
 (0)