Skip to content

Commit 81daacd

Browse files
committed
support bz2 compression in avhrr_l1b_eps
1 parent c214917 commit 81daacd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

satpy/etc/readers/avhrr_l1b_eps.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,5 @@ file_types:
144144
file_reader: !!python/name:satpy.readers.eps_l1b.EPSAVHRRFile
145145
file_patterns: [
146146
'AVHR_xxx_1B_{platform_short_name}_{start_time:%Y%m%d%H%M%SZ}_{end_time:%Y%m%d%H%M%SZ}_{processing_mode}_{disposition_mode}_{creation_time:%Y%m%d%H%M%SZ}',
147+
'AVHR_xxx_1B_{platform_short_name}_{start_time:%Y%m%d%H%M%SZ}_{end_time:%Y%m%d%H%M%SZ}_{processing_mode}_{disposition_mode}_{creation_time:%Y%m%d%H%M%SZ}.bz2',
147148
'AVHR_xxx_1B_{platform_short_name}_{start_time:%Y%m%d%H%M%SZ}_{end_time:%Y%m%d%H%M%SZ}_{processing_mode}_{disposition_mode}_{creation_time:%Y%m%d%H%M%SZ}.nat']

satpy/readers/eps_l1b.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from satpy._compat import cached_property
3131
from satpy._config import get_config_path
3232
from satpy.readers.file_handlers import BaseFileHandler
33+
from satpy.readers.utils import unzip_context
3334
from satpy.readers.xmlformat import XMLFormat
3435
from satpy.utils import get_legacy_chunk_size
3536

@@ -168,7 +169,8 @@ def __init__(self, filename, filename_info, filetype_info):
168169

169170
def _read_all(self):
170171
logger.debug("Reading %s", self.filename)
171-
self.sections, self.form = read_records(self.filename)
172+
with unzip_context(self.filename) as fn:
173+
self.sections, self.form = read_records(fn)
172174
self.scanlines = self["TOTAL_MDR"]
173175
if self.scanlines != len(self.sections[("mdr", 2)]):
174176
logger.warning("Number of declared records doesn't match number of scanlines in the file.")

0 commit comments

Comments
 (0)