Skip to content

Feature 560 mode field plot - #586

Open
bikegeek wants to merge 40 commits into
developfrom
feature_560_mode_field_plot
Open

bikegeek wants to merge 40 commits into
developfrom
feature_560_mode_field_plot

Conversation

@bikegeek

@bikegeek bikegeek commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Testing

  • Describe testing already performed for these changes:

    generated pytests to verify plots are generated

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

code is set up on 'seneca': /d1/projects/MODE_Field_Plot with instructions for setting up PYTHONPATH, conda environment to use, and running the plot

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

User Documentation: ReadtheDocs.io
https://metplus.readthedocs.io/projects/metplotpy/en/feature_560_mode_field_plot

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

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

    If yes, describe the new output and/or changes to the existing output:

  • Do these changes introduce new SonarQube findings? [Yes]

    If yes, please describe:

Quality gate threshold for test coverage may not be met

  • Please complete this pull request review by [for beta3 release Oct].

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) and Development issue
    Select: Milestone as the version that will include these changes
    Select: Coordinated METplus-X.Y Support project for bugfix releases or METplotpy-X.Y.Z Development project for official releases
  • After submitting the PR, select the ⚙️ icon in the Development section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
  • 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.

bikegeek and others added 30 commits August 15, 2026 06:39
not needed, put the methods in the mode_field_plot module
…onfig which supports ENV vars in yaml config file
…bsequent plots using the same data and configuration to ensure no changes have transpired
…o address apply_theta_transforms becoming deprecated in Matplotlib 3.11
@michelleharrold

Copy link
Copy Markdown

@bikegeek -- thank for getting this done! I did some minimal testing, and it works! Note, I could have done more extensive testing, but for an initial capability it is great -- and with more DTC testing coming up, I am sure we will be exercising this more. I added some comments above from my human review. Claude also flagged a few things (that I am less knowledgeable about, so I will copy/paste what it said):

get_config_value calls a method that doesn’t exist. Any call with more than one key hits self._get_nested, which isn’t defined in ModeFieldPlotConfig. It looks copied from another config class. Nothing calls it that way today, so it works by luck. Either define it or delete the nested branch.

The plot_filename logic is broken.

  • In the raw case it assigns a local plot_name instead of self.plot_filename, so the attribute never exists for raw plots.
  • Nothing uses plot_filename anyway, because output_filename drives everything.

Comment thread docs/Users_Guide/mode_field_plot.rst Resolved
return d


def build_rgba(self, obj_id, clus_id, color_map, unmatched_color=(0.0, 0.0, 1.0)):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unmatched as blue is good, but tab20 color is a nearby blue (and used elsewhere). It might be good to change tab20 to a more distinctly different blue.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

prompted Claude to find a better colormap, none meet criteria where blues are similar shades. Suggested fix is to remove blues from the tab20 colormap. Now blue for unmatched is the only blue.

Comment thread metplotpy/plots/util.py Resolved
bikegeek and others added 9 commits November 4, 2026 09:32
…arth_shapefile is set to False. This ensures that the shapefile is in the package-data list to facilitate pip installs.
- mode_obj_file is now the full path to the MODE netCDF file, matching
  the raw and objects configs; input_dir is removed from the defaults
  and the config class.
- Matched clusters no longer use the blues from tab20/tab20b, so blue
  only marks unmatched objects.
- Update the expected objects test image and the User's Guide figure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…feature_560_mode_field_plot

# Conflicts:
#	metplotpy/plots/taylor_diagram/taylor_diagram.py
The forecast title showed its units twice (from the file and a leftover
hard-coded "(mm)"), and the observation title used the forecast units.
Each raw panel title now shows its own units once, after the variable
name, as the objects titles do. Update the raw User's Guide figure and
expected test image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 In review

Development

Successfully merging this pull request may close these issues.

Enhance METplotpy to plot NetCDF output from MODE to replace MET's deprecated plot_mode_field utility

2 participants