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

ECMWF ensemble inconsistent dataset order #369

Open
williamhobbs opened this issue Sep 5, 2024 · 1 comment
Open

ECMWF ensemble inconsistent dataset order #369

williamhobbs opened this issue Sep 5, 2024 · 1 comment

Comments

@williamhobbs
Copy link
Contributor

For some ECMWF ensemble fxx values, the first dataset is all members and the second is the mean, but for other fxx values, the order is swapped. Is this expected?

Started with https://herbie.readthedocs.io/en/latest/gallery/ecmwf_models/ecmwf.html#Ensemble-Forecast-Products.

Here's an example:

init_time = '2024-04-10 00:00'
fxx=15
ds = Herbie(date=init_time, model='ifs',product='enfo',fxx=fxx).xarray(":100[uv]:")

ds[0] returns all 50 members:

image

and ds[1] returns (presumably?) the mean:

image

But, if I change fxx, I sometimes get the opposite:

fxx=18
ds = Herbie(date=init_time, model='ifs',product='enfo',fxx=fxx).xarray(":100[uv]:")

image

@williamhobbs
Copy link
Contributor Author

As a workaround to get just the dataset with all the members, I check to see which one has number in the dimensions:

if 'number' in list(ds[1].dims):
    ds = ds[1] 
else:
    ds = ds[0]

I'm sure there's a better way, but I think this works. And it could be extended a bit to re-order the datasets into a consistent order.

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

No branches or pull requests

1 participant