Skip to content

Bugfix: PointStat - Support running with no MASK provided #1853

@DanielAdriaansen

Description

@DanielAdriaansen

Describe the Problem

If you have PointStat in the PROCESS_LIST but provide no mask information, the mask{} dictionary in the MET config file will be empty and cause point_stat to return an error.

This is happening because of the way the mask dictionary is set via environment variables.

mask = {
   ${METPLUS_MASK_GRID}
   ${METPLUS_MASK_POLY}
   ${METPLUS_MASK_SID}
   //llpnt =
   ${METPLUS_MASK_LLPNT}
}

If no mask values are set, then the result is mask = {} which throws an error when MET is parsing the config files. The logic should be refactored to instead set ${METPLUS_MASK_DICT}.

As a workaround, users can set POINT_STAT_MASK_GRID = FULL to get the same behavior as the default.

Expected Behavior

If the user does not set any of the *_MASK_* variables when using PointStat, then PointStat should still run using the default mask dictionary values.

Environment

Describe your runtime environment:

  1. Running on seneca

To Reproduce

Describe the steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
Post relevant sample data following these instructions:
https://dtcenter.org/community-code/model-evaluation-tools-met/met-help-desk#ftp

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Organization level Project for support of the current coordinated release
  • Select Repository level Project for development toward the next official release or add alert: NEED PROJECT ASSIGNMENT label
  • Select Milestone as the next bugfix version

Define Related Issue(s)

Consider the impact to the other METplus components.

Bugfix Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of main_<Version>.
    Branch name: bugfix_<Issue Number>_main_<Version>_<Description>
  • Fix the bug and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Add any new Python packages to the METplus Components Python Requirements table.
  • Push local changes to GitHub.
  • Submit a pull request to merge into main_<Version>.
    Pull request: bugfix <Issue Number> main_<Version> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Linked issues
    Select: Organization level software support Project for the current coordinated release
    Select: Milestone as the next bugfix version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Complete the steps above to fix the bug on the develop branch.
    Branch name: bugfix_<Issue Number>_develop_<Description>
    Pull request: bugfix <Issue Number> develop <Description>
    Select: Reviewer(s) and Linked issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Close this issue.

Metadata

Metadata

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions