Skip to content

Commit

Permalink
Merge pull request #152 from CliMA/aj/slow_plot
Browse files Browse the repository at this point in the history
Try to speed up OSX CI plots
  • Loading branch information
trontrytel authored Apr 24, 2024
2 parents 707ea67 + de22bbe commit e34c7fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion test/experiments/KiD_driver/run_KiD_simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function run_KiD_simulation(::Type{FT}, opts) where {FT}
z_centers = parent(CC.Fields.coordinate_field(space))
plot_final_aux_profiles(z_centers, aux, precip, output = plot_folder)
plot_animation(z_centers, solver, aux, moisture, precip, K1D, output = plot_folder)
#plot_timeheight(string("experiments/KiD_driver/", output_folder, "/Output.nc"), output = plot_folder)
plot_timeheight(string("experiments/KiD_driver/", output_folder, "/Output.nc"), output = plot_folder)
end

return solver
Expand Down
24 changes: 12 additions & 12 deletions test/plotting_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ function plot_timeheight(nc_data_file; output = "output")
mkpath(path)

ds = NC.NCDataset(joinpath(@__DIR__, nc_data_file))
t_plt = collect(ds.group["profiles"]["t"])
z_plt = collect(ds.group["profiles"]["zc"])
q_tot_plt = collect(ds.group["profiles"]["q_tot"])
q_liq_plt = collect(ds.group["profiles"]["q_liq"])
q_ice_plt = collect(ds.group["profiles"]["q_ice"])
q_rai_plt = collect(ds.group["profiles"]["q_rai"])
q_sno_plt = collect(ds.group["profiles"]["q_sno"])
t_plt = Array(ds.group["profiles"]["t"])
z_plt = Array(ds.group["profiles"]["zc"])
q_tot_plt = Array(ds.group["profiles"]["q_tot"])
q_liq_plt = Array(ds.group["profiles"]["q_liq"])
q_ice_plt = Array(ds.group["profiles"]["q_ice"])
q_rai_plt = Array(ds.group["profiles"]["q_rai"])
q_sno_plt = Array(ds.group["profiles"]["q_sno"])
p1 = Plots.heatmap(t_plt, z_plt, q_tot_plt .* 1e3, title = "q_tot [g/kg]", xlabel = "time [s]", ylabel = "z [m]")
p2 = Plots.heatmap(t_plt, z_plt, q_liq_plt .* 1e3, title = "q_liq [g/kg]", xlabel = "time [s]", ylabel = "z [m]")
p3 = Plots.heatmap(t_plt, z_plt, q_ice_plt .* 1e3, title = "q_ice [g/kg]", xlabel = "time [s]", ylabel = "z [m]")
Expand All @@ -192,11 +192,11 @@ function plot_timeheight_no_ice_snow(nc_data_file; output = "output")
mkpath(path)

ds = NC.NCDataset(joinpath(@__DIR__, nc_data_file))
t_plt = collect(ds.group["profiles"]["t"])
z_plt = collect(ds.group["profiles"]["zc"])
q_tot_plt = collect(ds.group["profiles"]["q_tot"])
q_liq_plt = collect(ds.group["profiles"]["q_liq"])
q_rai_plt = collect(ds.group["profiles"]["q_rai"])
t_plt = Array(ds.group["profiles"]["t"])
z_plt = Array(ds.group["profiles"]["zc"])
q_tot_plt = Array(ds.group["profiles"]["q_tot"])
q_liq_plt = Array(ds.group["profiles"]["q_liq"])
q_rai_plt = Array(ds.group["profiles"]["q_rai"])
p1 = Plots.heatmap(t_plt, z_plt, q_tot_plt .* 1e3, title = "q_tot [g/kg]", xlabel = "time [s]", ylabel = "z [m]")
p2 = Plots.heatmap(t_plt, z_plt, q_liq_plt .* 1e3, title = "q_liq [g/kg]", xlabel = "time [s]", ylabel = "z [m]")
p3 = Plots.heatmap(t_plt, z_plt, q_rai_plt .* 1e3, title = "q_rai [g/kg]", xlabel = "time [s]", ylabel = "z [m]")
Expand Down

0 comments on commit e34c7fa

Please sign in to comment.