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

GRIB2 as input #54

Open
Dadoof opened this issue Aug 1, 2024 · 3 comments
Open

GRIB2 as input #54

Dadoof opened this issue Aug 1, 2024 · 3 comments

Comments

@Dadoof
Copy link

Dadoof commented Aug 1, 2024

I have seen a number of posts about how things don't quite work, at times, if GRIB2 data is used.

On the use of 'opendata', I get this error:

ai-models --lead-time 36 --date 20240801 --time 0000 --input opendata --assets fcn fourcastnetv2-small

Traceback (most recent call last):
  File "/opt/conda/bin/ai-models", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.10/site-packages/ai_models/__main__.py", line 358, in main
    _main(sys.argv[1:])
  File "/opt/conda/lib/python3.10/site-packages/ai_models/__main__.py", line 306, in _main
    run(vars(args), unknownargs)
  File "/opt/conda/lib/python3.10/site-packages/ai_models/__main__.py", line 331, in run
    model.run()
  File "/opt/conda/lib/python3.10/site-packages/ai_models_fourcastnetv2/model.py", line 197, in run
    all_fields_numpy = self.normalise(all_fields_numpy)
  File "/opt/conda/lib/python3.10/site-packages/ai_models_fourcastnetv2/model.py", line 180, in normalise
    new_data = (data - self.means) / self.stds
ValueError: operands could not be broadcast together with shapes (53,721,1440) (1,73,1,1)

Same thing happens if I download the grib2 file, and then attempt to use the --file option.

There is something about the grib2 encoding that ai-models, as I have installed it, needs help with. I have seen this same "ValueError" bit listed in other issues on this repository, but I cannot see how they were resolved.

@xionghan7427
Copy link

You don't need to provide the date and time when using grib file as input.

@see-ann
Copy link

see-ann commented Aug 23, 2024

Any updates on how this was resolved?

@mchantry
Copy link
Contributor

mchantry commented Sep 4, 2024

Currently not all the required data for this model is part of the open-data offering. We hope to fix this in the near future, but I cannot provide a timeline at present.

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

4 participants