METplus Practical Session Guide (July 2019) | Use Case: Feature Relative > Use Case: Feature Relative

METplus Use Case: Feature Relative (Series-Analysis by lead, by forecast hour grouping)

Setup

In this exercise, you will perform a series analysis based on the lead time (forecast hour) of your sample data and organize your results by forecast hour groupings. This use case utilizes the MET Tc-Pairs, Tc-Stat, and Series-Analysis tools, and the METplus wrappers: TcPairs, ExtractTiles, TcStat, and SeriesByLead. Please refer to the MET User's Guide for a description of the MET tools and the METplus Users Guide for more details about the wrappers. Please note that the METplus User's Guide is a work-in-progress and may have missing content.

Create Custom Configuration File

Define a unique directory under output that you will use for this use case. Create a configuration file to override OUTPUT_BASE to that directory.

vi ${METPLUS_PARM_BASE}/user_config/sbl.output.conf

Set OUTPUT_BASE to contain a subdirectory specific to the Series by Lead use case. Make sure to put it under the [dir] section.

[dir]
OUTPUT_BASE = {ENV[METPLUS_TUTORIAL_DIR]}/output/series_by_lead_fhr_grouping

to keep this feature relative output separate from the other examples.

Using this custom configuration file and the Feature Relative use case configuration files that are distributed with METplus, you should be able to run the use case using the sample input data set without any other changes.

Review Use Case Configuration File: series_by_lead_by_fhr_grouping.conf

View the file and study the configuration variables that are defined.

less ${METPLUS_PARM_BASE}/use_cases/feature_relative/examples/series_by_lead_by_fhr_grouping.conf

Note that variables in series_by_lead_fhr_grouping.conf reference other variable you defined in your mycustom.conf configuration file.
For example:

SERIES_LEAD_OUT_DIR = {OUTPUT_BASE}/series_analysis_lead

This references OUTPUT_BASE which you set in the METplus system configuration file (metplus_config/metplus_system.conf). METplus config variables can reference other config variables, even if they are defined in a config file that is read afterwards.

Run METplus

Run the following command:

master_metplus.py -c use_cases/feature_relative/feature_relative.conf \
-c use_cases/feature_relative/examples/series_by_lead_by_fhr_grouping.conf \
-c user_config/sbl.output.conf

You will see output streaming to your screen. This may take up to 3 minutes to complete. When it is complete, your prompt returns.

Review the Output Files

You should have the following output directories that result from running the wrappers TcPairs, ExtractTiles, and TcStat, respectively:

ls ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping
track_data_atcf_pairs
extract_tiles
series_lead_filtered

and the output directory of interest, from the SeriesByLead wrapper:

series_analysis_lead

That directory contains the following directories:

ls ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping/series_analysis_lead
Day1
Day2
Day3
series_animate

Day1 contain the following files:

ls ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping/series_analysis_lead/Day1
ANLY_FILES_F000_to_F018
series_F000_to_F018_TMP_Z2_ME.png
series_F000_to_F018_TMP_Z2_OBAR.ps
FCST_FILES_F000_to_F018
series_F000_to_F018_TMP_Z2_ME.ps
series_F000_to_F018_TMP_Z2_TOTAL.png
series_F000_to_F018_TMP_Z2_FBAR.png
series_F000_to_F018_TMP_Z2.nc
series_F000_to_F018_TMP_Z2_TOTAL.ps
series_F000_to_F018_TMP_Z2_FBAR.ps
series_F000_to_F018_TMP_Z2_OBAR.png

The ANLY_FILES_F000_to_F018 is a text file that contains a list of the data that is included in the series analysis.

Day2 contains equivalent files for forecast leads 24 to 42 and Day3 contains equivalent files for forecast leads 48 to 66.

The .nc files are the series analysis output generated from the MET Series-Analysis tool.

The .png and .ps files are graphics files that can be viewed using okular:

okular ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping/series_analysis_lead/Day1/series_F000_to_F018_TMP_Z2_FBAR.png &

or

okular ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping/series_analysis_lead/Day1/series_F000_to_F018_TMP_Z2_FBAR.ps &

Note: the & is used to run this command in the background

The series_animate directory contains the gif images of the animations:

ls ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping/series_analysis_lead/series_animate
series_animate_TMP_Z2_FBAR.gif
series_animate_TMP_Z2_ME.gif
series_animate_TMP_Z2_OBAR.gif
series_animate_TMP_Z2_TOTAL.gif

To watch the animations, go to ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping/series_analysis_lead/series_animate, enter the following:

cd ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping/series_analysis_lead/series_animate
firefox ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping/series_analysis_lead/series_animate/series_animate_TMP_Z2_FBAR.gif
firefox ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping/series_analysis_lead/series_animate/series_animate_TMP_Z2_ME.gif
firefox ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping/series_analysis_lead/series_animate/series_animate_TMP_Z2_OBAR.gif

Review the Log File

A log file is generated in your logging directory: ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping/logs. The filename contains the timestamp corresponding to the current day. To view the log file:

less ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping/logs/master_metplus.log.`date +%Y%m%d`

Review the Final Configuration File

The final configuration file is metplus_final.conf. This contains all of the configuration variables used in the run.

less ${METPLUS_TUTORIAL_DIR}/output/series_by_lead_fhr_grouping/metplus_final.conf