METplus Practical Session Guide (Version 5.0) | Session 4: Ensemble and PQPF > METplus Use Case: GenEnsProd and EnsembleStat

Both the Ensemble-Stat tool and Gen-Ens-Prod tool have METplus wrapper versions. We will review a METplus use case that calls on both of these tools and see how they interact with and compliment each other.

Optional: Refer to the MET Users Guide for a description of the MET tools used in this use case.
Optional: Refer to the METplus Config Glossary section of the METplus Users Guide for a reference to METplus variables used in this use case.
Change to the ${METPLUS_TUTORIAL_DIR} directory:
  1. Review the basic wrapper configuration file: EnsembleStat.conf
Open the file and look at all of the configuration variables that are defined.
less ${METPLUS_BUILD_BASE}/parm/use_cases/met_tool_wrapper/EnsembleStat/EnsembleStat.conf

Recall that the Ensemble-Stat tool is for verification against gridded and/or point observation datasets and can calculate statistical output, which is reflected in the wrapper's configuration options. Note that variables in EnsembleStat.conf reference other config variables that have been defined in other configuration files. For example:

FCST_ENSEMBLE_STAT_INPUT_DIR = {INPUT_BASE}/met_test/data/sample_fcst

This references INPUT_BASE which is set in the tutorial.conf configuration file. METplus config variables can reference other config variables even if they are defined in a config file that is read afterwards. This is a common practice in METplus wrappers, including the use case that we'll be running.

  1. Review the basic wrapper configuration file: GenEnsProd.conf
Open the file and look at all of the configuration options.
less ${METPLUS_BUILD_BASE}/parm/use_cases/met_tool_wrapper/GenEnsProd/GenEnsProd.conf

The Gen-Ens-Prod tool (and its wrapper that we're now using) is for creating ensemble products. This differs from the purpose of the Ensemble-Stat tool, so the GenEnsProd wrapper options will differ from those in the EnsembleStat wrapper.

  1. Review the use case configuration file: EnsembleStat_fcstHRRRE_obsHRRRE_Sfc_MultiField.conf
Open the use case configuration file:
less ${METPLUS_BUILD_BASE}/parm/use_cases/model_applications/short_range/EnsembleStat_fcstHRRRE_obsHRRRE_Sfc_MultiField.conf

For the use case that we will be running, three tool wrappers are called: PB2NC, GenEnsProd, and EnsembleStat. These tools will iterate over one time step, but three separate lead times. PB2NC is used as a conversion method for the input file types and was covered in a previous session. From the order of the tools in PROCESS_LIST, we see that EnsembleStat runs first. Since that tool is for verification and statistical output, it uses observational field settings like OBS_VAR1_NAME and BOTH_VAR1_THRESH, which applies to both the forecast and observation variable 1. It also will create multiple output files for each time step processed, one for each of the requested line types:


GenEnsProd, on the other hand, will utilize the ENS_ configuration settings, and will place all output for each time step into a single netCDF output. Those file's locations and names can be seen with the following configuration settings:

GEN_ENS_PROD_OUTPUT_TEMPLATE = {init?fmt=%Y%m%d%H%M}/gen_ens_prod_{ENSEMBLE_STAT_OUTPUT_PREFIX}_{valid?fmt=%Y%m%d_%H%M%S}

Note that the output directory is dependent on a different configuration setting, ENSEMBLE_STAT_OUTPUT_DIR. As mentioned above, this is common practice in METplus.

  1. Run the use case: \
${METPLUS_BUILD_BASE}/parm/use_cases/model_applications/short_range/EnsembleStat_fcstHRRRE_obsHRRRE_Sfc_MultiField.conf \
${METPLUS_TUTORIAL_DIR}/tutorial.conf \

METplus is finished running when control returns to your terminal console and you see the following text:

INFO: METplus has successfully finished running as user.
  1. Review the output files:

You should have output files in the following directories:

ls ${METPLUS_TUTORIAL_DIR}/output/Ensemble/model_applications/short_range/EnsembleStat_fcstHRRRE_obsHRRRE_Sfc_MultiField/EnsembleStat/201807091200
  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V_ecnt.txt
  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V_orank.txt
  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V_phist.txt
  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V_relp.txt
  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V_rhist.txt
  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V_ssvar.txt
  • ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V.stat
  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V_ecnt.txt
  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V_orank.txt
  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V_phist.txt
  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V_relp.txt
  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V_rhist.txt
  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V_ssvar.txt
  • ensemble_stat_HRRRE_F001_ADPSFC_20180709_130000V.stat
  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V_ecnt.txt
  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V_orank.txt
  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V_phist.txt
  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V_relp.txt
  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V_rhist.txt
  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V_ssvar.txt
  • ensemble_stat_HRRRE_F002_ADPSFC_20180709_140000V.stat

We can tell from the name of the files, specifically the _F00x_ string, that three different lead times were run: 0, 1, and 2. These ended up as valid times of 12z, 13z, and 14z, as indicated by the 1x0000V strings.

Take a look at some of the files to see what was generated.
less ${METPLUS_TUTORIAL_DIR}/output/Ensemble/model_applications/short_range/EnsembleStat_fcstHRRRE_obsHRRRE_Sfc_MultiField/EnsembleStat/201807091200/ensemble_stat_HRRRE_F000_ADPSFC_20180709_120000V.stat

This stat file contains all of the statistic line types that were requested in the configuration file. If we wanted to review only one line type at a time, ECNT for example, we could instead look at the ASCII file for this lead time with the _ecnt string at the end of the file name. That file exists because the use case configuration file set:


signaling that the ecnt line type results should be in the .stat file, as well as a separate ASCII file.

  1. Review the log output:

Log files for this run are found in ${METPLUS_TUTORIAL_DIR}/output/Ensemble/logs. The filename contains a timestamp of the day and time that the use case was run.

ls -1 ${METPLUS_TUTORIAL_DIR}/output/Ensemble/logs/metplus.log.*
  1. Review the Final Configuration File:
ls -1 ${METPLUS_TUTORIAL_DIR}/output/Ensemble/metplus_final.conf.*

The final configuration file is called metplus_final.conf.*, where the final string is a timestamp of the day and time the use case was run, similar to the log files. This contains all of the configuration variables used in the run. If you complete a run of METplus and are unsure how the system interpreted something from the configuration file, this is a great source of information.