From 5939ec0e09b953f9ae77547b81518a0ed8810f82 Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Wed, 27 Mar 2024 09:37:22 +0200 Subject: [PATCH 1/2] bit of cleanup --- scripts/plot_one_degree.jl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/plot_one_degree.jl b/scripts/plot_one_degree.jl index ae9c091..4ad6224 100644 --- a/scripts/plot_one_degree.jl +++ b/scripts/plot_one_degree.jl @@ -1,6 +1,6 @@ using Oceananigans, CairoMakie, GeoMakie -P = FieldTimeSeries("bgc/near_global_360_150_48_ConvectiveAdjustmentVerticalDiffusivity_fields.jld2", "P"); +P = FieldTimeSeries("bgc/near_global_360_150_48_ConvectiveAdjustmentVerticalDiffusivity_fields.jld2", "P") n = Observable(1) @@ -10,13 +10,13 @@ fig = Figure() ax = GeoAxis(fig[1, 1];title, dest = "+proj=natearth2") -xc, yc, zf = nodes(P.grid, Center(), Center(), Face()) +x, y, z = nodes(P) -hm = heatmap!(ax, xc, yc, P_plt, colorrange = (0.0001, 5), colorscale = log10) +hm = heatmap!(ax, x, y, P_plt, colorrange = (0.0001, 5), colorscale = log10) Colorbar(fig[2, 1], hm, vertical= false, label = "Phytoplankton (mmolN/m³)") -CairoMakie.record(fig, "P.mp4", 1:10:length(P.times)) do i; - n[] = i; - @info "$(n.val)"; -end \ No newline at end of file +CairoMakie.record(fig, "P.mp4", 1:10:length(P.times)) do i + n[] = i + @info "$(n.val)" +end From 98f37e731ebd035363c341779aa199f77aa9ae83 Mon Sep 17 00:00:00 2001 From: Jago Strong-Wright Date: Wed, 27 Mar 2024 17:07:34 -0400 Subject: [PATCH 2/2] Update plot_one_degree.jl --- scripts/plot_one_degree.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/plot_one_degree.jl b/scripts/plot_one_degree.jl index 4ad6224..e73fbcd 100644 --- a/scripts/plot_one_degree.jl +++ b/scripts/plot_one_degree.jl @@ -8,6 +8,8 @@ P_plt = @lift interior(P[$n], :, :, 1) fig = Figure() +title = @lift "$(prettytime(P.times[$n]))" + ax = GeoAxis(fig[1, 1];title, dest = "+proj=natearth2") x, y, z = nodes(P)