Skip to content

Fix support for python embedding in shift_data_plane #2173

@JohnHalleyGotway

Description

@JohnHalleyGotway

Describe the Problem

This issue was raised via GitHub Discussions in dtcenter/METplus#1605. Python embedding of gridded data does not work as designed in the shift_data_plane utility.

Expected Behavior

Python embedding of gridded data should work in shift_data_plane as it does in the other MET tools. Both options, of specifying PYTHON_NUMPY directly on the command line or using the MET_PYTHON_INPUT_ARG option should work well in shift_data_plane.

Environment

Describe your runtime environment:
1. Machine: Applies to all
2. OS: Applies to all
3. Software version number(s): identified in MET version 10.1

To Reproduce

Describe the steps to reproduce the behavior:
1. See successful plot_data_plane and unsuccessful shift_data_plane commands listed in this discussion comment.

Ensure that the following 2 uses of shift_data_plane work:

  1. With PYTHON_NUMPY:
bin/shift_data_plane PYTHON_NUMPY out.nc \
'name="scripts/python/read_ascii_numpy.py data/python/fcst.txt FCST";' \
-from 30 -110 -to 35 -115

Results in this error:

ERROR  : process_data_file() -> can't open file "PYTHON_NUMPY"
  1. With MET_PYTHON_INPUT_ARG:
bin/shift_data_plane data/python/fcst.txt out.nc \
'name="scripts/python/read_ascii_numpy.py MET_PYTHON_INPUT_ARG FCST"; file_type=PYTHON_NUMPY;' \
-from 30 -110 -to 35 -115

Results in this error:

ERROR  : process_data_file() -> can't open file "data/python/fcst.txt"

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: 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.
  • 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

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions