Closed sandorkertesz closed 5 months ago
Fixes #292
This PR enables the file source to use parts (byte ranges) in the same way as implemented for the url source. At the moment, it works for GRIB and BUFR files.
file
url
Documentation was added for both the sources.
Notebook example: https://earthkit-data.readthedocs.io/en/develop/examples/grib_file_parts.html
Examples:
ds = earthkit.data.from_source("file", "my.grib", parts=(0, 150)) ds = earthkit.data.from_source("file", "my.grib", parts=[(0, 150), (400, 160)]) ds = earthkit.data.from_source("file", [ ("a.grib", (0, 150)), ("b.grib", (240, 120)), ("c.grib", None), ("d.grib", [(240, 120), (720, 120)]) ])
Fixes #292
This PR enables the
file
source to use parts (byte ranges) in the same way as implemented for theurl
source. At the moment, it works for GRIB and BUFR files.Documentation was added for both the sources.
Notebook example: https://earthkit-data.readthedocs.io/en/develop/examples/grib_file_parts.html
Examples: