MET Online Tutorial

MET Online Tutorial for METv3.0

Compilation: Test Scripts

Running Test Scripts

Once the MET package has been built successfully, users are strongly encouraged to run the sample test scripts provided. The scripts subdirectory contains a test script for each of the tools in MET. The test_all.sh script will run the other test scripts in the proper order. To run the test scripts, execute the following commands:
    cd scripts
    ./test_all.sh >& test_all.log&
    tail -f test_all.log

arrow To exit the tail command, type CNTL-C.

arrow Most of the steps in the test scripts will only take a couple of minutes each to run. However, the PB2NC step will likely take several minutes.

arrow If you disabled the compilation of any of the MET tools by setting a DISABLE flag in the Makefile, the corresponding test script will fail.

Checking for Errors

Examine the contents of the test_all.log file. The test_pb2nc.sh test script will sometimes experience a runtime error due to a compiler dependent compilation setting. Check the test_all.log file for the following error:

    **************BUFR ARCHIVE LIBRARY ABORT*****************
    BUFRLIB: OPENBF - FIRST 4 BYTES READ FROM RECORD IN INPUT FILE
    FILE CONNECTED TO UNIT 11 NOT 'BUFR', DOES NOT CONTAIN DATA
    **************BUFR ARCHIVE LIBRARY ABORT*****************

If you see that error message, edit the top-level MET Makefile and try adding or removing the -DBLOCK4 flag from the ARCH_FLAGS line. Then recompile MET, being sure to execute a make clean followed by make. Lastly, rerun the test scripts and make sure the runtime error no longer occurs.

Test Script Output

In the test_all.log file, look for the following message which indicates that the test script completed:

*** Finished Testing the Model Evaluation Tools Project ***

The output from this test script is written to the out/ subdirectory (e.g. METv3.0/out), organized by the names of the MET tools. Return to the top-level METv3.0 directory and list the output directories with the following commands:

    cd ..
    ls out/*

Congratulations!

You have now successfully compiled and run MET!

Tutorial Setup

Throughout the remainder of this tutorial, we'll look at running each of the MET tools in greater detail using the sample data provided with the MET tarball. Unless otherwise indicated, all future commands listed should be run from the top-level METv3.0 directory. Please run the following set of commands to set up some directories for use in this tutorial:

    mkdir -p tutorial/config
    mkdir -p tutorial/out/gen_poly_mask
    mkdir -p tutorial/out/pb2nc
    mkdir -p tutorial/out/ascii2nc
    mkdir -p tutorial/out/point_stat
    mkdir -p tutorial/out/pcp_combine
    mkdir -p tutorial/out/grid_stat
    mkdir -p tutorial/out/wavelet_stat
    mkdir -p tutorial/out/stat_analysis
    mkdir -p tutorial/out/ensemble_stat
    mkdir -p tutorial/out/mode
    mkdir -p tutorial/out/mode_analysis