Skip to content

Commit

Permalink
replace pydap with xarray
Browse files Browse the repository at this point in the history
  • Loading branch information
nilshempelmann committed Jun 19, 2024
1 parent 804fe74 commit e678f94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions albatross/atmos_ocean_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def openDAPsst(version = '3b', debug = False, anomalies = True, **kwargs):
"""
from albatross.utils import int_to_month
from os.path import isfile
from pydap.client import open_url
from xarray import open_dataset
# from pydap.client import open_url
from numpy import arange
from numpy import squeeze
import pickle
Expand Down Expand Up @@ -82,7 +83,8 @@ def openDAPsst(version = '3b', debug = False, anomalies = True, **kwargs):

LOGGER.info('Starting download...')
LOGGER.info(SSTurl)
dataset = open_url(SSTurl)
# dataset = open_url(SSTurl) # Python 3.6 dependency
dataset = open_dataset(SSTurl)
arg = 'anom' if anomalies else 'sst'
sst = dataset[arg]

Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- defaults
dependencies:
- pip
- python<=3.9
- python>=3.10
- pywps>=4.5.2,<4.7
- jinja2
- click
Expand Down

0 comments on commit e678f94

Please sign in to comment.