compass.ocean.tests.sphere_transport.process_output.read_ncl_rgb_file

compass.ocean.tests.sphere_transport.process_output.read_ncl_rgb_file(cmap_filename)[source]

Read a .rgb file from the NCAR Command Language, and return a matplotlib colormap.

Prerequisite: Download an RGB file using the links provided by the NCL web pages, https://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml

Parameters:

cmap_filename (str) – downloaded .rgb file name

Returns:

result (matplotlib.Colormap) – colormap usable by matplotlib that matches the ncl colormap