Skip to content

Commit

Permalink
Merge pull request #3021 from CliMA/gb/fix_plots
Browse files Browse the repository at this point in the history
Fix CI plots for moist baroclinic wave
  • Loading branch information
Sbozzolo authored May 17, 2024
2 parents fb7114a + afead5e commit 28bdfe2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ dt_save_state_to_disk: "2days"
regression_test: true
initial_condition: "MoistBaroclinicWave"
dt: "450secs"
t_end: "10days"
deep_atmosphere: true
moist: "equil"
diagnostics:
- short_name: [pfull, wa, va, rv, hus]
- short_name: [pfull, wa, va, rv, hus, ke]
period: 1days
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ dt_save_state_to_disk: "2days"
regression_test: true
initial_condition: "MoistBaroclinicWave"
dt: "450secs"
t_end: "10days"
moist: "equil"
diagnostics:
- short_name: [pfull, wa, va, rv, hus]
- short_name: [pfull, wa, va, rv, hus, ke]
period: 1days
22 changes: 18 additions & 4 deletions post_processing/ci_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -666,19 +666,33 @@ function make_plots(
make_plots_generic(output_paths, vars, z = 1500)
end

MoistBaroWavePlots = Union{
Val{:sphere_baroclinic_wave_rhoe_equilmoist},
Val{:sphere_baroclinic_wave_rhoe_equilmoist_deepatmos},
}

function make_plots(
::Val{:sphere_baroclinic_wave_rhoe_equilmoist},
::Val{:sphere_baroclinic_wave_rhoe_equilmoist_deepatmos},
::MoistBaroWavePlots,
output_paths::Vector{<:AbstractString},
)
simdirs = SimDir.(output_paths)
short_names, reduction = ["pfull", "va", "wa", "rv", "hus"], "inst"
short_names_spectra = ["ke"]
vars = map_comparison(simdirs, short_names) do simdir, short_name
return get(simdir; short_name, reduction)
return slice(get(simdir; short_name, reduction), time = 10days)
end
make_plots_generic(output_paths, vars, z = 1500, time = LAST_SNAP)
vars_spectra =
map_comparison(simdirs, short_names_spectra) do simdir, short_name
compute_spectrum(
slice(get(simdir; short_name, reduction), time = 10days),
)
end
vars = vcat(vars..., vars_spectra...)

make_plots_generic(output_paths, vars, z = 1500)
end


function make_plots(
::Val{:sphere_baroclinic_wave_rhoe_equilmoist_expvdiff},
output_paths::Vector{<:AbstractString},
Expand Down

0 comments on commit 28bdfe2

Please sign in to comment.