Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IO-Part of enstools extended to writing grib #2

Open
MeraX opened this issue Jul 25, 2024 · 0 comments
Open

IO-Part of enstools extended to writing grib #2

MeraX opened this issue Jul 25, 2024 · 0 comments

Comments

@MeraX
Copy link

MeraX commented Jul 25, 2024

Moin Moin,

I hope you are doing well and still following enstools issues. I recently had a requirement for xarray-based GRIB reading and writing capabilities for a Python project at DWD. I discovered that enstools already offered convenient support for reading our GRIB2 files into Xarray DataSets, so I decided to build upon that and add a writing module. As I only needed the IO part of enstools, I opted to strip the package down to minimize dependencies. I acknowledge that there might be more efficient ways to reduce dependencies for a feature subset, but this approach was the most straightforward for me.

Our current codebase is available at https://gitlab.dkrz.de/b380572/etio . Please take a look.

The writing functionality utilizes existing GRIB files as templates, providing most of the metadata. The specific message used as a template is selected for each variable using a filter callback function. You can then modify the GRIB metadata using a second variable-specific callback. We've included example code in the tests we added, which can be found here: https://gitlab.dkrz.de/b380572/etio/-/blob/main/tests/test_io_write_02_grib.py?ref_type=heads.

I was wondering if it would be worthwhile to merge the writing capabilities back into the main package and explore ways to implement different install options for feature subsets with reduced external dependencies. Would you have the capacity to support such an effort? If you're available, we could schedule a short video call to discuss this further.

Viele Grüße
Dr. Marek JACOB
Deutscher Wetterdienst
Business Unit for Research and Development | Numerical Models (FE 13)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant