Skip to content

Commit

Permalink
Update land.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisRenchon committed Nov 21, 2024
1 parent 357d2bd commit a29f95f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions experiments/long_runs/land.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit a29f95f

Please sign in to comment.