ORCA - plotting methods

ORCA is a tripolar ocean grid used by the NEMO ocean model and various coupled climate and weather systems. It combines a regular latitude–longitude grid in the Southern Hemisphere with a bipolar grid in the Northern Hemisphere to avoid a coordinate singularity over the ocean.

Because ORCA data is stored as a 2-D array on an irregular, curvilinear grid, different plotting methods make different trade-offs between accuracy and speed:

Method

How it works

Best for

grid_cells

Draws each cell as its true quadrilateral polygon

Seeing exact cell geometry

point_cloud

Plots a coloured marker at each cell centre

Quick inspection, sparse data

contourf

Interpolates to a regular grid then draws filled contours

Smooth, publication-quality maps

This notebook loads an ORCA grid sea surface temperature field and shows all three methods side-by-side.

[1]:
import earthkit.data as ekd

import earthkit.plots as ekp

data = ekd.from_source("sample", "orca.grib")

Shared style

We define a single Style object and reuse it across all subplots so the colour scale is identical in every panel.

[2]:
import numpy as np

style = ekp.styles.Style(levels=np.arange(14, 20.5, 0.5), colors="Spectral_r", units="celsius")

All methods side-by-side

Each subplot uses the same domain so the different cell geometries and interpolation effects are easy to compare.

Note: The first time you plot ORCA data with contourf, it is likely to take a very long time (potentially hours), as the underlying software needs to generate a large, complex matrix to do the transformation from the ORCA grid to a regular latitude-longitude grid. The resulting matrix will be cached, and it will be much faster the next time you attempt the same plot. Because this is too slow to run as part of the documentation build, the code cell below is commented out and a pre-rendered image of its output is shown instead. To reproduce the plot yourself, uncomment the code and run the cell (the first run will be slow; subsequent runs use the cache).

[3]:
# figure = ekp.Figure(rows=2, columns=2, domain=[0, 15, 35, 45])
#
# for method in ["point_cloud", "grid_cells", "contourf", "grid_points"]:
#     subplot = figure.add_map()
#     getattr(subplot, method)(data, style=style)
#     subplot.title(method)
#
# figure.coastlines()
# figure.gridlines()
#
# figure.title("Plotting ORCA grid data with various methods")
#
# figure.legend(location="right")
#
# figure.show()

Plotting ORCA grid data with various methods

What to notice

  • ``grid_cells`` shows the true ORCA cell boundaries — the curvilinear quadrilateral shapes that reflect the tripolar grid geometry.

  • ``point_cloud`` places one dot per cell centre. At this resolution the dots are close enough to fill in, but zooming out would reveal gaps.

  • ``contourf`` interpolates to a regular grid before contouring, producing a smooth result at the cost of some spatial accuracy near sharp gradients.