Skip to content

Commit

Permalink
added additional comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Anu-Ra-g committed Aug 30, 2024
1 parent 3a6ef99 commit 914a819
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kerchunk/grib2.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,10 @@ def _map_grib_file_by_group(
# grib idx is fortran indexed (from one not zero)
list(
filter(
# filtering out the cfgrib metadata dataframe in case it is None
lambda item: item is not None,
[
# extracting the metadata from a single message
_extract_single_group(mapper(group), i)
for i, group in enumerate(
scan_grib(fname, storage_options=storage_options), start=1
Expand All @@ -851,6 +853,7 @@ def _map_grib_file_by_group(


def _extract_single_group(grib_group: dict, idx: int):
# This function, returns the grib metadata as a dataframe, on a per message basis.
import datatree

grib_tree_store = grib_tree(
Expand Down

0 comments on commit 914a819

Please sign in to comment.