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

support bz2 compression in avhrr_l1b_eps #2978

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions satpy/etc/readers/avhrr_l1b_eps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,5 @@ file_types:
file_reader: !!python/name:satpy.readers.eps_l1b.EPSAVHRRFile
file_patterns: [
'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}',
'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',
'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']
4 changes: 3 additions & 1 deletion satpy/readers/eps_l1b.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from satpy._compat import cached_property
from satpy._config import get_config_path
from satpy.readers.file_handlers import BaseFileHandler
from satpy.readers.utils import unzip_context
from satpy.readers.xmlformat import XMLFormat
from satpy.utils import get_legacy_chunk_size

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

def _read_all(self):
logger.debug("Reading %s", self.filename)
self.sections, self.form = read_records(self.filename)
with unzip_context(self.filename) as fn:
self.sections, self.form = read_records(fn)
self.scanlines = self["TOTAL_MDR"]
if self.scanlines != len(self.sections[("mdr", 2)]):
logger.warning("Number of declared records doesn't match number of scanlines in the file.")
Expand Down
Loading