Skip to content

Commit

Permalink
add kwargs forward
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhahn committed May 24, 2024
1 parent ed8d688 commit 3aee291
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/ascat/eumetsat/level1.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"""

import os
from datetime import timedelta
from collections import defaultdict

import numpy as np
Expand Down Expand Up @@ -78,7 +77,7 @@ def __init__(self, filename, file_format=None):
else:
raise RuntimeError("ASCAT Level 1b file format unknown")

def read(self, toi=None, roi=None, generic=True, to_xarray=False):
def read(self, toi=None, roi=None, generic=True, to_xarray=False, **kwargs):
"""
Read ASCAT Level 1b data.
Expand All @@ -104,7 +103,7 @@ def read(self, toi=None, roi=None, generic=True, to_xarray=False):
metadata : dict
Metadata.
"""
data, metadata = self.fid.read(generic=generic, to_xarray=to_xarray)
data, metadata = self.fid.read(generic=generic, to_xarray=to_xarray, **kwargs)

if toi:
data = get_toi_subset(data, toi)
Expand Down
8 changes: 4 additions & 4 deletions src/ascat/read_native/eps_native.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def __init__(self, filename):
"""
self.filename = filename

def read(self, generic=False, to_xarray=False):
def read(self, generic=False, to_xarray=False, **kwargs):
"""
Read ASCAT Level 1b data.
Expand All @@ -186,7 +186,7 @@ def read(self, generic=False, to_xarray=False):
metadata : dict
Metadata.
"""
return read_eps_l1b(self.filename, generic, to_xarray)
return read_eps_l1b(self.filename, generic, to_xarray, **kwargs)

def close(self):
"""
Expand Down Expand Up @@ -956,7 +956,7 @@ def read_eps_l1b(filename,
gen_fields_lut = {
"inc_angle_full": ("inc", np.float32, (0, 90), float32_nan),
"azi_angle_full": ("azi", np.float32, (0, 360), float32_nan),
"sigma0_full": ("sig", np.float32, (-35, 35), float32_nan),
"sigma0_full": ("sig", np.float32, (-50, 50), float32_nan),
"sat_track_azi":
("sat_track_azi", np.float32, (0, 360), float32_nan),
"beam_number": ("beam_number", np.int8, (1, 6), int8_nan),
Expand Down Expand Up @@ -986,7 +986,7 @@ def read_eps_l1b(filename,
gen_fields_lut = {
"inc_angle_full": ("inc", np.float32, (0, 90), float32_nan),
"azi_angle_full": ("azi", np.float32, (0, 360), float32_nan),
"sigma0_full": ("sig", np.float32, (-35, 35), float32_nan),
"sigma0_full": ("sig", np.float32, (-50, 50), float32_nan),
"sat_track_azi":
("sat_track_azi", np.float32, (0, 360), float32_nan),
"beam_number": ("beam_number", np.int8, (1, 6), int8_nan),
Expand Down

0 comments on commit 3aee291

Please sign in to comment.