SciTools/iris-grib

Loading grib 1 doesn't create realization dimension

Opened this issue · 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

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

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

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.