Skip to content

Bug fixes for issue 128 - #129

Merged
sadielbartholomew merged 5 commits into
NCAS-CMS:mainfrom
bnlawrence:main
Sep 14, 2026
Merged

sadielbartholomew merged 5 commits into
NCAS-CMS:mainfrom
bnlawrence:main

Conversation

@bnlawrence

Copy link
Copy Markdown

Basic issue is that with larger grids, cartopy doesn't do the transforming in the right order. This fixes some of those issues. There are some tests as well. However, the image comparisons don't fully match with previous tests, though eyeballing suggests these are not significant.

@sadielbartholomew sadielbartholomew linked an issue Jul 13, 2026 that may be closed by this pull request

@sadielbartholomew sadielbartholomew left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Merging but will complete follow-on work to respond to own feedback such as that below.

Comment thread cfplot/contour.py
)


logger = logging.getLogger(__name__)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is a long-standing issue on adding in proper logging - see #41, and generally would be better to add it in wholescale in one PR than have the odd log here and there. So I will either remove this logging for now, else escalate adding in the rest of the logging once this PR is merged and I have coordinated on release prep.

Comment on lines +67 to +73
f = _FakeField(
{
"X": _FakeConstruct(np.linspace(0, 350, 36)),
"Y": _FakeConstruct(np.linspace(-90, 90, 19)),
"T": _FakeConstruct([1], dtvalues=["2001-01-01 00:00:00"]),
}
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We generally use the set of cf.example_fields() to test, which contain comprehensive metadata and together cover numerous forms of data one might want to encode via the CF Conventions. So it is much preferred to use these when wanting quick-access 'dummy' fields. I'll update the testing accordingly post-merge.

@sadielbartholomew
sadielbartholomew merged commit c2ca1c1 into NCAS-CMS:main Sep 14, 2026
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.

Some mapping types go wrong with bigger grids

2 participants