Skip to content

Commit

Permalink
feat: Daskify the non accumumulated product for the li_l2_nc reader
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementLaplace committed Nov 19, 2024
1 parent c214917 commit 1fe920e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions satpy/readers/li_l2_nc.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ def get_dataset(self, dataset_id, ds_info=None):
var_with_swath_coord = self.is_var_with_swath_coord(dataset_id)
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)
return data_array

def get_area_def(self, dsid):
Expand Down Expand Up @@ -161,6 +163,7 @@ def get_array_on_fci_grid(self, data_array: xr.DataArray):
data_2d = da.where(data_2d > 0, data_2d, np.nan)

xarr = xr.DataArray(da.asarray(data_2d, CHUNK_SIZE), dims=("y", "x"))

xarr.attrs = attrs

return xarr
Expand Down

0 comments on commit 1fe920e

Please sign in to comment.