Skip to content

Commit

Permalink
longruns global seasonal cycle
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AlexisRenchon committed Nov 15, 2024
1 parent e6dedef commit edee04f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion experiments/long_runs/land.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit edee04f

Please sign in to comment.