@@ -1494,112 +1494,24 @@ function make_plots(
14941494 sim_type:: Union {
14951495 EDMFBoxPlots,
14961496 DiagEDMFBoxPlotsWithPrecip,
1497- },
1498- output_paths:: Vector{<:AbstractString} ,
1499- )
1500- simdirs = SimDir .(output_paths)
1501-
1502- if sim_type isa DiagEDMFBoxPlotsWithPrecip
1503- precip_names = (" husra" , " hussn" , " husraup" , " hussnup" )
1504- else
1505- precip_names = ()
1506- end
1507-
1508- short_names = [
1509- " wa" ,
1510- " waup" ,
1511- " ta" ,
1512- " taup" ,
1513- " hus" ,
1514- " husup" ,
1515- " arup" ,
1516- " tke" ,
1517- " ua" ,
1518- " thetaa" ,
1519- " thetaaup" ,
1520- " ha" ,
1521- " haup" ,
1522- " hur" ,
1523- " hurup" ,
1524- " lmix" ,
1525- " cl" ,
1526- " clw" ,
1527- " clwup" ,
1528- " cli" ,
1529- " cliup" ,
1530- precip_names... ,
1531- ]
1532- reduction = " inst"
1533-
1534- available_periods = ClimaAnalysis. available_periods (
1535- simdirs[1 ];
1536- short_name = short_names[1 ],
1537- reduction,
1538- )
1539- # choose the shortest available period
1540- available_periods = collect (available_periods) # ensure vector for indexing
1541- period = available_periods[argmin (CA. time_to_seconds .(available_periods))]
1542-
1543- short_name_tuples = pair_edmf_names (short_names)
1544- var_groups_zt =
1545- map_comparison (simdirs, short_name_tuples) do simdir, name_tuple
1546- return [
1547- slice (
1548- get (simdir; short_name, reduction, period),
1549- x = 0.0 ,
1550- y = 0.0 ,
1551- ) for short_name in name_tuple
1552- ]
1553- end
1554-
1555- var_groups_z = [
1556- ([slice (v, time = LAST_SNAP) for v in group]. .. ,) for
1557- group in var_groups_zt
1558- ]
1559-
1560- tmp_file = make_plots_generic (
1561- output_paths,
1562- output_name = " tmp" ,
1563- var_groups_z;
1564- plot_fn = plot_edmf_vert_profile!,
1565- MAX_NUM_COLS = 2 ,
1566- MAX_NUM_ROWS = 4 ,
1567- )
1568-
1569- make_plots_generic (
1570- output_paths,
1571- vcat (var_groups_zt... ),
1572- plot_fn = plot_parsed_attribute_title!,
1573- summary_files = [tmp_file],
1574- MAX_NUM_COLS = 2 ,
1575- MAX_NUM_ROWS = 4 ,
1576- )
1577- end
1578-
1579- function make_plots (
1580- sim_type:: Union {
15811497 EDMFColumnPlots,
15821498 EDMFColumnPlotsWithPrecip,
15831499 },
15841500 output_paths:: Vector{<:AbstractString} ,
15851501)
15861502 simdirs = SimDir .(output_paths)
15871503
1588- if sim_type isa EDMFColumnPlotsWithPrecip
1504+ # Determine if this is a box or column type
1505+ is_box = sim_type isa Union{EDMFBoxPlots, DiagEDMFBoxPlotsWithPrecip}
1506+
1507+ # Determine precipitation names based on type
1508+ if sim_type isa DiagEDMFBoxPlotsWithPrecip
1509+ precip_names = (" husra" , " hussn" , " husraup" , " hussnup" )
1510+ elseif sim_type isa EDMFColumnPlotsWithPrecip
15891511 if sim_type isa Val{:prognostic_edmfx_rico_column_2M }
15901512 precip_names = (
1591- " husra" ,
1592- " hussn" ,
1593- " husraup" ,
1594- " hussnup" ,
1595- " husraen" ,
1596- " hussnen" ,
1597- " cdnc" ,
1598- " ncra" ,
1599- " cdncup" ,
1600- " ncraup" ,
1601- " cdncen" ,
1602- " ncraen" ,
1513+ " husra" , " hussn" , " husraup" , " hussnup" , " husraen" , " hussnen" ,
1514+ " cdnc" , " ncra" , " cdncup" , " ncraup" , " cdncen" , " ncraen" ,
16031515 )
16041516 else
16051517 precip_names =
@@ -1610,27 +1522,9 @@ function make_plots(
16101522 end
16111523
16121524 short_names = [
1613- " wa" ,
1614- " waup" ,
1615- " ta" ,
1616- " taup" ,
1617- " hus" ,
1618- " husup" ,
1619- " arup" ,
1620- " tke" ,
1621- " ua" ,
1622- " thetaa" ,
1623- " thetaaup" ,
1624- " ha" ,
1625- " haup" ,
1626- " hur" ,
1627- " hurup" ,
1628- " lmix" ,
1629- " cl" ,
1630- " clw" ,
1631- " clwup" ,
1632- " cli" ,
1633- " cliup" ,
1525+ " wa" , " waup" , " ta" , " taup" , " hus" , " husup" , " arup" , " tke" , " ua" ,
1526+ " thetaa" , " thetaaup" , " ha" , " haup" , " hur" , " hurup" , " lmix" ,
1527+ " cl" , " clw" , " clwup" , " cli" , " cliup" ,
16341528 precip_names... ,
16351529 ]
16361530 reduction = " inst"
@@ -1647,9 +1541,13 @@ function make_plots(
16471541 short_name_tuples = pair_edmf_names (short_names)
16481542 var_groups_zt =
16491543 map_comparison (simdirs, short_name_tuples) do simdir, name_tuple
1650- return [
1651- get (simdir; short_name, reduction, period) for short_name in name_tuple
1652- ]
1544+ vars = map (short_name -> get (simdir; short_name, reduction, period), name_tuple)
1545+ # For box types, slice to a point (x=0, y=0)
1546+ if is_box
1547+ return map (var -> slice (var, x = 0.0 , y = 0.0 ), vars)
1548+ else
1549+ return vars
1550+ end
16531551 end
16541552
16551553 var_groups_z = [
0 commit comments