Skip to content

feature: memory source retrieve more than one field #739

@HCookie

Description

@HCookie

What happened?

When reading from a memory buffer, only the first field is retrieved and recorded in the ds.

import earthkit.data as ekd
from io import BytesIO

sample_ds = ekd.from_source("sample", "storm_ophelia_wind_850.grib")
print(sample_ds.ls())
#   centre shortName    typeOfLevel  level  dataDate  dataTime stepRange  
# 0   ecmf         u  isobaricInhPa    850  20171016         0         0   
# 1   ecmf         v  isobaricInhPa    850  20171016         0         0   

bufr = BytesIO()
sample_ds.to_target('file', bufr)

mem_ds = ekd.from_source("memory", bufr.getvalue())
print(mem_ds.ls())
#   centre shortName    typeOfLevel  level  dataDate  dataTime stepRange  
# 0   ecmf         u  isobaricInhPa    850  20171016         0         0   

Request

Can this be enhanced to retrieve more?

Version

0.15.0

Platform (OS and architecture)

ATOS

Organisation

ECMWF

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions