Skip to content

Enhance MPR Python embedding to support all MET STAT line types #2539

@DanielAdriaansen

Description

@DanielAdriaansen

Describe the Enhancement

The current Python embedding support for MPR line type data is very specific to MPR line types, and deviates from the typical MPR line type format because it assumes VERSION column is excluded. For users who choose to generate their own MPR line type (or other line type data) that was NOT generated by a MET tool, this is confusing and in conflict with the format of the MPR line type data generated when using a MET tool. Similarly, users may wish to also:

  1. Use other line types with MET using Python embedding
  2. Include additional data as "extra columns" that they may wish to use in StatAnalysis, for example

The enhancement request is to modify the current implementation of the MPR Python embedding to support all other line types, as well as additional columns of data not typically found in those line types, if the user wishes. One suggested moniker for the generalized capability is Python embedding for STAT line types (e.g. read_ascii_stat_line.py, etc.).

The work can be broken down into the following generalized pieces:

  1. We will assume that the user has a single line type of data, specified in the LINE_TYPE column of the "common STAT output" columns.
  2. We will use this LINE_TYPE, and also the MET version number (as determined by MET, not by the user's VERSION column in their "common STAT output") to determine what specific columns to look for in the users data.
  3. We will have a pre-processing layer to re-organize the columns of data from the user's order to the order MET expects for the LINE_TYPE that was identified. For example, a user may have a DataFrame with 100 columns, and one of those columns is FCST but it is not in the correct column number for the MPR line type. The pre-processing layer will extract the FCST column from the user's DataFrame and insert it in the expected column number for the version of MET being used.
  4. Additional columns will be appended to the end of the columns correctly ordered for the LINE_TYPE being used by the users. These columns will retain their names inside of MET, so that they can be referenced just like other STAT columns in tools like StatAnalysis for filtering.

Time Estimate

Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.

Sub-Issues

Consider breaking the enhancement down into sub-issues.

  • Add a checkbox for each sub-issue here.

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 Repository and/or Organization level Project(s) or add alert: NEED CYCLE ASSIGNMENT label
  • Select Milestone as the next official version or Future Versions

Define Related Issue(s)

Consider the impact to the other METplus components.

We should consider the impact of any use cases in the METplus wrappers repository.

Enhancement 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 develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions