# Map Viewer (/catalog/map-viewer)

Explore gridded Zarr datasets from the catalog on an interactive map.

The Map Viewer draws a gridded dataset from the Data Catalog on a map, such as a weather forecast
or a land-cover grid. You pick a variable, step through time, read the value at any point, and
change the colors, without writing code.

<Callout title="Prerequisite">
  The **Use map viewer** app permission (`can_use_map_viewer`), and **Select** on the dataset.
  Without the permission, the page shows **Not authorized**. See the
  [permissions reference](/access/permissions-reference) and
  [data permissions](/catalog/data-permissions).
</Callout>

## Open the Map Viewer

- In the portal sidebar, select **Data Science ▸ Map Viewer**, then pick a dataset under
  **Dataset** in the settings panel.
- From the Data Catalog, open a generic table stored as Zarr and select **Open in Map Viewer** in
  its header. In the [data catalog rail](/catalog/browsing#open-the-tree-next-to-any-app), the same
  item is on the table's right-click menu.

The address in your browser keeps the dataset and your settings, so you can bookmark a view or send
the link to someone who has access to the same data.

## What it can show

The Map Viewer lists the catalog's generic tables that you can read, are stored as Zarr (version 2
or 3), and are gridded:

- with latitude and longitude coordinates, or
- with projected x and y coordinates and a declared coordinate reference system (`proj:code`,
  `proj:wkt2` or a CF grid mapping).

Each variable's last two dimensions must be those two coordinates. Any other dimensions, such as
time or height, become controls in the viewer. A dataset can hold one Zarr store, or one per folder
for each forecast run or version.

A dataset that is too large to draw, or does not meet these rules, is still listed but greyed out,
with the reason under its name. The same reason appears on a greyed-out **Open in Map Viewer**
button in the catalog. If none of the datasets you can see qualify, the viewer says **No map
datasets yet**.

To store a Zarr dataset in the catalog from a notebook, see
[files, blobs and Zarr arrays](/notebooks/files-and-arrays).

## Pick what to show

The **Map settings** panel on the left has three sections. Its **Layer** section picks the data:

- **Dataset**: the map datasets you can read, grouped by warehouse if you have more than one.
- **Run** or **Version**: shown when the dataset holds several. The newest run is marked
  **latest**.
- **Variable**: the variable to draw.
- A control for each other dimension, such as height or ensemble member.

## Step through time

When the variable has more than one time step (or, without a time dimension, more than one step
along another dimension), a bar at the bottom of the map steps through it:

| Control                 | Keyboard |
| ----------------------- | -------- |
| **Previous step**       | `←`      |
| **Play** / **Pause**    | `Space`  |
| **Next step**           | `→`      |

Drag the slider to jump to a step. The label beside it shows the step's time or value.

## Read the value at a point

Click the map to read the value at that point, with its coordinates. When there are several steps,
a small chart shows the value at that point across all of them: hover it to read a step, click it
to jump there. For a large dataset the chart waits until you select **Load series at this point**,
which shows how much data it will download.

Press `Esc`, or select **Clear point**, to remove the readout.

## Change the colors

The **Colors** section sets how values become colors. The viewer picks a starting colormap and
value range from the variable's units and values.

- **Colormap**: a preset such as Viridis, Turbo or Precipitation, and a button to reverse it.
- Edit the color ramp directly: click it to add a stop, drag a stop to move it, or select a stop to
  set its color, transparency (alpha) and value, or to delete it. A button resets the ramp to the
  preset.
- **Min** and **Max**: the value range the colors span. A button resets it to the automatic range.
- **Scale**: **Linear** or **Log**.
- **Opacity**: how transparent the data layer is.

A variable that holds categories, such as land-cover classes, shows a legend of **Classes**, one
color per class, instead of a continuous ramp.

## Change the map

The **Map** section sets the base map:

- **Projection**: **Mercator** or **Globe**.
- **Borders and coastlines**: show or hide them over the data.
- The buttons at the top right **Zoom in**, **Zoom out**, and **Zoom to data**.

Hide the settings panel with the button in its header. A small legend then stays on the map; select
it to bring the panel back.