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

Remove Basemap dependency #61

Merged
merged 2 commits into from
May 9, 2024
Merged

Remove Basemap dependency #61

merged 2 commits into from
May 9, 2024

Conversation

Ghazal-Mohammadpour
Copy link
Collaborator

Description

This PR removes the Basemap dependency from the code. Basemap is being deprecated because Cartopy provides similar functionality for plotting geographic data.

Changes:

  • Removed Basemap import statement and associated code.

Explanation

  • Basemap functionality has been replaced with equivalent functionality from Cartopy.
  • The code remains fully functional and produces the same visual output without relying on Basemap.

@JessicaMeixner-NOAA
Copy link
Collaborator

@ricampos please let us know if this will cause any issues or if something needs to be added in its place. Based on this PR it looks like these functions aren't really used, but I could definitely be reading the code incorrectly. We do not want to break anything, but would like to remove basemap.

@ricampos
Copy link
Collaborator

ricampos commented May 9, 2024

Hi. It is ok, it is a good udpate. The pvalstats.py will take the pallete from matplotlib.pyplot.
I see only pvalstats.py was modified. The same can be done with ww3tools/organizeDistanceToCoast.py (it is not an important code, but since we are doing this ...)
And ww3tools/gridSatGlobal_Altimeter.py and ww3tools/prepGridMask.py are using the shiftgrid from basemap
from mpl_toolkits.basemap import shiftgrid
which can be replaced with another shiftgrid function somehow (I haven't tried yet)

@JessicaMeixner-NOAA
Copy link
Collaborator

It looks like the update to ww3tools/organizeDistanceToCoast.py is equally as simple, so updating that in this PR is a great idea. The shiftgrid function is a more complicated update, so I recommend us creating an issue so that we can track the need to do this, but holding off on that for another PR. Does that sound okay @ricampos ?

@ricampos
Copy link
Collaborator

ricampos commented May 9, 2024

Yes. I agree. Thank you

@JessicaMeixner-NOAA
Copy link
Collaborator

Issue #64 has been created to track the shiftgrid.

@Ghazal-Mohammadpour let me know if you have any questions about also removing basemap from ww3tools/organizeDistanceToCoast.py in this PR.

@JessicaMeixner-NOAA JessicaMeixner-NOAA self-requested a review May 9, 2024 20:05
@JessicaMeixner-NOAA
Copy link
Collaborator

@ricampos - @Ghazal-Mohammadpour has made the changes and we made the new issue for shiftgrid.

@ricampos
Copy link
Collaborator

ricampos commented May 9, 2024

Perfect. I can see the modifications. Thank you

@ricampos ricampos merged commit 01a3bb5 into develop May 9, 2024
@JessicaMeixner-NOAA JessicaMeixner-NOAA deleted the pval-basemap branch May 9, 2024 20:18
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.

3 participants