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 #2578 PCPCombine -input_thresh for missing inputs #2609

Merged
merged 19 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0850dee
refactoring to reduce duplicate/redundant code, reduce cognitive comp…
georgemccabe Jun 5, 2024
d7d9a1c
change wording of error log to satisfy test
georgemccabe Jun 5, 2024
defdf1c
set -input_thresh argument if set for add, derive, and sum methods. r…
georgemccabe Jun 6, 2024
eb0d8c0
refactor how level is handled in find_data function so that if the le…
georgemccabe Jun 6, 2024
ca055e9
refactor duplicate code into function to satisfy SonarQube
georgemccabe Jun 6, 2024
ecfc5cc
removed unused variable
georgemccabe Jun 6, 2024
8d03770
use find_data function to find input files to be consistent with othe…
georgemccabe Jun 6, 2024
46fdb1e
fix typo in key
georgemccabe Jun 6, 2024
fd3f9e7
suppress warnings when files aren't found because it is expected
georgemccabe Jun 6, 2024
7216409
formatting to be consistent in doc string
georgemccabe Jun 6, 2024
b09279c
per #2578, add MISSING before file path that is not found if input_th…
georgemccabe Jun 6, 2024
f521f03
add documentation blocks for new functions, ci-run-all-diff
georgemccabe Jun 6, 2024
e336c9e
use pytest fixture instead of local function
georgemccabe Jun 10, 2024
d67523c
add support for setting -vld_thresh argument
georgemccabe Jun 10, 2024
a72dc80
per #2578, added documentation and tests for setting -input_thresh an…
georgemccabe Jun 10, 2024
8269d26
moved verbosity argument to end of command to more easily change it w…
georgemccabe Jun 10, 2024
160e2a5
refactor to reduce cognitive complexity to satisfy SonarQube
georgemccabe Jun 10, 2024
48cf20c
update usage statement to include METplus version number
georgemccabe Jun 11, 2024
c0365d6
Merge branch 'develop' into feature_2578_pcp_combine_missing_inputs
georgemccabe Jun 12, 2024
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
26 changes: 26 additions & 0 deletions docs/Users_Guide/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11979,3 +11979,29 @@ METplus Configuration Glossary
There is no default, so a value must be specified. All runtime frequencies are supported.

| *Used by:* UserScript

FCST_PCP_COMBINE_INPUT_THRESH
Specify the value for the command line argument '-input_thresh' for the
forecast run of PCPCombine, e.g. :term:`FCST_PCP_COMBINE_RUN` is True.
Not used when :term:`FCST_PCP_COMBINE_METHOD` is SUBTRACT or USER_DEFINED.

| *Used by:* PCPCombine

OBS_PCP_COMBINE_INPUT_THRESH
Specify the value for the command line argument '-input_thresh' for the
observation run of PCPCombine, e.g. :term:`OBS_PCP_COMBINE_RUN` is True.
Not used when :term:`OBS_PCP_COMBINE_METHOD` is SUBTRACT or USER_DEFINED.

| *Used by:* PCPCombine

FCST_PCP_COMBINE_VLD_THRESH
Specify the value for the command line argument '-vld_thresh' for the
forecast run of PCPCombine, e.g. :term:`FCST_PCP_COMBINE_RUN` is True.

| *Used by:* PCPCombine

OBS_PCP_COMBINE_VLD_THRESH
Specify the value for the command line argument '-vld_thresh' for the
observation run of PCPCombine, e.g. :term:`OBS_PCP_COMBINE_RUN` is True.

| *Used by:* PCPCombine
4 changes: 4 additions & 0 deletions docs/Users_Guide/wrappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6027,6 +6027,10 @@ METplus Configuration
| :term:`PCP_COMBINE_INC_VALID_TIMES`
| :term:`PCP_COMBINE_SKIP_INIT_TIMES`
| :term:`PCP_COMBINE_INC_INIT_TIMES`
| :term:`FCST_PCP_COMBINE_INPUT_THRESH`
| :term:`FCST_PCP_COMBINE_VLD_THRESH`
| :term:`OBS_PCP_COMBINE_INPUT_THRESH`
| :term:`OBS_PCP_COMBINE_VLD_THRESH`
|

.. warning:: **DEPRECATED:**
Expand Down
8 changes: 5 additions & 3 deletions internal/tests/pytests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,13 @@ def make_nc(tmp_path, lon, lat, z, data, variable='Temp', file_name='fake.nc'):
def get_test_data_dir():
"""!Get path to directory containing test data.
"""
def get_test_data_path(subdir):
def get_test_data_path(subdir=None):
internal_tests_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), os.pardir)
os.path.join(os.path.dirname(__file__), os.pardir, 'data')
)
return os.path.join(internal_tests_dir, 'data', subdir)
if subdir:
internal_tests_dir = os.path.join(internal_tests_dir, subdir)
return internal_tests_dir

return get_test_data_path

Expand Down
Loading