MetOffice / MetOffice/CATNIP

add more checks to visualisation.vector_plot and test checks

Open
#157 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
5
Forks
2
PR merge metrics
No merged PRs in 30d

Description

At the moment there are a number of issues with the vector_plot function

1. it checks whether there is a single X and Y coord but then doesn't raise an exception
2, it doesn't check whether we have u and v winds (the names of these will be different depending on whether the data is on a rotated pole or not and whether they have been rotated already). At the moment, a user could pass U and V the wrong way around or even pass temperature and pressure and no error would be raised.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at visualisation.vector_plot and inspect its existing coordinate checks and handling of wind variables for rotated-pole and already-rotated data. Add tests covering invalid coordinate and variable inputs, including reversed or non-wind variables. Done means vector_plot raises appropriate exceptions for invalid inputs without changing valid plotting behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.