Modify your Tutorial/User conf files
In this section you will modify the configuration files that will be read for each call to METplus.
The paths in this practical session guide assume:
- You have created a user_config directory in your ${METPLUS_TUTORIAL_DIR} directory
- You have added the shared METplus ush directory to your PATH (done in the Tutorial Setup script)
- You are using the shared installation of MET.
If not, then you need to adjust accordingly.
-
Change to the ${METPLUS_TUTORIAL_DIR} directory. Try running run_metplus.py. You should see the usage statement output to the screen.
run_metplus.py
-
Now try to pass in the example.conf configuration file found in your parm directory under use_cases/met_tool_wrapper/Examples
${METPLUS_BUILD_BASE}/parm/use_cases/met_tool_wrapper/Example/Example.conf
You should see output like this:
04/02 15:40:18.306 metplus (config_metplus.py:77) INFO: Starting METplus configuration setup.
04/02 15:40:18.310 metplus (config_launcher.py:200) INFO: /contrib/METplus/METplus-3.0/parm/metplus_config/metplus_system.conf: Parsed this file
04/02 15:40:18.312 metplus (config_launcher.py:200) INFO: /contrib/METplus/METplus-3.0/parm/metplus_config/metplus_data.conf: Parsed this file
04/02 15:40:18.313 metplus (config_launcher.py:200) INFO: /contrib/METplus/METplus-3.0/parm/metplus_config/metplus_runtime.conf: Parsed this file
04/02 15:40:18.315 metplus (config_launcher.py:200) INFO: /contrib/METplus/METplus-3.0/parm/metplus_config/metplus_logging.conf: Parsed this file
04/02 15:40:18.315 metplus (config_launcher.py:200) INFO: /contrib/METplus/METplus-3.0/parm/use_cases/met_tool_wrapper/Example/Example.conf: Parsed this file
04/02 15:40:18.315 metplus (config_launcher.py:567) ERROR: Directory OUTPUT_BASE is set to or contains /path/to. Please set this to a valid location
04/02 15:40:18Z run-METplus-metplus: ERROR: Directory OUTPUT_BASE is set to or contains /path/to. Please set this to a valid location
Note it ends with an error message stating that OUTPUT_BASE was not set correctly. You will need to configure the METplus wrappers to be able to run a use case.
Some variables in the system conf are set to '/path/to' and must be overridden to run METplus, such as OUTPUT_BASE in defaults.conf.
-
View the defaults.conf file and notice how OUTPUT_BASE = /path/to . This implies it is REQUIRED to be overridden to a valid path.
-
View the tutorial configuration files in your ${METPLUS_TUTORIAL_DIR} directory.
The INPUT_BASE, OUTPUT_BASE, and MET_INSTALL_DIR variables must all be set to run METplus. Since MET_INSTALL_DIR (and possibly INPUT_BASE) should already be set in the default METplus configuration file (completed on install of METplus), only OUTPUT_BASE is required to run. If INPUT_BASE is not set in the tutorial configuration file, it should be set correctly in the defaults configuration file.
We will test out using these configurations on the next page.