iris-grib icon indicating copy to clipboard operation
iris-grib copied to clipboard

Loading grib 1 doesn't create realization dimension

Open nhsavage opened this issue 2 years ago • 3 comments

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

nhsavage avatar Apr 26 '23 15:04 nhsavage

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

s-boardman avatar Apr 27 '23 07:04 s-boardman

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!)

trexfeathers avatar May 03 '23 09:05 trexfeathers

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.

s-boardman avatar May 03 '23 10:05 s-boardman