Skip to main content
https://img.shields.io/github/v/release/WFRT/verif.svg https://github.com/WFRT/verif/actions/workflows/python-package.yml/badge.svg

Verif is a command-line tool that lets you verify the quality of weather forecasts for point locations. It can also compare forecasts from different forecasting systems (that have different models, post-processing methods, etc).

The program reads files with observations and forecasts in a specific format (see “Input files” below). The input files contain information about dates, forecast lead times, and locations such that statistics can be aggregated across different dimensions. To ensure a fair comparison among files, Verif will discard data points where one or more forecast systems have missing forecasts. Since Verif is a command-line tool, it can be used in scripts to automatically create verification figures.

Verif version 1.2 has been released (see “Installation Instruction” below). We welcome suggestions for improvements. Verif is developed by Thomas Nipen (thomasn@met.no), David Siuta, and Tim Chui.

Documentation

For more information on how to use Verif, check out the wiki at https://github.com/WFRT/verif/wiki.

Features

  • Deterministic metrics such as MAE, bias, correlation, RMSE (e.g. -m mae)

  • Threshold-based metrics such as the false alarm rate, ETS, EDI, Yule’s Q (e.g. -m ets)

  • Probabilistic metrics such as brier score, PIT-histogram, reliability diagrams (e.g. -m bs)

  • Special plots like Taylor diagrams (-m taylor), quantile-quantile plots (-m qq).

  • Plot scores as a function of date, lead time, station altitude/lat/longitude (e.g. -x date)

  • Show scores on maps (-type map)

  • Subset the data by specifying a date range and lat/lon range (-latrange 58,60)

  • Export to text (-type text)

  • Options to adjust font sizes, label positions, tick marks, legends, etc (-labfs 14)

  • Anomaly statistics relative to a baseline like climatology (-c climfile.txt)

  • Output to png, jpeg, eps, etc and specify dimensions and resolution (-f image.png -dpi 300)

Example plots

Installing on Ubuntu

Prerequisites

Verif requires a pip installation and Python 3. The python package “cartopy” is optional, but provides a background map when verification scores are plotted on a map. To install Cartopy, with its GEOS and PROJ4 dependencies, do the following:

sudo apt-get update
sudo apt-get install libgeos-dev libproj-dev
sudo pip3 install cartopy

Installing using pip

After this, the easiest is to install the lastest version of Verif using pip:

sudo pip install verif

Verif should then be accessible by typing verif on the command-line. If you do not have sudo-rights, then install verif as follows:

pip install verif --user

This will create the executable ~/.local/bin/verif. Add this to your PATH environment variable if necessary (i.e add export PATH=$PATH:~/.local/bin to ~/.bashrc).

To upgrade to a newer version of Verif, run the following:

pip install verif --upgrade

Installing from source

Alternatively, to install from source, download the source code of the latest version: https://github.com/WFRT/verif/releases/. Unzip the file and navigate into the extracted folder.

Then install Verif by executing the following inside the extracted folder:

sudo pip install -r requirements.txt
sudo python setup.py install

This will create the executable /usr/local/bin/verif. Add /usr/local/bin to your PATH environment variable if necessary. If you do not have sudo privileges do:

pip install -r requirements.txt --user
python setup.py install --user

This will create the executable ~/.local/bin/verif. Add ~/.local/bin to your PATH environment variable.

Installing on Mac OSX

Follow the proceedure as for Ubuntu (either installing with pip or from source). If installing from source, then look for the line “Installing verif script to <some directory>”, as this will indicate what folder Verif is installed into. Add the folder to your PATH environment variable if necessary.

Example

A sample dataset for testing the program is found in ./examples/. There is one “raw” forecast file and one “calibrated” forecast file (where statistical methods have been applied). For more information about the dataset check out the wiki. Here are some example commands to test out:

# Shows mean absolute error as a function of lead-time
verif examples/raw.txt examples/kf.txt -m mae
# Shows average observed and forecasted values as a function on time
verif examples/raw.txt examples/kf.txt -m obsfcst -x time
# Shows equitable threat score as a function of threshold
verif examples/raw.txt examples/kf.txt -m ets
# Shows a reliability diagram for a threshold of 0 °C
verif examples/raw.txt examples/kf.txt -m reliability -r 0
# Shows Brier skill score as a function of threshold
verif examples/raw.txt examples/kf.txt -m bss -x threshold

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verif-1.2.2.tar.gz (71.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

verif-1.2.2-py3-none-any.whl (78.6 kB view details)

Uploaded Python 3

File details

Details for the file verif-1.2.2.tar.gz.

File metadata

  • Download URL: verif-1.2.2.tar.gz
  • Upload date:
  • Size: 71.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.63.1 CPython/3.8.0

File hashes

Hashes for verif-1.2.2.tar.gz
Algorithm Hash digest
SHA256 27d86f0fb6719d0a838be502f69540d26c5ea92fea49e9b223f5833926c9f87c
MD5 78de33f9240f5d77d4d7229a34b12656
BLAKE2b-256 9caba164935918ce7c8c5d573dbb1388b76ca0bd392c0f73c10e8998124c09a5

See more details on using hashes here.

File details

Details for the file verif-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: verif-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 78.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.63.1 CPython/3.8.0

File hashes

Hashes for verif-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5c7cef1c7ecb92d7d987c5793c0aeac26173f37d7b88936972208d85aacabc8f
MD5 0beac85fc9d515e5125ae071ed5829a7
BLAKE2b-256 deb73f9cbd3886828e3a59a4d1312f3b2afc4bc1245d6e027110a606abab1780

See more details on using hashes here.

Release history Release notifications | RSS feed

1.4.0

2 files

1.3.0

2 files

1.2.3

2 files

This release

1.2.2 This release

2 files

1.2.1

2 files

1.2.0

2 files

1.1.3

3 files

1.1.2

3 files

1.1.1

3 files

1.1.0

3 files

1.0.0

2 files

0.4.0

3 files

0.3.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page