Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature #1687 RuntimeFreq read only files needed for given run #1841

Merged
merged 34 commits into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f9ad43f
removed logic to save user env to file
georgemccabe Sep 26, 2022
c544f7d
modified logic to set self.env to be more efficient
georgemccabe Sep 26, 2022
2604114
set LOOP_ORDER to always be processes, ci-run-all-diff
georgemccabe Sep 26, 2022
751f304
added function to easily get string of wrapper name and instance if i…
georgemccabe Sep 27, 2022
f41630b
fix indentation
georgemccabe Sep 27, 2022
8c29a40
log which wrapper is being run at start of each wrapper execution
georgemccabe Sep 27, 2022
2422b6c
per #1687, modified runtime freq logic to get relevant files for each…
georgemccabe Sep 27, 2022
f386fb7
turn on use cases that run SeriesAnalysis and diff with ci-run-diff
georgemccabe Sep 27, 2022
ca70225
removed function that is no longer used
georgemccabe Sep 28, 2022
4c8e2ec
fixed support for processing a group of multiple forecast leads
georgemccabe Sep 28, 2022
f0758f6
updated unit tests to conform to new method of gathering input files …
georgemccabe Sep 28, 2022
f5187a8
renamed variable back to original and ci-run-diff
georgemccabe Sep 28, 2022
bae19ff
updated tests to more closely match what would actually run in the wr…
georgemccabe Sep 28, 2022
9c1365c
added logic to add forecast lead to file name if the number of second…
georgemccabe Sep 28, 2022
d272e88
turn off series_analysis use cases after confirmed they work as expec…
georgemccabe Sep 28, 2022
d9fa464
fixed indent
georgemccabe Sep 28, 2022
3aadc48
moved LOWER_TO_WRAPPER_NAME to constants file
georgemccabe Sep 28, 2022
7eb1127
added description of file content
georgemccabe Sep 28, 2022
7e4c521
fixed wrapper instance name string to use correct formatting of wrapp…
georgemccabe Sep 28, 2022
cc1a011
per #1687, added a function to handle running once for each init/vali…
georgemccabe Sep 28, 2022
5390c08
turn on UserScript and GridDiag use cases to test ci-run-diff
georgemccabe Sep 28, 2022
0cf3650
removed custom loop logic in GridDiag wrapper because it will always …
georgemccabe Sep 28, 2022
ecbc234
skip finding files for wrappers that don't need to find files instead…
georgemccabe Sep 28, 2022
012a652
removed custom loop logic in wrappers because it will always be handl…
georgemccabe Sep 28, 2022
1b4b0c8
changed functions to static methods
georgemccabe Sep 28, 2022
6360386
changed logic to get file list filename to only use string forecast l…
georgemccabe Sep 28, 2022
478ca29
changed warning to error if required variable is not set, ci-run-diff
georgemccabe Sep 28, 2022
67a4c1e
change PlotPointObs wrapper to be a LoopTimes wrapper since it defaul…
georgemccabe Sep 28, 2022
d4c5c3d
turn off all use cases after testing
georgemccabe Sep 28, 2022
1514f4e
Commented line to force LOOP_ORDER to always be processes. After the …
georgemccabe Sep 28, 2022
05f10af
added back run_at_time function
georgemccabe Sep 29, 2022
6d06046
per #1687, remove LOOP_ORDER from the source code and documentation
georgemccabe Sep 29, 2022
c0f66fb
fixed typo in docs
georgemccabe Sep 29, 2022
ed6213f
removed loop order from another test
georgemccabe Sep 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/parm/use_case_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
{
"category": "precipitation",
"index_list": "3-7",
"run": true
"run": false
},
{
"category": "precipitation",
Expand Down
2 changes: 1 addition & 1 deletion docs/Contributors_Guide/create_wrapper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ For example, the new_tool wrapper would be named **NewToolWrapper**.
Add Entry to LOWER_TO_WRAPPER_NAME Dictionary
---------------------------------------------

In *metplus/util/doc_util.py*, add entries to the LOWER_TO_WRAPPER_NAME
In *metplus/util/constants.py*, add entries to the LOWER_TO_WRAPPER_NAME
dictionary so that the wrapper can be found in the PROCESS_LIST even if
it is formatted differently. The key should be the wrapper name in all
lower-case letters without any underscores. The value should be the class name
Expand Down
29 changes: 14 additions & 15 deletions docs/Users_Guide/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1620,12 +1620,12 @@ METplus Configuration Glossary
.. warning:: **DEPRECATED:** Please use :term:`FCST_THRESH_LIST` instead.

FCST_THRESH_LIST
Specify the values of the FCST_THRESH column in the MET .stat file to use. This is optional in the METplus configuration file for running with :term:`LOOP_ORDER` = times.
Specify the values of the FCST_THRESH column in the MET .stat file to use.

| *Used by:* StatAnalysis

OBS_THRESH_LIST
Specify the values of the OBS_THRESH column in the MET .stat file to use. This is optional in the METplus configuration file for running with :term:`LOOP_ORDER` = times.
Specify the values of the OBS_THRESH column in the MET .stat file to use.

| *Used by:* StatAnalysis

Expand All @@ -1647,20 +1647,20 @@ METplus Configuration Glossary
.. warning:: **DEPRECATED:** Please use :term:`FCST_LEVEL_LIST` instead.

FCST_LEVEL_LIST
Specify the values of the FCST_LEV column in the MET .stat file to use. This is optional in the METplus configuration file for running with :term:`LOOP_ORDER` = times.
Specify the values of the FCST_LEV column in the MET .stat file to use.

| *Used by:* StatAnalysis

FCST_VAR_NAME
.. warning:: **DEPRECATED:** Please use :term:`FCST_VAR_LIST` instead.

FCST_VAR_LIST
Specify the values of the FCST_VAR column in the MET .stat file to use. This is optional in the METplus configuration file for running with :term:`LOOP_ORDER` = times.
Specify the values of the FCST_VAR column in the MET .stat file to use.

| *Used by:* StatAnalysis

FCST_UNITS_LIST
Specify the values of the FCST_UNITS column in the MET .stat file to use. This is optional in the METplus configuration file for running with :term:`LOOP_ORDER` = times.
Specify the values of the FCST_UNITS column in the MET .stat file to use.

| *Used by:* StatAnalysis

Expand Down Expand Up @@ -2319,7 +2319,7 @@ METplus Configuration Glossary


LINE_TYPE_LIST
Specify the MET STAT line types to be considered. For TCMPRPlotter, this is optional in the METplus configuration file for running with :term:`LOOP_ORDER` = times.
Specify the MET STAT line types to be considered.

| *Used by:* MakePlots, StatAnalysis, TCMPRPlotter

Expand Down Expand Up @@ -2395,7 +2395,7 @@ METplus Configuration Glossary
.. warning:: **DEPRECATED:** Please use :term:`LOOP_BY` instead.

LOOP_ORDER
Control the looping order for METplus. Valid options are "times" or "processes". "times" runs all items in the :term:`PROCESS_LIST` for a single run time, then repeat until all times have been evaluated. "processes" runs each item in the :term:`PROCESS_LIST` for all times specified, then repeat for the next item in the :term:`PROCESS_LIST`.
.. warning:: **DEPRECATED:** This previously controlled the looping order for METplus. This was removed in v5.0.0. The wrappers will always execute the logic that was previously run when LOOP_ORDER = processes, which runs each item in the :term:`PROCESS_LIST` for all times specified, then repeat for the next item in the :term:`PROCESS_LIST`.

| *Used by:* All

Expand Down Expand Up @@ -3207,20 +3207,20 @@ METplus Configuration Glossary
.. warning:: **DEPRECATED:** Please use :term:`OBS_LEVEL_LIST` instead.

OBS_LEVEL_LIST
Specify the values of the OBS_LEV column in the MET .stat file to use. This is optional in the METplus configuration file for running with :term:`LOOP_ORDER` = times.
Specify the values of the OBS_LEV column in the MET .stat file to use.

| *Used by:* StatAnalysis

OBS_VAR_NAME
.. warning:: **DEPRECATED:** Please use :term:`OBS_VAR_LIST` instead.

OBS_VAR_LIST
Specify the values of the OBS_VAR column in the MET .stat file to use. This is optional in the METplus configuration file for running with :term:`LOOP_ORDER` = times.
Specify the values of the OBS_VAR column in the MET .stat file to use.

| *Used by:* StatAnalysis

OBS_UNITS_LIST
Specify the values of the OBS_UNITS column in the MET .stat file to use. This is optional in the METplus configuration file for running with :term:`LOOP_ORDER` = times.
Specify the values of the OBS_UNITS column in the MET .stat file to use.

| *Used by:* StatAnalysis

Expand Down Expand Up @@ -3837,7 +3837,7 @@ METplus Configuration Glossary
.. warning:: **DEPRECATED:** Please use :term:`MODEL<n>_STAT_ANALYSIS_DUMP_ROW_TEMPLATE` instead.

MODEL<n>_STAT_ANALYSIS_DUMP_ROW_TEMPLATE
Specify the template to use for the stat_analysis dump_row file. A user customized template to use for the dump_row file. If left blank and a dump_row file is requested, a default version will be used. This is optional in the METplus configuration file for running with :term:`LOOP_ORDER` = times.
Specify the template to use for the stat_analysis dump_row file. A user customized template to use for the dump_row file. If left blank and a dump_row file is requested, a default version will be used.

| *Used by:* StatAnalysis

Expand All @@ -3853,7 +3853,7 @@ METplus Configuration Glossary
.. warning:: **DEPRECATED:** Please use :term:`MODEL<n>_STAT_ANALYSIS_OUT_STAT_TEMPLATE` instead.

MODEL<n>_STAT_ANALYSIS_OUT_STAT_TEMPLATE
Specify the template to use for the stat_analysis out_stat file. A user customized template to use for the out_stat file. If left blank and a out_stat file is requested, a default version will be used. This is optional in the METplus configuration file for running with :term:`LOOP_ORDER` = times.
Specify the template to use for the stat_analysis out_stat file. A user customized template to use for the out_stat file. If left blank and a out_stat file is requested, a default version will be used.

| *Used by:* StatAnalysis

Expand Down Expand Up @@ -7636,12 +7636,11 @@ METplus Configuration Glossary
| *Used by:* UserScript

TC_PAIRS_RUN_ONCE
If True and LOOP_ORDER = processes, TCPairs will be run once using the
If True, TCPairs will be run once using the
INIT_BEG or VALID_BEG value (depending on the value of LOOP_BY).
This is the default setting and preserves the original logic of the
wrapper. If this variable is set to False, then TCPairs will run once
for each run time iteration. If LOOP_ORDER = times, then TCPairs will
still run for each run time. The preferred configuration settings to
for each run time iteration. The preferred configuration settings to
run TCPairs once for a range of init or valid times is to set INIT_BEG
to INIT_END (if LOOP_BY = INIT) and define the range of init times to
filter the data inside TCPairs with TC_PAIRS_INIT_BEG and
Expand Down
43 changes: 6 additions & 37 deletions docs/Users_Guide/systemconfiguration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1078,38 +1078,14 @@ the output directory.
Loop Order
----------

The METplus wrappers can be configured to loop first by times then
processes or vice-versa. Looping by times first will run each process in
the process list for a given run time, increment to the next run time, run
each process in the process list, and so on. Looping by processes first
will run all times for the first process, then run all times for the
second process, and so on.
The METplus wrappers will run all times for the first process defined in the
:term:`PROCESS_LIST`, then run all times for the second process, and so on.
The :term:`LOOP_ORDER` variable has been deprecated in v5.0.0.
This is the behavior that was previously executed when LOOP_ORDER = processes.

**Example 1 Configuration**::

[config]
LOOP_ORDER = times

PROCESS_LIST = PCPCombine, GridStat

VALID_BEG = 20190201
VALID_END = 20190203
VALID_INCREMENT = 1d

will run in the following order::

* PCPCombine at 2019-02-01
* GridStat at 2019-02-01
* PCPCombine at 2019-02-02
* GridStat at 2019-02-02
* PCPCombine at 2019-02-03
* GridStat at 2019-02-03


**Example 2 Configuration**::
**Example Configuration**::

[config]
LOOP_ORDER = processes

PROCESS_LIST = PCPCombine, GridStat

Expand All @@ -1126,12 +1102,7 @@ will run in the following order::
* GridStat at 2019-02-02
* GridStat at 2019-02-03

.. note::
If running a MET tool that processes data over a time range, such as
SeriesAnalysis or StatAnalysis, the tool must be run with
LOOP_ORDER = processes.


.. _Custom_Looping:

Custom Looping
Expand Down Expand Up @@ -1782,15 +1753,13 @@ The possible values for the \*_RUNTIME_FREQ variables are:
(init or valid and forecast lead combination).
All filename templates are substituted with values.

Note that :term:`LOOP_ORDER` must be set to processes to run these wrappers.
Also note that the following example may not contain all of the configuration
Note that the following example may not contain all of the configuration
variables that are required for a successful run. The are intended to show
how these variables affect how the data is processed.

**SeriesAnalysis Examples**::

[config]
LOOP_ORDER = processes

LOOP_BY = INIT
INIT_TIME_FMT = %Y%m%d%H
Expand Down
75 changes: 12 additions & 63 deletions docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3693,9 +3693,9 @@ Description
-----------

The MakePlots wrapper creates various statistical plots using python
scripts for the various METplus Wrappers use cases. This can only be run
following StatAnalysis wrapper when LOOP_ORDER = processes. To run
MakePlots wrapper, include MakePlots in PROCESS_LIST.
scripts for the various METplus Wrappers use cases.
This can only be run following StatAnalysis wrapper.
To run MakePlots wrapper, include MakePlots in PROCESS_LIST.

METplus Configuration
---------------------
Expand Down Expand Up @@ -6829,86 +6829,33 @@ Description

The StatAnalysis wrapper encapsulates the behavior of the MET
stat_analysis tool. It provides the infrastructure to summarize and
filter the MET .stat files. StatAnalysis wrapper can be run in two
different methods. First is to look at the STAT lines for a single date,
to use this method set LOOP_ORDER = times. Second is to look at the STAT
lines over a span of dates, to use this method set LOOP_ORDER =
processes. To run StatAnalysis wrapper, include StatAnalysis in
PROCESS_LIST.
filter the MET .stat files.

METplus Configuration
---------------------

The following values must be defined in the METplus Wrappers
configuration file for running with LOOP_ORDER = times:
The following values **must** be defined in the METplus configuration file:

| :term:`STAT_ANALYSIS_OUTPUT_DIR`
| :term:`MODEL<n>_STAT_ANALYSIS_DUMP_ROW_TEMPLATE`
| :term:`MODEL<n>_STAT_ANALYSIS_OUT_STAT_TEMPLATE`
| :term:`LOG_STAT_ANALYSIS_VERBOSITY`
| :term:`MODEL\<n\>`
| :term:`MODEL<n>_OBTYPE`
| :term:`MODEL<n>_STAT_ANALYSIS_LOOKIN_DIR`
| :term:`MODEL_LIST`
| :term:`GROUP_LIST_ITEMS`
| :term:`LOOP_LIST_ITEMS`
| :term:`STAT_ANALYSIS_CONFIG_FILE`
| :term:`STAT_ANALYSIS_JOB_NAME`
| :term:`STAT_ANALYSIS_JOB_ARGS`
| :term:`STAT_ANALYSIS_MET_CONFIG_OVERRIDES`
|

The following values are **optional** in the METplus Wrappers
configuration file for running with LOOP_ORDER = times:

| :term:`DESC_LIST`
| :term:`FCST_VALID_HOUR_LIST`
| :term:`OBS_VALID_HOUR_LIST`
| :term:`FCST_INIT_HOUR_LIST`
| :term:`OBS_INIT_HOUR_LIST`
| :term:`FCST_VAR_LIST`
| :term:`OBS_VAR_LIST`
| :term:`FCST_LEVEL_LIST`
| :term:`OBS_LEVEL_LIST`
| :term:`FCST_UNITS_LIST`
| :term:`OBS_UNITS_LIST`
| :term:`FCST_THRESH_LIST`
| :term:`OBS_THRESH_LIST`
| :term:`FCST_LEAD_LIST`
| :term:`OBS_LEAD_LIST`
| :term:`VX_MASK_LIST`
| :term:`INTERP_MTHD_LIST`
| :term:`INTERP_PNTS_LIST`
| :term:`ALPHA_LIST`
| :term:`COV_THRESH_LIST`
| :term:`LINE_TYPE_LIST`
| :term:`STAT_ANALYSIS_SKIP_IF_OUTPUT_EXISTS`
| :term:`STAT_ANALYSIS_HSS_EC_VALUE`
| :term:`STAT_ANALYSIS_OUTPUT_TEMPLATE`
|

The following values **must** be defined in the METplus Wrappers
configuration file for running with LOOP_ORDER = processes:

| :term:`STAT_ANALYSIS_OUTPUT_DIR`
| :term:`LOG_STAT_ANALYSIS_VERBOSITY`
| :term:`DATE_TYPE`
| :term:`STAT_ANALYSIS_CONFIG_FILE`
| :term:`MODEL\<n\>`
| :term:`MODEL<n>_OBTYPE`
| :term:`MODEL<n>_STAT_ANALYSIS_LOOKIN_DIR`
| :term:`MODEL<n>_REFERENCE_NAME`
| :term:`GROUP_LIST_ITEMS`
| :term:`LOOP_LIST_ITEMS`
| :term:`MODEL_LIST`
| :term:`VX_MASK_LIST`
| :term:`FCST_LEAD_LIST`
| :term:`LINE_TYPE_LIST`
| :term:`STAT_ANALYSIS_JOB_NAME`
| :term:`STAT_ANALYSIS_JOB_ARGS`
| :term:`STAT_ANALYSIS_MET_CONFIG_OVERRIDES`
|

The following values are optional in the METplus Wrappers configuration
file for running with LOOP_ORDER = processes:
The following values are optional in the METplus configuration file:

| :term:`STAT_ANALYSIS_CONFIG_FILE`
| :term:`VAR<n>_FOURIER_DECOMP`
| :term:`VAR<n>_WAVE_NUM_LIST`
| :term:`FCST_VALID_HOUR_LIST`
Expand All @@ -6923,6 +6870,8 @@ file for running with LOOP_ORDER = processes:
| :term:`ALPHA_LIST`
| :term:`STAT_ANALYSIS_HSS_EC_VALUE`
| :term:`STAT_ANALYSIS_OUTPUT_TEMPLATE`
| :term:`MODEL<n>_STAT_ANALYSIS_DUMP_ROW_TEMPLATE`
| :term:`MODEL<n>_STAT_ANALYSIS_OUT_STAT_TEMPLATE`
|

.. warning:: **DEPRECATED:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def test_create_c_dict(metplus_config):
mp = make_plots_wrapper(metplus_config)
# Test 1
c_dict = mp.create_c_dict()
assert(c_dict['LOOP_ORDER'] == 'processes')
# NOTE: MakePlots relies on output from StatAnalysis
# so its input resides in the output of StatAnalysis
assert(c_dict['INPUT_BASE_DIR'] == mp.config.getdir('OUTPUT_BASE')
Expand Down
Loading