PQPF VERIFICATION SYSTEM User/Administration Manual

Introduction

The Probabilistic Quantitative Precipitation Forecast Verification System (PQPFVS) is a system of software programs designed to calculate calibration and informativeness scores for Probabilistic Quantitative Precipitation Forecasts (PQPFs).

Audience

The system as it currently stands is a prototype system and was not designed as a production system. In particular the user interface of the system remains primitive. The design of a suitable interface has been deliberately left as further work and research. Therefor administrators of this system should be comfortable using C++ in a Unix environment. Users willing to live with the minimal interface provided need only be comfortable issuing unix shell commands.

System Elements and Implementation

The system was implemented on a Hewlett Packard 715/80 workstation running HP-UX 10.20. The software was written in C++ using the egcs-2.91.66 g++ compiler (documentation here). The database used is MySql version 3.22.27 (documentation here). Additionally the the getbasin library (sorry, no documentation that I know of) written by Wray Mills is used for extracting basin information and the NWS APPS_DEFAULTS system (documentation here) is used for specifying system configuration values.

All forecasts and observations are stored as gzipped xmrg files. Documentation for the XMRG format is descibed here. Since the files are gzipped, the zlib library is needed for decompressing the files (documentation here). It should be noted that because of the approximately 50 to 1 compression ratio for XMRG files and somewhat limited space compressed files are used. If this is not desirable then the Grid class must be changed.

Finally the source code is needed. It is available for download here. This can be installed in whatever convenient location. We'll call this location verify_loc.

Distribution

The distribution of source code contains several different directories. These directories are listed and described below.

Requirements and Design

The system design document can be found here. This document gives an overview of the primary classes involved in the software. The system requirements can be found here. This list of requirements is what was initially designed for and does not necessarily reflect the current state of the system.

Set Up

Once all of the system elements described above are in place, the first thing to do is create the database. The makeSchema.ksh script can be found verify_loc/db. It will create the tables, indices and insert the constant data found in the database.

The next step is to load all of the data. The tool verify_loc/tools/loadDB.pl can be used for this or it may be done manually. All loadDB.pl requires is a list of XMRG files with their fully specified paths. One file per line. It also requires that the files be named correctly and that they be gzipped. The naming formats are as follows:

It should be noted that the loadDB.pl script is a Perl script that requires the DBI module to be installed (documentation here).

Once the database has been created and loaded with data, the next step is to compile the application. To do this enter the verify_loc/src directory. In this directory the Makefile must be edited to reflect the actual locations of libraries and files. The specific variables that may need to be changed depending on the target system configuration are:

Once these changes have been made the code can be compiled simply by typing "make" at the command prompt. If there are no errors in the compilation, typing "make install" will copy the executable to the verify_loc/bin directory.

Configuration

A variety of parameters can be configured in the APPS_DEFAULTS to suit different situations and requirements. They are:

A sample APPS_DEFAULTS file is provided. It can be found at: verify_loc/etc/sample.APPS_DEFAULTS. All PQPFVS specific tokens are noted within this sample.

Running

The executable is named "pqpfvs." Simply type "pqpfvs" followed by the necessary arguments at the command line. All output will be to stdout. If this isn't desirable the output can be redirected to a file in whatever manner suits you. All errors are written to stderr, while all debug messages are written to stdout.

Arguments

The pqpfvs executable provided with the system allows for two types of verification to take place, either by square or by basin. In both cases the date range over which forecasts are to be verified must be specified. So the first arguments are the begin and end dates specified as follows (note that this command is incomplete):

pqpfvs "YYYY-MM-DD HR:MI:SS" "YYYY-MM-DD HR:MI:SS"

It is also possible to specify just the day without the time. In this case the time is set to a default value of 00:00:00 (midnight). The command (still incomplete) would then look like:

pqpfvs "YYYY-MM-DD" "YYYY-MM-DD"

It should be noted that if the dates both default to noon then the ForecastHandler and ObservationHandler that are first constructed must also be constructed with the MIDNIGHT option. Also since PQPF forecasts are for the previous 24 hours from noon to the previous noon, this option is not recommended. Also note that the quotation marks are necessary because the unix command line (at least with ksh) uses whitespace as an argument delimiter. The software will throw an exception if the beginning date is later than the end date.

The next parameter determines whether squares or basins are used for evaluation. Simply type (this command is complete):

pqpfvs "2000-08-01 12:00:00" "2000-09-01 12:00:00" basins

or (this command is still not yet complete):

pqpfvs "2000-08-01 12:00:00" "2000-09-01 12:00:00" squares

When squares is specified, 3 more arguments are required. The number of grid points per side of the square, the number of points that offset the squares from the top of the grid and the number of points that offset the squares from the left of the grid.

pqpfvs "2000-08-01 12:00:00" "2000-09-01 12:00:00" squares 19 13 8

This command calculates the calibration scores and informativeness scores for squares of size 19x19 offset 13 from the top and 8 from the left for the date range of August 1st. through September 1st.

NOTE:

Remember that all output goes to stdout. This means if you want to save the output to a file you should use the standard unix tools to redirect the output.

Extending the User Interface

As noted earlier the user interface for the the PQPFVS remains deliberately primitive. Some of the features built into the software are only available to those willing to edit C++ code. Specifically this means altering the RunAll.cpp file which contains the main loop for the software and reading the source code (documentation here). to see what exactly is available.

The software has been designed with the expectation of a user interface to be added in the future. With this in mind, all of the data displayed as text output by the "show" methods can be collected with the appropriate "get" methods from the Validation objects for proper display. This course of action assumes a C++ display mechanism.

The other display possibility is to call the show methods with the "COMPUTER" enum. This will dump the results to stdout as usual but in a format that should be easily parsed by most programming languages. This allows the the interface designer to use whatever tools are desired.

Happy Forecasting!