Skip to content

Commit

Permalink
Merge pull request #2704 from CliMA/tc/tilted_bbl
Browse files Browse the repository at this point in the history
Improves plotting in tilted bottom boundary layer example
  • Loading branch information
tomchor committed Aug 22, 2022
2 parents 32dbcb9 + 263eb48 commit ea6826f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions examples/tilted_bottom_boundary_layer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,15 @@ xv, yv, zv = nodes(V)

ds = NCDataset(simulation.output_writers[:fields].filepath, "r")

fig = Figure(resolution = (800, 440))
fig = Figure(resolution = (800, 600))

axis_kwargs = (xlabel = "Along-slope distance",
ylabel = "Across-slope distance",
aspect = AxisAspect(Lx / Lz),
limits = ((0, Lx), (0, Lz)))
axis_kwargs = (xlabel = "Across-slope distance (x)",
ylabel = "Slope-normal\ndistance (z)",
limits = ((0, Lx), (0, Lz)),
)

ax_ω = Axis(fig[2, 1]; title = "y-vorticity", axis_kwargs...)
ax_v = Axis(fig[3, 1]; title = "Along-slope velocity", axis_kwargs...)
ax_ω = Axis(fig[2, 1]; title = "Along-slope vorticity", axis_kwargs...)
ax_v = Axis(fig[3, 1]; title = "Along-slope velocity (v)", axis_kwargs...)

n = Observable(1)

Expand All @@ -227,15 +227,15 @@ Colorbar(fig[3, 2], hm_v; label = "m s⁻¹")

times = collect(ds["time"])
title = @lift "t = " * string(prettytime(times[$n]))
fig[1, :] = Label(fig, title, textsize=24, tellwidth=false)
fig[1, :] = Label(fig, title, textsize=20, tellwidth=false)

# Finally, we record a movie.

frames = 1:length(times)

record(fig, "tilted_bottom_boundary_layer.mp4", frames, framerate=12) do i
msg = string("Plotting frame ", i, " of ", frames[end])
print(msg * " \r")
if i%5 == 0 print(msg * " \r") end
n[] = i
end
nothing #hide
Expand Down

0 comments on commit ea6826f

Please sign in to comment.