METplus Practical Session Guide (Feb 2019) | Session 4: MODE and MTD > Additional Exercises

End of Practical Session 4

Congratulations! You have completed Session 4!

If you have extra time, you may want to try these additional METplus exercises.

EXERCISE 4.1: mtd_skip - Change Forecast Lead List to See METplus Skip Files

Instructions: Modify the METplus configuration files to change the forecast leads that are processed by MTD. Following these instructions will give you more insight on how METplus configures MTD.

To do this, copy your custom configuration file and rename it to mycustom.mtd_skip.conf for this exercise.
cp $HOME/METplus/parm/mycustom.conf $HOME/METplus/parm/mycustom.mtd_skip.conf 
Open phpt-vs-qpe.conf to remind yourself how fields are defined in METplus
less $HOME/METplus/parm/use_cases/mode/examples/phpt-vs-qpe.conf 
Open mycustom.mtd_skip.conf with an editor and changes values.

Change LEAD_SEQ to process forecast leads 1-4

LEAD_SEQ = 1,2,3,4
You should also change OUTPUT_BASE to a new location so you can keep it separate from the other runs.
OUTPUT_BASE = {ENV[HOME]}/metplus_tutorial/output/exercises/mtd_skip
Rerun master_metplus passing in your new custom config file for this exercise 
master_metplus.py -c use_cases/mode/examples/phpt-vs-qpe.conf -c mycustom.mtd_skip.conf
Now look at the file lists that were generated by METplus for MTD
less $HOME/metplus_tutorial/output/exercises/unzip/stage/mtd_lists/201705100300_fcst_APCP.txt
less $HOME/metplus_tutorial/output/exercises/unzip/stage/mtd_lists/201705100300_obs_P01M_NONE.txt
Notice that there 
less $HOME/metplus_tutorial/output/exercises/mtd_skip/logs/master_metplus.log.`date +%Y%m%d`
Did you see the WARNING message?
WARNING: Observation file was not found for init 201705100300 and lead 4
If you look in the data directories for this run, you will see that while the forecast for the 4 hour lead exists, the observation file does not. METplus will only add items to the MTD lists if both corresponding files are available.
ls /classroom/wrfhelp/METplus_Data/mode/PHPT/20170510
ls /classroom/wrfhelp/METplus_Data/mode/QPE_Data/20170510

EXERCISE 4.2: unzip - Change Forecast Lead List to See METplus Unzip

Instructions: Modify the METplus configuration files to change the forecast leads that are processed by MTD. Following these instructions will give you more insight on how METplus configures MTD.

To do this, copy your custom configuration file and rename it to mycustom.unzip.conf for this exercise.
 
cp $HOME/METplus/parm/mycustom.conf $HOME/METplus/parm/mycustom.unzip.conf
Open phpt-vs-qpe.conf to remind yourself how fields are defined in METplus 
 
less $HOME/METplus/parm/use_cases/mode/examples/phpt-vs-qpe.conf
Open mycustom.unzip.conf with an editor and changes values.
 
Change LEAD_SEQ to process forecast leads 3 and 6 
 
LEAD_SEQ = 3,6
You should also change OUTPUT_BASE to a new location so you can keep it separate from the other runs. 
OUTPUT_BASE = {ENV[HOME]}/metplus_tutorial/output/exercises/unzip
Rerun master_metplus passing in your new custom config file for this exercise 
 
master_metplus.py -c use_cases/mode/examples/phpt-vs-qpe.conf -c mycustom.unzip.conf

Now look at the file list that were generated by METplus for MTD forecast files

less $HOME/metplus_tutorial/output/exercises/mtd_skip/stage/mtd_lists/201705100300_fcst_APCP.txt
Notice that the path of the file for the 6 hour forecast lead has a different path from the 3 hour file.
If you look in the data directories for this run, you will see that the 6 hour forecast file is gzipped.
ls /classroom/wrfhelp/METplus_Data/mode/PHPT/20170510
METplus can recognize that files with gz, bzip2, or zip extensions are compressed and will do so automatically, placing the uncompressed file in the staging directory so that METplus doesn't modify any data in the input directory. METplus can be configured to scrub the staging directory after the run completes to save space, or leave the files so that they may be used by subsequent METplus runs without having to uncompress again (See SCRUB_STAGING_DIR and STAGING_DIR in the METplus User's Guide).