Plot basic things

This guide is organized as follows

In this guide we will focus on how-to plot things using AIBECS' built-in recipes for Plots.jl. These recipes are implemented using RecipesBase.jl, which are explained in Plots.jl's documentation.

Throughout we will use the OCIM2 grid and we will create a dummy tracer as a function of location to showcase each plot, just for the sake of the examples herein.

using AIBECS, Plots
grd, _ = OCIM2.load()
dummy = cosd.(latvec(grd))
200160-element Array{Float64,1}:
 0.3221204417984906 
 0.3546048870425357 
 0.38666674294141884
 0.41826780077556525
 0.44937040096716135
 0.4799374779597864 
 0.5099326043901359 
 0.5393200344991993 
 0.5680647467311559 
 0.5961324854692254 
 ⋮                  
 0.8854560256532099 
 0.8688879687250066 
 0.9154080085253663 
 0.9009688679024191 
 0.8854560256532099 
 0.8688879687250066 
 0.9154080085253663 
 0.9009688679024191 
 0.8854560256532099 

Horizontal plots

Horizontal slice

The most common thing you plot after a simulation of marine tracers is a horizontal slice. In this case, you just need to provide the tracer (dummy here), the grid object grd, and the depth at which you want to plot.

horizontalslice(dummy, grd, depth=10)
50 100 150 200 250 300 350 -60 -30 0 30 60 Longitude (°) Latitude (°) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

You can supply units for the depth at which you want to see the horizontal slice.

horizontalslice(dummy, grd, depth=10u"m")
50 100 150 200 250 300 350 -60 -30 0 30 60 Longitude (°) Latitude (°)