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

Bugfix #1910 develop EnsembleStat level in forecast input template #1919

Merged
merged 9 commits into from
Nov 11, 2022

Conversation

georgemccabe
Copy link
Collaborator

@georgemccabe georgemccabe commented Nov 7, 2022

Change Summary

I refactored the logic to be consistent about setting field information in filename templates to ensure that all uses of templates will support the correct values.

  • Added a function that sets the fcst and obs field information in the time_info dictionary so that they can be referenced in the filename templates. Values for {fcst/obs_name/level/thresh} can be referenced in filename templates as strings which will use the full value. For example, if FCST_VAR1_LEVELS = A06 and a FCST_*_INPUT_TEMPLATE include {fcst_level}, then A06 will be used.
  • Modified logic used to find input files to expect the fcst/obs field information is set in the time_info dictionary instead of passing in the field info separately. The value for {level} will be the time of the corresponding input, e.g. if FCST_VAR1_LEVELS = A06 and {level?fmt=%3H} is referenced in FCST_ENSEMBLE_STAT_INPUT_TEMPLATE, then the template tag will be substituted with 006. This preserves the previous behavior but ensures it will be available consistently.
  • Modified wrapper logic to call the new function for each field that is processed so that all uses of filename template substitution will contain the appropriate field information.

Pull Request Testing

  • Describe testing already performed for these changes:

Added unit tests for correct behavior
Confirmed unit test fails using develop, but succeeds with the updates from this pull request

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

Confirm all tests pass

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]

  • Do these changes include sufficient testing updates? [Yes]

  • Will this PR result in changes to the test suite? [No]

    New tests were added but they should all pass

  • Please complete this pull request review by 11/14/2022.

Pull Request Checklist

See the METplus Workflow for details.

  • Add any new Python packages to the METplus Components Python Requirements table.
  • Review the source issue metadata (required labels, projects, and milestone).
  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s)
    Select: Organization level software support Project or Repository level development cycle Project
    Select: Milestone as the version that will include these changes
  • After submitting the PR, select Development with the original issue number.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.

…ctionary and updated wrapper logic to use this function to add this info instead of passing field info (var_info) to CommandBuilder.find_data to get level info, ci-run-all-diff
…riesAnalysis cases build the same file names, but parse out time info for setting generic level for string sub to preserve previous behavior
@georgemccabe georgemccabe added this to the METplus-5.0.0 milestone Nov 7, 2022
@georgemccabe georgemccabe linked an issue Nov 7, 2022 that may be closed by this pull request
23 tasks
@georgemccabe georgemccabe mentioned this pull request Nov 11, 2022
14 tasks
Copy link
Contributor

@hankenstein2 hankenstein2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, I ran the pytest on seneca and tried a few modifications in
/precipitation/GridStat_fcstHREFmean_obsStgIV_Gempak.conf

Everything seems to check out.

@hankenstein2 hankenstein2 merged commit 4f1d6e6 into develop Nov 11, 2022
@hankenstein2 hankenstein2 deleted the bugfix_1910_develop_ensemble_stat_lev_in_fcst branch November 11, 2022 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Bugfix: Set level properly in filename template for EnsembleStat forecast input
2 participants