Skip to content

Commit

Permalink
fix plotting [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
kmdeck committed Sep 11, 2024
1 parent 2f335ad commit e04af5f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions experiments/long_runs/land_region.jl
Original file line number Diff line number Diff line change
Expand Up @@ -660,15 +660,17 @@ setup_and_solve_problem(; greet = true);
# read in diagnostics and make some plots!
#### ClimaAnalysis ####
simdir = ClimaAnalysis.SimDir(outdir)
short_names = ["gpp", "ct", "lai", "swc", "si"]
short_names = ["gpp", "ct", "swc", "si"]
for short_name in short_names
var = get(simdir; short_name)
times = ClimaAnalysis.times(var)
for t in times
fig = CairoMakie.Figure(size = (800, 600))
kwargs = ClimaAnalysis.has_altitude(var) ? Dict(:z => 1) : Dict()
tmp = ClimaAnalysis.slice(var, time = t; kwargs...)
viz.heatmap2D!(fig, tmp)
CairoMakie.save(joinpath(root_path, "$(short_name)_$t.png"), fig)
if ~all(isnan.(tmp.data))
viz.heatmap2D!(fig, tmp)
CairoMakie.save(joinpath(root_path, "$(short_name)_$t.png"), fig)
end
end
end

0 comments on commit e04af5f

Please sign in to comment.