Skip to content
Thomas Nipen edited this page Jan 31, 2018 · 10 revisions

Converting from text to NetCDF

It is generally easier to write data into the Verif text format. However the NetCDF format is quicker when using Verif. The ./scripts/text2nc.py script converts a Verif text file to a Verif NetCDF file:

python scripts/text2nc.py file.txt file.nc

Accumulating variables

In some cases, it can be useful to verify forecasts for accumulated values. For example, your file may contain hourly precipitation values, but you wish to verify 24-hour accumulated precipitation forecasts and observations. To do this, a script has been provided (in ./scripts/) that will create accumulated values for any window length.

python scripts/accumulate.py file.nc accumulated_file.nc -w 24

Verif can then be run on the new file. Both deterministic forecasts and observations have been accumulated. However, since not enough information is available in the files, the probabilistic forecasts are not included in the output file.

Computing weather windows

Converts observations and forecasts into weather windows: A window is the length of time that a parameter is below a certain threshold, for example a dry-spell is the length (along the leadtime axis) that precipitation is 0 mm.

python scripts/window.py file.nc window_file.nc -r 0.5