MeteoSwiss / meteodata-lab

Model data processing framework
https://meteoswiss.github.io/meteodata-lab/
MIT License
4 stars 1 forks source link

origin_z not properly set for HHL #2

Open cosunae opened 5 months ago

cosunae commented 5 months ago

Description

When loading data from KENDA (archive) corresponding to COSMO-1 km, HHL comes with 61 levels, while all other model level variables have 60 levels.

The issue is that origin_z == 0.0 for all of them and it does not distinguish variables on different vertical staggered positions.

What I Did

        ds = idpi.grib_decoder.load(
            idpi.data_source.DataSource(datafiles=[full_path]),
            {
                "param": [
                    "T",
                    "U_10M",
                    "V_10M",
                    "U",
                    "V",
                    "PS",
                    "T_2M",
                    "QV",
                    "TQV",
                    "PMSL",
                    "HHL",
                    "HSURF",
                    "PP",
                    "P0FL",
                    "P",
                ]
            },
        )
        idpi.metadata.set_origin_xy(ds, ref_param="P")
cosunae commented 5 months ago

The reason, is that instead of generalVertical and generalVerticalLayer, this data was generated with typeOfLevel "hybrid" and "hybridLayer". We should support this pair as well