Skip to content

Commit

Permalink
Merge pull request #497 from Anu-Ra-g/mapping_info
Browse files Browse the repository at this point in the history
added additional comments for mapping section
  • Loading branch information
martindurant authored Aug 30, 2024
2 parents 3a6ef99 + 914a819 commit 0daa3a1
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 0daa3a1

Please sign in to comment.