Skip to content

create --test fails on datasets with mask files and non-default grids #384

@NatalieZelenka

Description

@NatalieZelenka

Describe the bug
anemoi-datasets create --test changes the grid to 20/20, but this means that masks cannot be applied to test datasets. Errors look like ValueError: could not broadcast input array from shape (162,) into shape (40320,)

To Reproduce
anemoi-datasets create datasets/aifs-rd-tpa-ocda-ilr7-mars-o96-2005-2023-6h-v2-hourly-mean-ocean-sea-ice.yaml ../test.zarr --overwrite --test

URL to sample input data
Input data

Additional context
I'm going to give a PR to fix this. Florian told me the code that does this is only useful for ensemble datasets. So I plan to only change the resolution in --test in that circumstance (i.e. if 'number' or 'grid' are a key in a dict in the 'mars' or 'accumulation' or 'accumulation2' sources).

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions