Congratulations! You have completed Session 1!
If you have extra time, you may want to try these additional MET exercises:
- Run Gen-Vx-Mask to create a mask for Eastern or Western United States using the polyline files in the data/poly directory. Re-run Grid-Stat using the output of Gen-Vx-Mask.
- Run Gen-Vx-Mask to exercise all the other masking types available.
- Reconfigure and re-run Grid-Stat with the fourier dictionary defined and the grad output line type enabled.
If you have extra time, you may want to try these additional METplus exercises. The answers are found on the next page.
EXERCISE 1.1: add_rh - Add another field to grid_stat
Instructions: Modify the METplus configuration files to add relative humidity (RH) at pressure levels 500 and 250 (P500 and P250) to the output.
- Copy your custom configuration file and rename it to mycustom.add_rh.conf for this exercise.
cp g2g.output.conf g2g.add_rh.conf
- Open anom.conf to remind yourself how fields are defined in METplus
- Open g2g.add_rh.conf with an editor and add the extra information.
Hint: The variables that you need to add must go under the [config] section.
You should also change OUTPUT_BASE to a new location so you can keep it separate from the other runs.
OUTPUT_BASE = {ENV[METPLUS_TUTORIAL_DIR]}/output/exercises/add_rh
- Rerun master_metplus passing in your new custom config file for this exercise
Look for:
DEBUG 2: Computing Scalar Partial Sums.
DEBUG 2: Processing RH/P500 versus RH/P500, for smoothing method NEAREST(1), over region NHX, using 3600 pairs.
DEBUG 2: Computing Scalar Partial Sums.
DEBUG 2: Processing RH/P500 versus RH/P500, for smoothing method NEAREST(1), over region SHX, using 3600 pairs.
DEBUG 2: Computing Scalar Partial Sums.
DEBUG 2: Processing RH/P500 versus RH/P500, for smoothing method NEAREST(1), over region TRO, using 2448 pairs.
DEBUG 2: Computing Scalar Partial Sums.
DEBUG 2: Processing RH/P500 versus RH/P500, for smoothing method NEAREST(1), over region PNA, using 1311 pairs.
DEBUG 2: Computing Scalar Partial Sums.
DEBUG 1: Regridding field RH/P250 to the verification grid.
DEBUG 1: Regridding field RH/P250 to the verification grid.
DEBUG 2:
DEBUG 2: --------------------------------------------------------------------------------
DEBUG 2:
DEBUG 2: Processing RH/P250 versus RH/P250, for smoothing method NEAREST(1), over region FULL, using 10512 pairs.
DEBUG 2: Computing Scalar Partial Sums.
DEBUG 2: Processing RH/P250 versus RH/P250, for smoothing method NEAREST(1), over region NHX, using 3600 pairs.
DEBUG 2: Computing Scalar Partial Sums.
DEBUG 2: Processing RH/P250 versus RH/P250, for smoothing method NEAREST(1), over region SHX, using 3600 pairs.
DEBUG 2: Computing Scalar Partial Sums.
DEBUG 2: Processing RH/P250 versus RH/P250, for smoothing method NEAREST(1), over region TRO, using 2448 pairs.
DEBUG 2: Computing Scalar Partial Sums.
DEBUG 2: Processing RH/P250 versus RH/P250, for smoothing method NEAREST(1), over region PNA, using 1311 pairs.
DEBUG 2: Computing Scalar Partial Sums.
EXERCISE 1.2: log_boost - Change the Logging Settings
Instructions: Modify the METplus configuration files to change the logging settings to see what is available.
- Create a new custom configuration file and name log_boost.conf for this exercise.
touch log_boost.conf
- Open log_boost.conf with an editor and add extra information as desired.
Change OUTPUT_BASE to a new location so you can keep it separate from the other runs.
OUTPUT_BASE = {ENV[METPLUS_TUTORIAL_DIR]}/output/exercises/log_boost
The sections at the bottom of this page describe different logging configurations you can change. Play around with changing these settings and see how it affects the log output.
- Rerun master_metplus passing in your new custom config file for this exercise
- Review the log output to see how things have changed from these settings
- Review metplus_config/metplus_logging.conf to see other logging configurations you can change and test them out!
Log Configurations
Separate METplus Logs from MET Logs
Setting [config] LOG_MET_OUTPUT_TO_METPLUS to no will create a separate log file for each MET application.
LOG_MET_OUTPUT_TO_METPLUS = no
For this use case, two log files will be created: master_metplus.log.YYYYMMDD and grid_stat.log_YYYYMMDD
Increase Log Output Level for MET Applications
Setting [config] LOG_MET_VERBOSITY to a number between 1 and 5 will change the logging level for the MET applications logs. Increasing the number results in more log output. The default value is 2.
LOG_MET_VERBOSITY = 5
Increase Log Output Level for METplus Wrappers
Setting [config] LOG_LEVEL will change the logging level for the METplus Wrapper logs. Valid values are NOTSET, DEBUG, INFO, WARNING, ERROR, CRITICAL. Logs will contain all information of the desired logging level and higher. The default value is DEBUG.
LOG_LEVEL = DEBUG
One approach to logging configuration would be to set the LOG_LEVEL to INFO in the base configuration file (metplus_config/metplus_logging.conf) and pass in user_config/log_boost.conf when rerunning after an error occurs.
Use Time of Data Instead of Current Time
Setting LOG_TIMESTAMP_USE_DATATIME to yes will use the first time of your data instead of the current time.
LOG_TIMESTAMP_USE_DATATIME = yes
For this use case, VALID_BEG = 2017061300, so the log files will have the format: master_metplus.log.20170613 instead of using today's date
Change Format of Time in Logfile Names
Setting LOG_TIMESTAMP_TEMPLATE to %Y%m%d%H%M will add hour and minute to the log file time. The default value is %Y%m%d which results in the format YYYYMMDD.
LOG_TIMESTAMP = %Y%m%d%H%M;
For this use case, the log files will have the format: master_metplus.log.YYYYMMDDHH