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 explicit dependency on xesmf #65

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: OS Independent",
],
python_requires='>=3.6',
python_requires='>=3.8',
install_requires=[
'numpy',
'scipy',
Expand All @@ -28,9 +28,7 @@
'netcdf4',
'geopandas>=0.12.0',
'shapely',
'tables',
'xesmf>=0.7.1',
'tables',
'cf_xarray>=0.5.1',
'esmpy>=8.1.0',
],
)
2 changes: 1 addition & 1 deletion xagg/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
try:
from . diag import diag_fig
except ImportError:
raise ImportError('`wm.diag_fig()` separately requires `cartopy` and `matplotlib` to function; make sure these are installed first.')
raise ImportError('`wm.diag_fig()` separately requires `cartopy`, `matplotlib`, and `cmocean` to function; make sure these are installed first.')

Check warning on line 50 in xagg/classes.py

View check run for this annotation

Codecov / codecov/patch

xagg/classes.py#L50

Added line #L50 was not covered by tests


# Plot diagnostic figure
Expand Down
8 changes: 7 additions & 1 deletion xagg/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,13 @@
# Import xesmf here to allow the code to work without it (it
# often has dependency issues and isn't necessary for many
# features of xagg)
import xesmf as xe
try:
import xesmf as xe
except ImportError:
raise ImportError('If the `weights` grid and the `ds` grid are different, '+

Check warning on line 161 in xagg/core.py

View check run for this annotation

Codecov / codecov/patch

xagg/core.py#L160-L161

Added lines #L160 - L161 were not covered by tests
'`xesmf` is needed for `xagg` to regrid them to match; however, '+
'`xesmf` is not installed. Either install `xesmf` or '+
'manually regrid them to match each other.')
if target == 'ds':
if not silent:
print('regridding weights to data grid...')
Expand Down
Loading