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

Loading grib 1 doesn't create realization dimension #336

Open
nhsavage opened this issue Apr 26, 2023 · 3 comments
Open

Loading grib 1 doesn't create realization dimension #336

nhsavage opened this issue Apr 26, 2023 · 3 comments

Comments

@nhsavage
Copy link

when loading grib 1 data from an ensemble the loader does not add a realization dimension based on the perturbationNumber

This is done for Grib 2 data. Unfortunately, at least ECMWF and possibly other centres are still using GRib 1 for new data on single levels (but not on model levels)

This should be simple to add in _grib1_load_rules.py

    if grib.perturbationNumber != -1.0:
        dim_coords_and_dims.append(
            (
                DimCoord(
                    points=grib.perturbationNumber,
                    standard_name='realization',
                    units='no_unit',
                ),
                0
            )
        )
        )

I am currently handling easily with a callback so this is more of a nice to have

@s-boardman
Copy link
Contributor

We do the same thing in the StaGE library code. Having it automated would be neat.

@trexfeathers
Copy link
Contributor

Can we be sure that this won't also affect situations where there genuinely shouldn't be a realization dimension?

(I'm not arguing, we just rely on the wisdom of our users!)

@s-boardman
Copy link
Contributor

Can we be sure that this won't also affect situations where there genuinely shouldn't be a realization dimension?

(I'm not arguing, we just rely on the wisdom of our users!)

As in loading deterministic data? I've not used any in grib format so couldn't comment unfortunately.

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

No branches or pull requests

3 participants