From 27b3bfdda28e18903fab0ba4213d8cfd8eb3df49 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Tue, 26 Jul 2022 14:54:46 -0600 Subject: [PATCH 1/3] per #1713, remove setting of METPLOTPY_BASE env var in each use case config file and instead set it in the global config settings for the automated test environment, ci-run-all-cases --- .github/parm/test_settings.conf | 3 +++ .../s2s/UserScript_obsPrecip_obsOnly_CrossSpectraPlot.conf | 2 -- .../s2s/UserScript_obsPrecip_obsOnly_Hovmoeller.conf | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/parm/test_settings.conf b/.github/parm/test_settings.conf index 05e7a5d005..01cbc7f58d 100644 --- a/.github/parm/test_settings.conf +++ b/.github/parm/test_settings.conf @@ -14,3 +14,6 @@ GEMPAKTOCF_JAR = /data/input/GempakToCF.jar # also set location of GFDL Tracker executables GFDL_TRACKER_EXEC = /usr/local/bin + +[user_env_vars] +METPLOTPY_BASE = {METPLUS_BASE}/../METplotpy \ No newline at end of file diff --git a/parm/use_cases/model_applications/s2s/UserScript_obsPrecip_obsOnly_CrossSpectraPlot.conf b/parm/use_cases/model_applications/s2s/UserScript_obsPrecip_obsOnly_CrossSpectraPlot.conf index 44a433f6c5..92f9ba76eb 100644 --- a/parm/use_cases/model_applications/s2s/UserScript_obsPrecip_obsOnly_CrossSpectraPlot.conf +++ b/parm/use_cases/model_applications/s2s/UserScript_obsPrecip_obsOnly_CrossSpectraPlot.conf @@ -22,8 +22,6 @@ LOG_LEVEL = "INFO" INPUT_FILE_NAMES = {INPUT_BASE}/model_applications/s2s/UserScript_obsPrecip_obsOnly_CrossSpectraPlot/SpaceTimeSpectra_ERAI_P_D200_symm_2spd.nc,{INPUT_BASE}/model_applications/s2s/UserScript_obsPrecip_obsOnly_CrossSpectraPlot/SpaceTimeSpectra_ERAI_TRMM_P_symm_2spd.nc,{INPUT_BASE}/model_applications/s2s/UserScript_obsPrecip_obsOnly_CrossSpectraPlot/SpaceTimeSpectra_ERAI_P_D850_symm_2spd.nc -METPLOTPY_BASE = {METPLUS_BASE}/METplotpy - YAML_CONFIG_NAME = {METPLUS_BASE}/parm/use_cases/model_applications/s2s/UserScript_obsPrecip_obsOnly_CrossSpectraPlot/spectra_plot.yaml OUTPUT_DIR = {OUTPUT_BASE}/plots/ diff --git a/parm/use_cases/model_applications/s2s/UserScript_obsPrecip_obsOnly_Hovmoeller.conf b/parm/use_cases/model_applications/s2s/UserScript_obsPrecip_obsOnly_Hovmoeller.conf index ed4ef9111b..3f99880699 100644 --- a/parm/use_cases/model_applications/s2s/UserScript_obsPrecip_obsOnly_Hovmoeller.conf +++ b/parm/use_cases/model_applications/s2s/UserScript_obsPrecip_obsOnly_Hovmoeller.conf @@ -23,5 +23,4 @@ YAML_CONFIG_NAME = {PARM_BASE}/use_cases/model_applications/s2s/UserScript_obsPr INPUT_FILE_NAME = {INPUT_BASE}/model_applications/s2s/UserScript_obsPrecip_obsOnly_Hovmoeller/precip.erai.sfc.1p0.2x.2014-2016.nc -METPLOTPY_BASE = {METPLUS_BASE}/../METplotpy OUTPUT_DIR = {OUTPUT_BASE}/plots From 3fb8be4e258d818842c584804d0cdaa9465a6e50 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Tue, 26 Jul 2022 14:55:58 -0600 Subject: [PATCH 2/3] per #1713, added instructions to set METPLOTPY_BASE via [user_env_vars] in the default METplus config file upon install if necessary --- parm/metplus_config/defaults.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/parm/metplus_config/defaults.conf b/parm/metplus_config/defaults.conf index e4636ba47a..2122f41e34 100644 --- a/parm/metplus_config/defaults.conf +++ b/parm/metplus_config/defaults.conf @@ -107,3 +107,14 @@ LOG_DEBUG_LINE_FORMAT = {LOG_LINE_FORMAT} LOG_INFO_LINE_FORMAT = %(asctime)s.%(msecs)03d %(name)s %(levelname)s: %(message)s LOG_LINE_DATE_FORMAT = %m/%d %H:%M:%S + +############################################################################### +# METplotpy Installation Location # +# * Uncomment and set METPLOTPY_BASE to the path where # +# METplotpy is installed. This is not necessary if METplotpy will not be # +# used or if METPLOTPY_BASE is set in the user's environment. # +############################################################################### + +[user_env_vars] + +#METPLOTPY_BASE= /path/to/METplotpy From eea04176abbbe7429f1c6e09fdd1c2972b6cf4b0 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Tue, 26 Jul 2022 15:49:22 -0600 Subject: [PATCH 3/3] per #1713, added documentation to describe METPLOTPY_BASE variable that was added to the defaults.conf file --- docs/Users_Guide/systemconfiguration.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/Users_Guide/systemconfiguration.rst b/docs/Users_Guide/systemconfiguration.rst index b823a8f9c2..35ac0a4ee2 100644 --- a/docs/Users_Guide/systemconfiguration.rst +++ b/docs/Users_Guide/systemconfiguration.rst @@ -154,6 +154,18 @@ change the value appropriately:: MET_BIN_DIR = {MET_INSTALL_DIR}/exec + +METPLOTPY_BASE (user_env_vars) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This is the path to the location where METplotpy is installed. +The variable is found under the [user_env_vars] section heading, which +will set it as an environment variable. See :ref:`user_defined_config` +for more information on the [user_env_vars] section. +This variable is referenced in some METplotpy functions. +It is not necessary to set this variable if METplotpy will not be used or if +it is already set in the user's environment. + .. _metplus_final_conf: METPLUS_CONF