Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0653/merge plot polar contour #654

Merged
merged 10 commits into from
Dec 4, 2023
Merged

Conversation

b-barton
Copy link
Collaborator

@b-barton b-barton commented Nov 24, 2023

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • [x ] Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • [x ] Build (./build.sh) was run locally and no errors reported. NB not sure about this requirement: GitActions test this
  • [x ] Lint (pylint .) has passed locally and any fixes were made for failures. NB not sure about this requirement: GitActions test this with black

Pull request type

Please check the type of change your PR introduces:

  • [x ] Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

The plot_util.plot_polar_contour() function wasn't working as expected. This could be tested using example_scripts\configuration_gallery\gc31_arctic_example_plot.py and looking at the output figure. The contours do not wrap correctly.

Issue URL: #653

What is the new behavior?

The cartopy solution has been put in. A transform=ccrs.epsg(3413) is needed in the .contour() so I've taken out the use of pyproj. This now plots contours correctly with example_scripts\configuration_gallery\gc31_arctic_example_plot.py

Checklist

  • [x ] Code compiles correctly
  • Created tests which fail without the change (if possible)
  • [x ] All tests passing (pip install . && pytest unit_testing/unit_test.py -s)
  • Extended the README / documentation, if necessary
  • [x ] Added myself / the copyright holder to the AUTHORS file

Does this introduce a breaking change?

  • Yes
  • [x ] No

Other information

New code uses cartopy instead of pyproj. Cartopy is 100% needed in the ax_in.contour() command so I've put in try: import cartopy.crs as ccrs
@b-barton b-barton marked this pull request as draft November 24, 2023 15:05
@b-barton
Copy link
Collaborator Author

I've no idea how these black formatting things work. It failed. Then I changed stuff, it still failed. I changed stuff back and it works?????

@b-barton b-barton marked this pull request as ready for review November 29, 2023 10:27
@soutobias soutobias merged commit 308ffd7 into develop Dec 4, 2023
14 checks passed
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