Install

ClimCanvas is open-source software published on GitHub (repository ClimCanvas/ClimCanvas). This page covers the requirements, installing the app itself, the setup for remote environments, and the license and citation.

1. Requirements

1.1 Required Python libraries

ClimCanvas is developed and tested with Python 3.12. The dependencies are listed below; they can be installed together from requirements.txt when you install the app.

LibraryRole
streamlitWeb UI framework (the interface in the browser)
xarrayReading and computing on netCDF data
netCDF4netCDF file I/O (backend for xarray)
numpyFoundation for numerical computation
pandasHandling of time and tabular data
matplotlibPlotting engine
cartopyMap projections (drawing horizontal maps)
scipyNumerical routines such as interpolation
cftimeTime handling for non-standard calendars (360-day calendar etc.)
nc-time-axismatplotlib axis support for cftime times
daskLazy loading of large data
pytestDevelopment only — needed only to run the tests

1.2 Optional extras

ClimCanvas works without the following. Add them as needed.

External colormaps

Supports the colormap collections widely used in oceanography and climate science: cmocean, cmcrameri and cmaps (NCL compatible). Only the installed packages are detected automatically at startup and appear among the colormap choices. When one is used, the corresponding import is added automatically to the generated Python script.

$ pip install cmocean cmcrameri cmaps

Video output (ffmpeg)

An external command used for MP4 output of animations (not needed for GIF output). When ffmpeg is found on PATH, the MP4 option appears in the UI.

$ brew install ffmpeg # macOS (Homebrew)
$ sudo apt install ffmpeg # Ubuntu / Debian
$ conda install -c conda-forge ffmpeg # conda environment

1.3 Setting up a Python environment

ClimCanvas is a visualization tool, and it assumes that users analyze their data in Python beforehand — that is, you already have your own Python environment. It does not matter whether that environment is a shared one or a conda / venv environment you created yourself. Add the dependencies (1.1) to the environment you use for everyday analysis and you can use it as is.

1.3.1 Adding to an existing virtual environment

Activate that environment, then install from the requirements.txt bundled with the app (the location of the app, $IDIR/climcanvas, is explained in 2.1). In a conda environment, you may instead install the same package list as in the conda create below with conda install -c conda-forge (cartopy is most reliably installed from conda-forge).

$ conda activate env_name # your everyday analysis environment
$ pip install -r $IDIR/climcanvas/requirements.txt

1.3.2 Creating a new virtual environment

An example of creating a new environment for ClimCanvas. Because cartopy depends on geographic libraries (GEOS and PROJ), installing everything from conda-forge is the most reliable way. "proj<9.8" is a temporary pin that avoids a known cartopy problem (coastlines shifted in latitude when combined with PROJ 9.8); it can be removed once the cartopy fix is released.

$ conda create -n climcanvas -c conda-forge python=3.12 xarray netcdf4 numpy pandas matplotlib cartopy "proj<9.8" scipy cftime nc-time-axis dask streamlit
$ conda activate climcanvas

With the environment.yml bundled with the app, you can create an environment with the tested set of versions (including the pin above) in a single command.

$ conda env create -f environment.yml
$ conda activate climcanvas

2. Installing the app

ClimCanvas is not a package that is integrated into a Python environment (via pip install); installing it simply means placing a directory anywhere you like.

There are three forms of installation, and they can be combined (for example, keeping a clone of your own on a server that already has a shared installation by the administrator). Port protection in a remote environment (3.2) works regardless of where the code is located, so the safety is the same in every form.

WhereWhoSections to read
Your own PCYou2.1
Remote serverYou2.1 + 3.1 + 3.3
Remote serverAdministrator2.2 + 3.1 + 3.2

2.1 Installing it yourself

The steps are the same on your own PC and on a server. Once a Python environment with the dependencies (1.3) is ready, you only need to place the app to start it. Just clone the GitHub repository (ClimCanvas/ClimCanvas).

# Move to the installation directory (called $IDIR below)
$ cd $IDIR
$ git clone https://github.com/ClimCanvas/ClimCanvas.git climcanvas
$ cd climcanvas
$ conda activate env_name # the environment from 1.3
$ streamlit run app.py

From here on, the app lives in $IDIR/climcanvas (the directory containing app.py = $IDIR/climcanvas). The trailing climcanvas in git clone is the name of the target directory; if omitted, it becomes ClimCanvas (capitalized). This site consistently uses the lowercase climcanvas.

Using a specific version: versions are selected by tag (such as v1.00). To reproduce a version you used before, for example, clone with the tag name given to --branch.

# Get v1.00 (tag name after --branch)
$ cd $IDIR
$ git clone --branch v1.00 https://github.com/ClimCanvas/ClimCanvas.git climcanvas

Updating: a normal clone (main) is brought to the latest version with git pull. A clone made with a tag is not updated with git pull; fetch the tags again and then switch.

# Bring a normal clone to the latest version
$ cd $IDIR/climcanvas
$ git pull
 
# Switch a clone made with a tag to another version (e.g. v1.01)
$ cd $IDIR/climcanvas
$ git fetch --tags
$ git checkout v1.01

Without git: download the Source code (zip) of the version from the "Tags" page on GitHub, extract it, and place the directory as $IDIR/climcanvas. To update, extract the zip of the new version and replace the directory.

2.2 Installation by an administrator (shared installation on a server)

On a server used by several people, a single shared installation by the administrator is easier both to manage and to keep secure. The steps are the same as in 2.1; only the placement differs.

3. Setup for remote environments

These are the settings for placing the app on a server and using it remotely. They do not depend on whether you or an administrator installed it (2.1 / 2.2). The ideas in 3.1 apply to all remote use. 3.2 is an additional setup done by the administrator when several people use the server and data must be separated between users; 3.3 is the setup done by each user (the deployment mode in config.toml and the range of data that can be opened) and the launch.

3.1 Background: how ClimCanvas approaches security

ClimCanvas itself has no login feature; by design, protection is left to the mechanisms of the OS. The recommended configuration is "each user starts their own ClimCanvas from their own SSH account", resting on the following three pillars.

All of this can be done by each user, so no administrator work is required.

3.2 What the server administrator does: assigning and protecting a port per user

The configuration above leaves one hole that the OS cannot close. 127.0.0.1 blocks connections from outside the server, but it has no effect on other legitimate users who can log in to the same server over SSH. Streamlit has no authentication, so if someone manages to connect to another person's ClimCanvas by trying port numbers, they can read and write files with the privileges of the person who started it. In an environment where it is acceptable for members with accounts to see each other's data, this is fine as it is; but when data must be separated between users, the administrator (root) sets up firewall owner matching. This locks each port so that only the user it was assigned to may connect, disabling port probing by other users altogether.

The bundled scripts (scripts/server/) combine port assignment and application of the protection rules into a single command (for Linux servers).

# First time only: install the admin command
$ sudo install -m 0755 scripts/server/climcanvas-ports.sh /usr/local/bin/climcanvas-ports
 
# Per user: port assignment + protection rules, done in one command
$ sudo climcanvas-ports assign userA
$ sudo climcanvas-ports assign userB
 
# List and remove assignments
$ sudo climcanvas-ports list
$ sudo climcanvas-ports remove userA

Making the rules persistent (surviving a server reboot)

The applied rules exist only in kernel memory and are lost when the server reboots (the registry and the generated file remain). So set up, once, a mechanism that reloads the generated file /etc/climcanvas/climcanvas.nft at boot. On Debian / Ubuntu, nftables.service loads /etc/nftables.conf with nft -f at boot, so adding one include line there is enough.

# ① Append one include line to the end of the configuration file (edit as root)
$ sudo sh -c 'echo include \"/etc/climcanvas/climcanvas.nft\" >> /etc/nftables.conf'
 
# ② Enable the nftables service at boot
$ sudo systemctl enable nftables
 
# ③ Check: syntax check → load → are the rules in place?
$ sudo nft -c -f /etc/nftables.conf
$ sudo systemctl restart nftables
$ sudo nft list table inet climcanvas

3.3 What the user does

3.3.1 Setting ~/.climcanvas/config.toml

User-side settings are written in ~/.climcanvas/config.toml in your home directory on the server. Refer to the configuration file details and edit three items: allowed_dirs, session_dirs and mode. For remote use, first set mode = "remote". The ClimCanvas UI then changes to the one for remote use. If left unset, the display is always the one for local use. Specifically, with "remote" the blue session tabs read "From the server" / "To the server" and the banner for the session being edited reads "Editing session '…' saved on the server", so that the server side and the local PC side are harder to confuse as the save destination (see saving and restoring work in progress (sessions)).

# ~/.climcanvas/config.toml (server side). Switch the display to remote use
mode = "remote"

3.3.2 Setting where sessions are saved

Next, set the directories where work in progress (sessions) is saved. They become the choices of "Destination directory" in the UI. If unset, ~/.climcanvas/sessions is the only choice.

# ~/.climcanvas/config.toml (server side). Specify where sessions are saved
session_dirs = ["~/.climcanvas/sessions", "~/projects/exp2026/sessions"]

3.3.3 Setting the directories allowed for loading data

In remote use, the "Browse..." button in the sidebar cannot be used when you open netCDF files from the browser. This button opens the OS file dialog, but the dialog opens on the screen of the machine running the app (the server), and nothing happens in the browser on your local PC (FAQ: There is no "Browse..." button, or nothing happens when it is pressed). Therefore, in remote use, setting the directories allowed for loading data is practically mandatory, using allowed_dirs in the configuration file (configuration file details). Once set, "Browse..." is hidden, and instead "Choose from allowed directories", which lets you navigate folders and pick files within the browser, appears in "New work" and "Add a file" in the sidebar (and in the "Coordinate file (optional)" field of each file).

# ~/.climcanvas/config.toml (server side). List the directories from which netCDF files may be opened
allowed_dirs = ["/data/reanalysis", "/data/shared/nc"]

This setting is also convenient from the standpoint of data protection: the netCDF files that can be opened are limited to those under the allowed directories (any other path is an error), and on a server shared by several people you can decide explicitly which data each user may open.

3.3.4 Three ways to specify the allowed directories

There are three ways to specify the allowed directories. Use them as follows: config.toml for the permanent setting, and an environment variable when you want to change it for a single launch only.

MethodRole and when to use it
allowed_dirs
(~/.climcanvas/config.toml)
The standard way for a permanent setting. Once written in the configuration file on the server, it takes effect every time regardless of how the app is started (configuration file details).
CC_ALLOWED_DIRSThe environment variable read by the app itself (:-separated). If set (even if empty), it takes precedence over config.toml, so you can change the range for a single launch only, as in CC_ALLOWED_DIRS="/data/nc" streamlit run app.py. With CC_ALLOWED_DIRS="" you can start with the restriction lifted temporarily.
CLIMCANVAS_ALLOWED_DIRSThe way to specify it when starting via the launcher (start-climcanvas.sh) (Usage — remote use 1.4). The launcher receives it and passes it on as CC_ALLOWED_DIRS, so the effect is the same.
# To change the allowed directories for a single launch only
# Via the launcher
$ CLIMCANVAS_ALLOWED_DIRS=$HOME/temp:/data/shared scripts/server/start-climcanvas.sh
 
# Direct launch
$ CC_ALLOWED_DIRS=$HOME/temp:/data/shared streamlit run app.py

The order of precedence is CLIMCANVAS_ALLOWED_DIRS (via the launcher only) > CC_ALLOWED_DIRS > allowed_dirs (config.toml); if none is set, there is no restriction. An environment variable wins over config.toml whenever it is set, even if empty. Via the launcher, CC_ALLOWED_DIRS is overwritten and passed on only when CLIMCANVAS_ALLOWED_DIRS is specified.

3.3.5 Starting the app

Once you have finished editing the configuration file ~/.climcanvas/config.toml, the installation is complete. For the connection procedure, see Usage — remote use. For starting the app on a server that uses port assignment (3.2), see Usage — remote use 1.4.

3.4 Summary: what to set and why

SettingWhoPurpose
Start on 127.0.0.1 + SSH tunnelUserKeeps the port off the network. Only those who pass SSH authentication can connect
Each user starts with their own privilegesUserLimits the files that can be read and written to the user's own, by OS permissions
allowed_dirsUserLimits the netCDF files the app can open to those under the data directories
Owner matching (climcanvas-ports assign)Administrator (root)Blocks port connections by other users on the same server, keeping users' data separated

4. License, disclaimer, citation and network access

4.1 License

ClimCanvas is open-source software released under the GNU Affero General Public License version 3 (AGPL-3.0-only), without any warranty (sections 15 and 16 of the license). The full text is in LICENSE in the repository, and the additional terms specific to ClimCanvas are in LICENSE.exception. The main points are as follows.

4.2 Verifying figures is the user's responsibility

It is the user's responsibility to check that a figure generated by ClimCanvas shows what was intended (which level and time were selected, which range was averaged and how, how missing values were handled, and so on). The numerical assumptions are summarized in Computational conventions in the manual, and the checks to make before submitting a paper in Checks before paper submission. When a bug affecting the values in figures is found, the affected versions and features are listed in KNOWN_ISSUES.md in the repository. When citing in a paper or similar, cite with the version you used (citation information is in CITATION.cff).

4.3 Network access

ClimCanvas itself sends nothing over the network. There are two exceptions.

# ~/.streamlit/config.toml
[browser]
gatherUsageStats = false

4.4 Citation

When citing ClimCanvas in a paper or similar, cite it stating the version you used.

# Citation example (APA). For a version with a version DOI, give that DOI
Mori, M. (2026). ClimCanvas (Version 1.00) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.22997361
 
# For a version without a version DOI, give the concept DOI together with the version number
Mori, M. (2026). ClimCanvas (Version 1.00.1) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.22997360