Freva#

Freva github Freva Provided On Levante Freva Maintaned On Levante Freva Developed on DKRZ

The Free Evaluation System Framework (Freva) is an open source data search and analysis platform developed at the FUB and DKRZ and provided by the Climate Informatics and Technologies research group (CLINT) at the Data Analysis department. You can install the freva package via pip or conda/mamba.

With the help of Freva researchers can, among other things:

  • quickly and intuitively search for data stored at typical data centers that host many datasets (databrowser for data already in freva, esgf for data at esgf nodes).

  • create a common interface for user defined data analysis tools (plugins).

  • apply data analysis tools in a reproducible manner (history).

Freva can be accessed either via command line interface (CLI), via web browser or with a python module, with similar functionalities in all the cases.

../../../../_images/freva_flowchart-new.jpg

For a complete overview of the Freva functionalities please refer to its official documentation page, which is regularly updated.

Freva access#

Freva is a framework whose usage is (mainly) limited to projects, i.e. there are different instances for different projects. All the instances share the same core functionalities but have been personalized to cater the necessities of each project hosting their own tools, history database and data that can be found through the databrowser.

As such, in order to access them you will need to either load a particular module (cli), go to a website (web), or indicate a specific configuration file (python):

Module

Website

Configuration file

gems

https://gems.dkrz.de/

/work/ch1187/clint/nextgems/freva/evaluation_system.conf

Warmworld -GEMS instance is open to anyone with a dkrz account. Through this instance you will be able to search most of the data hosted at levante: CMIP6 data hosted at DKRZ’s ESGF node, CMIP5, Cordex, and many reanalysis products. However, take in account that there are no plugins available for data analysis here.

Other available instances are e.g. xces for ClimXtreme project bm1159, regiklim-ces for RegIKlim project ch1187, and codes for Coming Decade project kd1418, but those are project locked. If you have any question regarding the access to any instance or general Freva usage please do not hesitate to contact us at freva@dkrz.de.

Below, we indicate shortly how to access Freva via command line and in a python environment, the web access is self-explanatory. This a short summary of Freva’s documentation FAQ.

Command-line access#

In order to access via command-line you will, first, need to connect to levante and then load clint + your module:

% ssh <username>@levante.dkrz.de
$USER@levante $ module load clint <freva-instance>
$USER@levante $ freva --help
usage: freva [-h] [-V] {esgf,user-data,plugin,history,databrowser} ...

Free EVAluation system framework (freva)

positional arguments:
  {esgf,user-data,plugin,history,databrowser}
...

Python environment#

As mentioned before, Freva can be directly used within a python environment. This can be done via Freva’s python API. Here we explain 3 ways to do it.

1. Using available freva instances#

Freva ships with the most common libraries for climatological data processing and plotting (numpy, xarray, pandas, matplotlib, cartopy).

The simplest way to use the freva python module is 1) load a freva instance and 2) execute your python scripts with the loaded environment.

% ssh <username>@levante.dkrz.de
$USER@levante $ module load clint <freva-instance>
$USER@levante $ python your-script.py

Naturally, in the python script you will need to import the freva package:

import freva
freva.count_values()

2.Using DKRZ’s Jupyterhub#

DKRZ provides its own Jupyterhub, a multi-user server to serve Jupyter Notebooks to a large number of users.

You can create your own freva-kernel out of the available freva instances, for that:

$USER@levante $ module load clint <freva-instance>
$USER@levante $ jupyter-kernel-install python --name freva --display-name <freva-instance>

And then load the freva package in your jupyter notebook.

3. Using own environment#

Finally, if you want to run Freva in your own environment you will need to install it first either via pip or conda/mamba:

$USER@levante $ python3 -m pip install freva # with pip
$USER@levante $ conda install -c conda-forge freva # with conda

In the python script, you will need to load freva + a configuration file corresponding to a particular freva instance as in the above mentioned table:

import freva
freva.config("/path/to/evaluation_system.conf")