Skip to content

Explicitly install netCDF4 #239

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

Merged
merged 1 commit into from
Nov 13, 2018
Merged

Explicitly install netCDF4 #239

merged 1 commit into from
Nov 13, 2018

Conversation

seisman
Copy link
Member

@seisman seisman commented Nov 13, 2018

Description of proposed changes

conda-forge/xarray-feedstock drops optional dependencies several days ago. Thus we need install netCDF4 explicitly.

Fixes #238

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

conda-forge/xarray-feedstock drops optional dependencies several days
ago. Thus we need install netCDF4 explicitly.

Fixes #238
@seisman seisman requested a review from leouieda November 13, 2018 19:56
Copy link
Member

@leouieda leouieda left a comment

Choose a reason for hiding this comment

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

Thanks, @seisman! I noticed this on other projects as well. It's not that big a deal for us because GMT should be requiring the C libraries anyway.

@leouieda leouieda merged commit 7a01306 into master Nov 13, 2018
@leouieda leouieda deleted the add-netCDF4 branch November 13, 2018 21:34
@seisman
Copy link
Member Author

seisman commented Nov 13, 2018

load_earth_relief() calls xarray.open_dataarray, which needs netCDF4-python to read the earth_relief files.

@leouieda
Copy link
Member

Yeah. It falls back to a scipy netcdf3 implementation but the GMT files don't conform to that style so no luck.

seisman added a commit that referenced this pull request May 17, 2020
xarray needs the netCDF4 package for reading (perhaps also writing) netCDF files.
However, netCDF4 isn't installed by default since it's an optional
dependency of xarray. Although pygmt doesn't import netCDF4 package
explicitely, some features won't work without the package.

See #239 for past discussions.
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.

Cron builds fail for Python 3.6 and 3.7
2 participants