From a29f95fd1a26207231121cd1328492df793931b1 Mon Sep 17 00:00:00 2001 From: Alexandre Alexis Renchon Date: Sun, 17 Nov 2024 11:31:12 -0800 Subject: [PATCH] Update land.jl --- experiments/long_runs/land.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/experiments/long_runs/land.jl b/experiments/long_runs/land.jl index e2917239e0..15bfe0f1f7 100644 --- a/experiments/long_runs/land.jl +++ b/experiments/long_runs/land.jl @@ -415,10 +415,11 @@ mktempdir(root_path) do tmpdir for short_name in short_names var = get(simdir; short_name) times = [ClimaAnalysis.times(var)[1], ClimaAnalysis.times(var)[end]] - var_global_average = ClimaAnalysis.average_lon(ClimaAnalysis.average_lat(var)) + kwarg_z = ClimaAnalysis.has_altitude(var) ? Dict(:z => 1) : Dict() # if has altitude, take first layer + var_global_average = ClimaAnalysis.average_lon(ClimaAnalysis.average_lat(var; kwarg_z...)) fig_seasonal_cycle = CairoMakie.Figure(size = (600, 400)) ax = Axis(fig_seasonal_cycle[1,1]) - CairoMakie.lines!(ax, var_global_average.data) + CairoMakie.lines!(ax, 1:1:12, var_global_average.data) CairoMakie.save(joinpath(tmpdir, "$(short_name)_global_monthly.pdf"), fig_seasonal_cycle) for t in times fig = CairoMakie.Figure(size = (600, 400))