Use Case: Feature Relative

Use Case: Feature Relative cindyhg Mon, 06/24/2019 - 14:34

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 section 3.53.13, and 3.16 of the METplus 2.0.4 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.

Open the mycustom.conf file in an editor of your choice:

${HOME}/METplus/parm/mycustom.conf

Replace the following:

OUTPUT_BASE = {ENV[HOME]}/metplus_tutorial/output

with this:

OUTPUT_BASE = {ENV[HOME]}/metplus_tutorial/output/feature_relative

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

Using your custom configuration file that you created in the METplus: CUSTOM Configuration File Settings section 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 ${HOME}/METplus/parm/use_cases/feature_relative/feature_relative.conf

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

TC_STAT_INPUT_DIR = {OUTPUT_BASE}/tc_pairs

This references OUTPUT_BASE which you set in your custom config file. 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 mycustom.conf

You will see output streaming to your screen. This may take up to 4 minutes to complete. When it is complete, your prompt returns and you will see a line containing "INFO: INFO|Finished series analysis by init time" at the end of the screen output.

Review the Output Files

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

${HOME}/metplus_tutorial/output/feature_relative/tc_pairs
${HOME}/metplus_tutorial/output/feature_relative/extract_tiles
${HOME}/metplus_tutorial/output/feature_relative/series_init_filtered

and the output of interest, from the SeriesByInit wrapper:

${HOME}/metplus_tutorial/output/feature_relative/series_analysis_init

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

${HOME}/metplus_tutorial/output/feature_relative/series_analysis_init/20141214_00

and under that directory are subdirectories named by the storm:

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

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

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 okular:

/bin/okular $HOME/metplus_tutorial/output/feature_relative/series_analysis_init/20141214_00/ML1200942014/series_TMP_Z2_FBAR.png & 

or 

/bin/okular $HOME/metplus_tutorial/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: ${HOME}/metplus_tutorial/output/feature_relative. The filename contains the timestamp corresponding to the current day. To view the log file:

less $HOME/metplus_tutorial/output/feature_relative/logs/master_metplus.log.`date +%Y%m%d`

Review the Final Configuration File

The final configuration file is $HOME/metplus_tutorial/output/grid_to_grid/metplus_final.conf. This contains all of the configuration variables used in the run.

less $HOME/metplus_tutorial/output/feature_relative/metplus_final.conf

Use Case: Feature Relative

Use Case: Feature Relative cindyhg Mon, 06/24/2019 - 14:36

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 section 3.53.13, and 3.16 of the METplus 2.0.4 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.

Open the mycustom.conf file in an editor of your choice:

${HOME}/METplus/parm/mycustom.conf

Replace the following:

OUTPUT_BASE = {ENV[HOME]}/metplus_tutorial/output

with this:

OUTPUT_BASE = {ENV[HOME]}/metplus_tutorial/output/series_by_lead_fhr_grouping

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

Using your custom configuration file that you created in the METplus: CUSTOM Configuration File Settings section 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 ${HOME}/METplus/parm/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 your custom config file. 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 mycustom.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:

${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/tc_pairs
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/track_data_atcf_pairs
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/extract_tiles
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_lead_filtered

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

${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead

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

${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/20141214_00

and under that directory are subdirectories named by the storm:

${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/20141214_00/ML1200942014
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/20141214_00/ML1200972014
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/20141214_00/ML1200992014
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/20141214_00/ML1201002014
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/20141214_00/ML1201032014
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/20141214_00/ML1201042014
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/20141214_00/ML1201052014
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/20141214_00/ML1201062014
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/20141214_00/ML1201072014
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/20141214_00/ML1201082014
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/20141214_00/ML1201092014
${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/20141214_00/ML1201102014

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

Day1
Day2
Day3
Day4
series_animate

The directories Dayn contain the following files: 

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.

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:

/bin/okular ${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_analysis_lead/Day1/series_F000_to_F018_TMP_Z2_FBAR.png &

or 

/bin/okular ${HOME}/metplus_tutorial/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: 
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, cd to ${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_animate, enter the following:

firefox ${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_animate/series_animate_TMP_Z2_FBAR.gif

firefox ${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_animate/series_animate_TMP_Z2_ME.gif

firefox ${HOME}/metplus_tutorial/output/series_by_lead_fhr_grouping/series_animate/series_animate_TMP_Z2_OBAR.gif

Review the Log File

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

less $HOME/metplus_tutorial/output/series_by_lead_fhr_grouping/logs/master_metplus.log.`date +%Y%m%d`

Review the Final Configuration File

The final configuration file is $HOME/metplus_tutorial/output/grid_to_grid/metplus_final.conf. This contains all of the configuration variables used in the run.

less $HOME/metplus_tutorial/output/series_by_lead_fhr_grouping/metplus_final.conf