Private types and functions

Documentation for Imaginocean.jl's internal interface.

Imaginocean

Imaginocean.get_cartesian_nodes_and_verticesMethod
get_cartesian_nodes_and_vertices(grid::Union{LatitudeLongitudeGrid, OrthogonalSphericalShellGrid}, ℓx, ℓy, ℓz)

Return the cartesian coordinates of the horizontal nodes of the grid at locations ℓx, ℓy, and ℓz on the unit sphere and also the corresponding coordinates of the four vertices that determine the cell surrounding each node.

See get_lat_lon_nodes_and_vertices.

source
Imaginocean.get_latitude_verticesMethod
get_latitude_vertices(i, j, k, grid::Union{LatitudeLongitudeGrid, OrthogonalSphericalShellGrid}, ℓx, ℓy, ℓz)

Return the latitudes that correspond to the four vertices of cell i, j, k at location (ℓx, ℓy, ℓz). The first vertex is the cell's Southern-Western oneλand the rest follow in counter-clockwise order.

source
Imaginocean.get_longitude_verticesMethod
get_longitude_vertices(i, j, k, grid::Union{LatitudeLongitudeGrid, OrthogonalSphericalShellGrid}, ℓx, ℓy, ℓz)

Return the longitudes that correspond to the four vertices of cell i, j, k at location (ℓx, ℓy, ℓz). The first vertex is the cell's Southern-Western one and the rest follow in counter-clockwise order.

source
Imaginocean.lat_lon_to_cartesianMethod
lat_lon_to_cartesian(longitude, latitude; radius=1)

Convert $(λ, φ) = ($longitude$,$latitude$)$ coordinates (in degrees) to cartesian coordinates $(x, y, z)$ on a sphere with radius, $R$, i.e.,

\[\begin{aligned} x &= R \cos(λ) \cos(φ), \\ y &= R \sin(λ) \cos(φ), \\ z &= R \sin(φ). \end{aligned}\]

source
Imaginocean.lat_lon_to_xMethod
lat_lon_to_x(longitude, latitude)

Convert (longitude, latitude) coordinates (in degrees) to cartesian x on the unit sphere.

source
Imaginocean.lat_lon_to_yMethod
lat_lon_to_y(longitude, latitude)

Convert (longitude, latitude) coordinates (in degrees) to cartesian y on the unit sphere.

source
Imaginocean.lat_lon_to_zMethod
lat_lon_to_z(longitude, latitude)

Convert (longitude, latitude) coordinates (in degrees) to cartesian z on the unit sphere.

source
Imaginocean.longitude_domainMethod
longitude_domain(longitude; lower_limit = -180)

Bring longitude to domain [lower_limit, lower_limit + 360] (in degrees). By default, lower_limit = -180 implying longitude domain $[-180, 180]$.

Examples

julia> using Imaginocean: longitude_domain

julia> longitude_domain(400)
40

julia> longitude_domain(-50)
-50

julia> longitude_domain(-50; lower_limit=0)
310
source
MakieCore.convert_argumentsMethod
Makie.convert_arguments(P::Type{<:AbstractPlot}, field::Field, k_index::Int)

Convert an Oceananigans.jl Field with non-flat horizontal dimensions at vertical index k_index to arguments that can be plotted as a surface in Makie.jl.

source