Skip to content

Commit

Permalink
Merge pull request #5 from OceanBioME/ncc/clean
Browse files Browse the repository at this point in the history
Bit of cleanup
  • Loading branch information
navidcy authored Mar 28, 2024
2 parents 748263d + 98f37e7 commit e05d6e4
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions scripts/plot_one_degree.jl
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
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)

P_plt = @lift interior(P[$n], :, :, 1)

fig = Figure()

title = @lift "$(prettytime(P.times[$n]))"

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
CairoMakie.record(fig, "P.mp4", 1:10:length(P.times)) do i
n[] = i
@info "$(n.val)"
end

0 comments on commit e05d6e4

Please sign in to comment.