-
Notifications
You must be signed in to change notification settings - Fork 25
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
Variable naming when combining different level types in one dataset #87
Comments
example data -- compressed with gzip because github did not allow uploading of grib. |
Hello |
Thanks! I also found a small bug in the code that uses xarray for reading data (like netcdf source); do you prefer a pull request or some other means to deliver this information? |
PR would be great thanks. |
@mpartio You could look at https://anemoi-datasets.readthedocs.io/en/latest/building/filters/rename.html to rename |
Thanks for the suggestion! I tried For example this configuration:
And inspecting the resulting zarr:
If I change the rename to:
I get:
|
I am also having the same issue. In my case it occurs for GRIB fields that have key |
I found out the reason why my test case fails to combine surface and pressure levels, even though the instructions at https://anemoi-datasets.readthedocs.io/en/latest/building/introduction.html show it working. The reason is that my data comes from a Harmonie model, which defines nearly all parameters using Then again, IFS defines nearly everything with So, there must be some extra code in anemoi especially for the case |
This is good to know, thanks @mpartio! We also have the same way of defining parameters levels in the COSMO model and afaik in the new ICON model. So yeah, it's nice to have a workaround but hopefully this will be solved in the codebase. I suppose there's a bit of wait due to large incoming changes from earthkit-data. |
@mpartio in case you're interested, currently our solution is to use this lambda filter and specify a function that takes the field as input and overrides some parameters accordingly, such as: def remove_sfc_levelist(field: ArrayField) -> ArrayField:
return field.clone(typeOfLevel="surface", levelist=None) |
Describe the bug
When combining surface level and pressure level data in a single dataset, the naming convention is param_level which is silly for certain surface level parameters that already have the level information in their name (for example 2t).
To Reproduce
URL to sample input data
Attached to this issue ticket.
Expected behavior
surface level parameters are without level value, ie. "2t"
vertical levels (pressure, hybrid, whatever) are with level value, ie "z_1000"
Additional context
I tried changing "variable_naming" in "build":
But this changed the naming for all sources -- I need to change the naming for just a single source.
The text was updated successfully, but these errors were encountered: