METplus Practical Session Guide (July 2019) | Session 5: Trk&Int/Feature Relative > Use Case: Feature Relative

METplus Use Case: Feature Relative (Series-Analysis by init)

Setup

In this exercise, you will perform a series analysis based on the init time of your sample data. This use case utilizes the MET Tc-Pairs, Tc-Stat, and Series-Analysis tools, and the METplus wrappers: TcPairs, ExtractTiles, TcStat, and SeriesByInit. 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/fr.output.conf

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

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

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: feature_relative.conf

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

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

Note that variables in feature_relative.conf reference other variable you defined in other configuration files.
For example: 

TC_STAT_INPUT_DIR = {OUTPUT_BASE}/tc_pairs

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 user_config/fr.output.conf

You will see output streaming to your screen. This may take up to 4 minutes to complete. METplus is finished running when control returns to your terminal console and you see the following text:

INFO: METplus has successfully finished running.

Review the Output Files

You should have output files in the following directories from the intermediate wrappers TcPairs, ExtractTiles, and TcStat, respectively:

ls ${METPLUS_TUTORIAL_DIR}/output/feature_relative
tc_pairs
extract_tiles
series_init_filtered

and the output of interest, from the SeriesByInit wrapper:

series_analysis_init

which has a directory corresponding to the date(s) of data in the data window:

ls ${METPLUS_TUTORIAL_DIR}/output/feature_relative/series_analysis_init
20141214_00

and under that directory are subdirectories named by the storm:

ls ${METPLUS_TUTORIAL_DIR}/output/feature_relative/series_analysis_init/20141214_00
ML1200942014
ML1200972014
ML1200992014
ML1201002014
ML1201032014
ML1201042014
ML1201052014
ML1201062014
ML1201072014
ML1201082014
ML1201092014
ML1201102014

and under each of those directories lies the files of interest:

ls ${METPLUS_TUTORIAL_DIR}/output/feature_relative/series_analysis_init/20141214_00/ML1200942014
ANLY_ASCII_FILES_ML1200942014
FCST_ASCII_FILES_ML1200942014
series_TMP_Z2_FBAR.png
series_TMP_Z2_FBAR.ps
series_TMP_Z2_ME.png
series_TMP_Z2_ME.ps
series_TMP_Z2.nc
series_TMP_Z2_OBAR.png
series_TMP_Z2_OBAR.ps
series_TMP_Z2_TOTAL.png
series_TMP_Z2_TOTAL.ps

The ANLY_ASCII_FILES_ML########## (where ########## is the storm) is a text file that contains a list of the analysis data included in the series analysis. The FCST_ASCII_FILES_ML########## (where ########## is the storm) is a text file that contains a list of forecast data included in the series analysis.

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 display or ghostview, respectively:

display ${METPLUS_TUTORIAL_DIR}/output/feature_relative/series_analysis_init/20141214_00/ML1200942014/series_TMP_Z2_FBAR.png &

or

gv ${METPLUS_TUTORIAL_DIR}/output/feature_relative/series_analysis_init/20141214_00/ML1200942014/series_TMP_Z2_FBAR.ps &

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

Review the Log File

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

less ${METPLUS_TUTORIAL_DIR}/output/feature_relative/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/feature_relative/metplus_final.conf