Project

General

Profile

Converting ensemble data from grib to netcdf should add a new dimension

Added by Guido Cioni over 1 year ago

I was just wondering: when we have ensemble data in grib files they seem to be saved as variables with the same name, however this is not supported when converting to netcdf because I believe variables with the same name can not exist.
When I read the grib file with xarray a new dimension is correctly created so that the resulting variable has dimensions (time, member, latitude, longitude).
However, if I convert the grib to netcdf and then read it into xarray of course the data will be different because cdo creates new variables _1, _2...,_member. I could get around that of course but I'm wondering if there's a cleaner way to do the proper "conversion" directly into CDO when handling ensemble data?