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

Standardize Reader Arguments #816

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
6 changes: 3 additions & 3 deletions geoips/plugins/modules/procflows/config_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ def call(fnames, command_line_args=None):
LOG.interactive(
"Reading background datasets using reader '%s'...", bg_reader_plugin.name
)
bg_xobjs = bg_reader_plugin(bg_files, metadata_only=True, **bg_reader_kwargs)
bg_xobjs = bg_reader_plugin(bg_files, metadata_only=True)
prod_plugin = products.get_plugin(
bg_xobjs["METADATA"].source_name,
bg_product_name,
Expand All @@ -1016,7 +1016,7 @@ def call(fnames, command_line_args=None):
LOG.interactive(
"Reading metadata from datasets using reader '%s'...", reader_plugin.name
)
xobjs = reader_plugin(fnames, metadata_only=True, **reader_kwargs)
xobjs = reader_plugin(fnames, metadata_only=True)
source_name = xobjs["METADATA"].source_name

if not produce_current_time(config_dict, xobjs["METADATA"], output_dict_keys=None):
Expand All @@ -1041,7 +1041,7 @@ def call(fnames, command_line_args=None):
pid_track.print_mem_usg(logstr="MEMUSG", verbose=False)
LOG.interactive("Reading full dataset using reader '%s'...", reader_plugin.name)
xobjs = reader_plugin(
fnames, metadata_only=False, chans=variables, **reader_kwargs
fnames, metadata_only=False, chans=variables,
)

pid_track.print_mem_usg(logstr="MEMUSG", verbose=False)
Expand Down
4 changes: 2 additions & 2 deletions geoips/plugins/modules/procflows/single_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,7 @@ def call(fnames, command_line_args=None):
LOG.interactive(
"Reading metadata from dataset with reader '%s'...", reader_plugin.name
)
xobjs = reader_plugin(fnames, metadata_only=True, **reader_kwargs)
xobjs = reader_plugin(fnames, metadata_only=True)
source_name = xobjs["METADATA"].source_name
pid_track.print_mem_usg()

Expand Down Expand Up @@ -1890,7 +1890,7 @@ def call(fnames, command_line_args=None):
pid_track.print_mem_usg()
LOG.interactive("Reading full dataset with reader '%s'...", reader_plugin.name)
xobjs = reader_plugin(
fnames, metadata_only=False, chans=variables, **reader_kwargs
fnames, metadata_only=False, chans=variables,
)

pid_track.print_mem_usg()
Expand Down
2 changes: 1 addition & 1 deletion geoips/plugins/modules/readers/abi_l2_netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def calculate_abi_geolocation(metadata, area_def):
return geo


def call(fnames, area_def=None, metadata_only=False, chans=False, self_register=False):
def call(fnames, area_def=None, metadata_only=False, chans=None, self_register=False):
"""
Read ABI Level 2 NetCDF data from a list of filenames.

Expand Down
2 changes: 0 additions & 2 deletions geoips/plugins/modules/readers/ahi_hsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,6 @@ def call(
chans=None,
area_def=None,
self_register=False,
test_arg="AHI Default Test Arg",
):
"""
Read AHI HSD data data from a list of filenames.
Expand Down Expand Up @@ -980,7 +979,6 @@ def call(
for GeoIPS-formatted xarray Datasets.
"""
process_datetimes = {}
LOG.interactive("AHI reader test_arg: %s", test_arg)
print_mem_usage("MEMUSG", verbose=False)
process_datetimes["overall_start"] = datetime.utcnow()
gvars = {}
Expand Down
3 changes: 0 additions & 3 deletions geoips/plugins/modules/readers/amsr2_netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ def call(
chans=None,
area_def=None,
self_register=False,
test_arg="AMSR2 Default Test Arg",
):
"""
Read AMSR2 netcdf data products.
Expand Down Expand Up @@ -319,8 +318,6 @@ def call(
Additional information regarding required attributes and variables
for GeoIPS-formatted xarray Datasets.
"""
LOG.interactive("AMSR2 reader test_arg: %s", test_arg)

ingested = []
for fname in fnames:
# full_xarray = xarray.open_dataset(str(fname))
Expand Down
2 changes: 1 addition & 1 deletion geoips/plugins/modules/readers/ssmi_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
# variables are needed in this for moving through the binary file correctly.


def call(fnames, metadata_only=False, chans=False, area_def=None, self_register=False):
def call(fnames, metadata_only=False, chans=None, area_def=None, self_register=False):
"""Read SSMI FNMOC Binary Data.

Parameters
Expand Down
2 changes: 1 addition & 1 deletion geoips/plugins/modules/readers/ssmis_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
# variables are needed in this for moving through the binary file correctly.


def call(fnames, metadata_only=False, chans=False, area_def=None, self_register=False):
def call(fnames, metadata_only=False, chans=None, area_def=None, self_register=False):
"""Read SSMIS binary data products.

Parameters
Expand Down
Loading