Skip to content

Commit

Permalink
fix: Correct the issue related to the test_li_l2_nc
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementLaplace committed Nov 20, 2024
1 parent 1fe920e commit 6d83829
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion satpy/readers/li_base_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,6 @@ def get_dataset(self, dataset_id, ds_info=None):
# Retrieve default infos if missing:
if ds_info is None:
ds_info = self.get_dataset_infos(dataset_id["name"])

# check for potential error:
if ds_info is None:
raise KeyError(f"No dataset registered for {dataset_id}")
Expand Down
4 changes: 3 additions & 1 deletion satpy/readers/li_l2_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ def get_dataset(self, dataset_id, ds_info=None):
if var_with_swath_coord and self.with_area_def:
data_array = self.get_array_on_fci_grid(data_array)
else :
data_array.data = da.from_array(data_array.data)
if data_array is not None:
if not isinstance(data_array.data,da.Array):
data_array.data = da.from_array(data_array.data)
return data_array

def get_area_def(self, dsid):
Expand Down

0 comments on commit 6d83829

Please sign in to comment.