Skip to content

Commit

Permalink
Just have a single client for the GOES archives
Browse files Browse the repository at this point in the history
  • Loading branch information
dopplershift committed Apr 27, 2023
1 parent d98faec commit 3d3ec2e
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/metpy/remote/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ def _build_result(self, obj):


@exporter.export
class GOES16Archive(S3DataStore):
def __init__(self, bucket_name='noaa-goes16'):
super().__init__(bucket_name, delimiter='/')
class GOESArchive(S3DataStore):
def __init__(self, satellite):
super().__init__(f'noaa-goes{satellite}', delimiter='/')

Check warning on line 183 in src/metpy/remote/aws.py

View check run for this annotation

Codecov / codecov/patch

src/metpy/remote/aws.py#L180-L183

Added lines #L180 - L183 were not covered by tests

def product_ids(self):

Check warning on line 185 in src/metpy/remote/aws.py

View check run for this annotation

Codecov / codecov/patch

src/metpy/remote/aws.py#L185

Added line #L185 was not covered by tests
"""Return product_ids available."""
Expand Down Expand Up @@ -230,15 +230,3 @@ def get_product(self, product, dt, mode=None, channel=None):

def _build_result(self, obj):
return Product(obj, lambda s: xr.open_dataset(s.url + '#mode=bytes', engine='netcdf4'))

Check warning on line 232 in src/metpy/remote/aws.py

View check run for this annotation

Codecov / codecov/patch

src/metpy/remote/aws.py#L231-L232

Added lines #L231 - L232 were not covered by tests


@exporter.export
class GOES17Archive(GOES16Archive):
def __init__(self):
super().__init__('noaa-goes17')


@exporter.export
class GOES18Archive(GOES16Archive):
def __init__(self):
super().__init__('noaa-goes18')

0 comments on commit 3d3ec2e

Please sign in to comment.