British-Oceanographic-Data-Centre / COAsT

A Coastal Ocean Assessment Tool built as an extendable python framework for nemo models
https://british-oceanographic-data-centre.github.io/COAsT/
MIT License
23 stars 11 forks source link

0624/polar quivers notebook #650

Closed b-barton closed 8 months ago

b-barton commented 8 months ago

Pull request checklist

Please check if your PR fulfills the following requirements:

Pull request type

Please check the type of change your PR introduces: - [ ] Bugfix - [x ] Feature - [ ] Code style update (formatting, renaming) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] Documentation content changes - [x ] Other (please describe): Example notebooks ## What is the current behavior?

Issue URL: #

What is the new behavior?

New example notebooks for the Arctic domain. This shows how to plot quivers and use the functions to make adjustments for NEMO curvilinear grid and cartopy polar projection. An additional notebook has been added for plotting the new example dataset (a cropped version of a global NEMO run) for the Arctic. This includes plotting contours over the arctic which are not straight forward. Additional plotting helper functions have been added to plot_util for making polar plots and for plotting contours on polar plots. Tests included for these.

-

Checklist

Does this introduce a breaking change?

Other information

jpolton commented 8 months ago

Hmmm. There is definitely a problem with installing cartopy on the GitAction runners. The problem looks like the containers are trying to install cartopy from source, which is hard. The internet recommends using conda to install cartopy. However, the runners use a pip install method that uses the requirements.txt file. Perhaps it would be easier if the runners copied the environment.yml approach with slip pip and conda install methods? Hmmm

jpolton commented 8 months ago

Previously we installed cartopy but not pyproj. The problem now might be it is hard to mix these two packages as cartopy has pyproj under the hood...

Maybe explicit use of pyproj can be avoided: https://clouds.eos.ubc.ca/~phil/courses/atsc301/html/cartopy_mapping_pyproj.html looks like it might be possible Then we would revert back to previous build requirements

soutobias commented 8 months ago

@jpolton @b-barton , I've made code updates by replacing cartopy with pyproj. Additionally, I've incorporated changes in the code to address pylint-related issues. All tests are passing, except for the pylint test. However, I've already addressed the pylint issue in a separate branch, which will resolve this issue. I also updated the example files and now they have only 5 mb.