From edee04f6d86f8541aad784b218b12826772e1c40 Mon Sep 17 00:00:00 2001 From: AlexisRenchon Date: Fri, 15 Nov 2024 10:22:32 -0800 Subject: [PATCH] longruns global seasonal cycle We currently plot global maps for initial and final time steps (months) of the long runs. In this commit, we add a global seasonal plot. This plot takes the monthly global average of each output variables and plot them as a line, the simulation is one year long so there is 12 data points. --- experiments/long_runs/land.jl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/experiments/long_runs/land.jl b/experiments/long_runs/land.jl index 8fb0daf610..16a4800b56 100644 --- a/experiments/long_runs/land.jl +++ b/experiments/long_runs/land.jl @@ -376,7 +376,12 @@ end function setup_and_solve_problem(; greet = false) t0 = 0.0 - tf = 60 * 60.0 * 24 * 365 + seconds = 1.0 + minutes = 60seconds + hours = 60minutes + days = 24hours + years = 365days + tf = 1years Δt = 450.0 nelements = (101, 15) if greet @@ -410,6 +415,10 @@ 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)) + fig_seasonal_cycle = CairoMakie.Figure(size = (600, 400)) + CairoMakie.lines!(fig_seasonal_cycle, var_global_average) + CairoMakie.save(joinpath(tmpdir, "$(short_name)_global_monthly.pdf"), fig_seasonal_cycle) for t in times fig = CairoMakie.Figure(size = (600, 400)) kwargs = ClimaAnalysis.has_altitude(var) ? Dict(:z => 1) : Dict()