Skip to content

Commit

Permalink
updated to remove the filter on kerchunk indices
Browse files Browse the repository at this point in the history
  • Loading branch information
lawi119 committed Nov 2, 2023
1 parent 6bba47e commit 77eeee4
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/stactools/ecmwf_forecast/_kerchunk_helper_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,7 @@ def get_kerchunk_indices(part):
elif ((part.stream == "scwv") or (part.stream == "wave")) and (part.type == "fc"):
mzz = MultiZarrToZarr(out, concat_dims=["time"])

#get output, filter down and only keep the unique d['refs'] items
d = convert_base64(compress_lat_lon(mzz.translate()))
filtered_d = {}
wanted_keys = ['time/0',
'mp2/0.0.0',
'mwd/0.0.0',
'mwp/0.0.0',
'swh/0.0.0',
'pp1d/0.0.0',
'valid_time/0',
'step/0']
filtered_d['refs'] = {k:v for k,v in d['refs'].items() if k in wanted_keys}

return filtered_d
return convert_base64(compress_lat_lon(mzz.translate()))

def convert_base64(d):
for key in d['refs']:
Expand Down

0 comments on commit 77eeee4

Please sign in to comment.