Closed alexkorner closed 6 months ago
I have added support to read Gzipped GRIB2 files. An equivalent workflow in grib2io would be the following:
#!/usr/bin/env python
import grib2io
output_grib2 = grib2io.open("output.grib2",mode="w")
with grib2io.open(<input_grib2_file>) as g:
for msg in g:
msg.second = 0
msg.pack()
output_grib2.write(msg)
output_grib2.close()
Include a clear description and an example or even a scholarly source of information about how the calculation, plot, etc. works I'm looking to manipulate time metadata within a grib2 file without creating intermediate files in the process. In this example, gzipped files would be coming from /lfs/h1/ops/prod/dcom/ldmdata/obs/upperair/mrms/conus/MergedReflectivityQC/ on WCOSS2. Pygrib would handle similar to this:
with gzip.open(filename, 'rb') as infile: file_content = infile.read()
Wondering if there is a grib2io equivalent. Thanks.