satpy icon indicating copy to clipboard operation
satpy copied to clipboard

Writing FCI Channel GRIB files with Satpy after Rampling with GDAL

Open ghanembehaz16 opened this issue 11 months ago • 4 comments

Hello,

I am working with FCI (Flexible Combined Imager) channels from MTG satellites. After performing resampling of the basic channels using GDAL, I need to write the processed data in GRIB format.

Does Satpy provide functionality for writing GRIB files directly? If not, what alternative tools or workflows would you recommend for generating GRIB files from this resampled satellite data?

ghanembehaz16 avatar Jan 22 '25 18:01 ghanembehaz16

Others can chime in if they'd like, but I'm curious what you need GRIB files for? I'm pretty sure Satpy doesn't have any GRIB writing functionality nor does any other pytroll-maintained project, but I could be wrong.

My recollection is that writing GRIB files is no small task.

djhoese avatar Jan 22 '25 20:01 djhoese

Thank you for your response. Some professional applications exclusively require the GRIB format, which explains my need to write such files. This functionality is essential to integrate the processed data into existing workflows. I understand that neither Satpy nor Pytroll projects currently support this capability, but I am still waiting for potential help or suggestions from the contributors.

ghanembehaz16 avatar Jan 22 '25 20:01 ghanembehaz16

For example NWP models are notoriously bad at supporting any modern formats and pretty much only digest BUFR or GRIB(2).

I've had the same issue in the past, but ended up using GRIB_API (now a part of {{eccodes}}) to write the GRIB2 files. I had to use a pre-made template file where I just replaced the data values, I couldn't figure out how to write the GRIB from scratch.

I hope I never have to write them again, but I wouldn't hold my breath 😅

pnuu avatar Jan 23 '25 06:01 pnuu

I can ask our NWP colleagues how they assimilate FCI into the ICON model. Pretty sure they use satpy, but I don't know if they're writing GRIB. ICON has recently become open-source, but I don't know if that also applies to in-house pre-processing scripts.

gerritholl avatar Jan 23 '25 10:01 gerritholl