Skip to content

Add option to ignore the grid hash to the CLI#2387

Closed
gavinevans wants to merge 1 commit into
metoppv:masterfrom
gavinevans:mobt_1138_grid_hash_cli
Closed

Add option to ignore the grid hash to the CLI#2387
gavinevans wants to merge 1 commit into
metoppv:masterfrom
gavinevans:mobt_1138_grid_hash_cli

Conversation

@gavinevans
Copy link
Copy Markdown
Contributor

Related to https://github.com/metoppv/mo-blue-team/issues/1138, #2360

Description
This PR exposes the option to ignore the grid hash within the spot extract CLI. The option to ignore the grid hash within the SpotExtract plugin was added in #2360.

Testing:

  • Ran tests and they passed OK
  • Added new tests for the new feature(s)

Copy link
Copy Markdown
Contributor

@mo-jbeaver mo-jbeaver left a comment

Choose a reason for hiding this comment

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

Happy with the changes made. Only small comments about the docstrings. Also, this likely means that the Unit and Acceptance tests are likely out of date or inconsistent.

spot forecast is passed in, the entire spot cube will be processed and
returned. The neighbour selection method options have no impact if a
spot cube is passed in.
ignore_grid_match:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
ignore_grid_match:
ignore_grid_match (bool):

spot forecast is passed in, the entire spot cube will be processed and
returned. The neighbour selection method options have no impact if a
spot cube is passed in.
"""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
ignore_grid_match (bool):
If True, the coordinate hash comparison between the diagnostic cube and
the neighbour cube will be ignored. This is not recommended, but
allows the version of Iris and/or Numpy in the plug-in execution
environment to be different from those that generated the neighbour cube.
If False, the grid match check will be performed and an error raised if the
cubes do not match. The default is False, and it is recommended to ensure
that the neighbour cube is generated on the same grid as the diagnostic cube
to avoid any potential issues with incorrect coordinate extraction.
@TODO: Remove this option once the hash calculation is more robust and can
be reliably used across different versions of Iris and Numpy.
"""

Docstring for the new variable needs to be included, copied from the CLI.

@mo-jbeaver mo-jbeaver mentioned this pull request May 21, 2026
2 tasks
@gavinevans
Copy link
Copy Markdown
Contributor Author

Superseded by #2388.

@gavinevans gavinevans closed this May 26, 2026
@gavinevans gavinevans deleted the mobt_1138_grid_hash_cli branch May 26, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants