Closed mnlevy1981 closed 2 months ago
Once the NCAR super computers are back up and running, I'd like to test this out... but I suspect everything will work because I made sure ADF was pinned to the correct hash and the submodules are in the same directory that manage_externals
was using.
Thanks for putting this together! This PR generally looks good, but yes, let's test it out once machines are back up!
Looks like everything is working as expected. I did have some issues running the coupled_model
example, because mom6-tools
relies on some matplotlib calls that have been deprecated:
AttributeError Traceback (most recent call last)
Cell In[2], line 8
6 import intake
7 from mom6_tools.MOM6grid import MOM6grid
----> 8 from mom6_tools.surface import get_MLD, get_BLD
9 import xarray as xr
11 warnings.filterwarnings("ignore")
File /glade/work/mlevy/codes/CUPiD/externals/mom6-tools/mom6_tools/surface.py:14
12 from mom6_tools.DiagsCase import DiagsCase
13 from mom6_tools.m6toolbox import add_global_attrs
---> 14 from mom6_tools.m6plot import xycompare, xyplot
15 from mom6_tools.MOM6grid import MOM6grid
16 from distributed import Client
File /glade/work/mlevy/codes/CUPiD/externals/mom6-tools/mom6_tools/m6plot.py:1871
1868 return lonRange, latRange, hspace, titleOffset
1870 # Load new named colormaps
-> 1871 c = dunne_rainbow()
1872 c = dunne_pm()
1873 c = brownblue_cmap()
File /glade/work/mlevy/codes/CUPiD/externals/mom6-tools/mom6_tools/m6plot.py:1648, in dunne_rainbow(N)
1646 cmap.set_under([.95*.9,.75*.9,.9]); cmap.set_over([.3,0.,0.])
1647 #cmap.set_bad('w')
-> 1648 matplotlib.cm.register_cmap(cmap=cmap)
1649 return cmap
AttributeError: module 'matplotlib.cm' has no attribute 'register_cmap'
The important thing is that mom6-tools
was installed in the environment, so dropping manage_externals
didn't cause the above error. I opened an issue (https://github.com/NCAR/mom6-tools/issues/48); unless we want to pin matplotlib to 3.8 for now, I think we can proceed with this PR as-is.
Regarding the matplotlib version for mom6-tools, Naoki and I also ran into that issue when working on his PR (without these changes).
As we discussed, given that users could always manually change to an earlier matplotlib version and that this is on the coupled model instead of key metrics example, that seems fine to me to wait to fix until the issue you created in mom6-tools is addressed (rather than pinning version 3.8).
Remove
manage_externals
and addADF
andmom6-tools
as git submodules insteadAll Submissions:
pre-commit
check)?New Feature Submissions:
Changes to Core Features: