I have a weird error when I try to access a GRIB2 file.
Example: ~pjs548/test_mjz.py
Fails the moment I try to access the cube.data object (i.e. c_msl.data). Even the statement as simple as:
type(c_msl.data)
crashes with
python: /home/conda/feedstock_root/build_artifacts/jasper_1714298466419/work/src/libjasper/base/jas_init.c:505: jas_init_library: Assertion `!jas_global.initialized’ failed.
Couldn’t find anything useful on Google. JasPer is a library to handle image data – especially JPEG2000. Presumably iris is trying to do some decompression and failing
My environment is as simple as it can be (load analysis3-24.04 only)
dp9 ~ $ module list
Currently Loaded Modulefiles:
This post was marked outofscope as it appears from the specifics of the question that it related to iris and some GRIB data. Therefore, it is not actively supported by ACCESS-NRI.
However, some people in the ACCESS-Hive forum community might still be able to help!
For the question specifics, the GRIB data inside the ~pjs548/test_mjz.py script is in the dp9 project, which I am not a member of. Therefore, I cannot reproduce the error.
Would you be able to copy that data somewhere else, for example, in /scratch/public/hive-forum?
I tried accessing the cube data with conda/analysis3-24.04 loaded and I got your same error.
I tried doing it with conda/analysis3-24.01 loaded and it seems to be fine.
conda/analysis3-24.04 has jasper 4.2.4 installed whereas conda/analysis3-24.01 has jasper 2.0.33. I am not really sure about why the error is produced, but might be the cause of such an upgrade? (version 2.0.* to 4.2.* seems quite a big jump).
I think in your case the quickest solution might be to simply use conda/analysis3-24.01.
For the specifics of the error, I am sorry but I am not sure what it might be caused by. Maybe someone that has more direct knowledge of the conda/analysis3 environments might be able to help you better (@Paola-CMS@dale.roberts)?
Thanks Davide
analysis3-24.01 is OK for me to use now - but hopefully someone can fix whatever is up with the new version of JasPer at some stage
Cheers
and thanks again for having a look. Was going mad with self doubt about not seeing something obvious in my code
For the stuff I do the files are GRIB2, netcdf and/or UM
My package already has options to use CDMS2 and IRIS. Could probably extend to use pygrib, and can be the ultimate fall back. However was wondering this might be a problem for other projects as well. (and if I can avoid extra complexity and effort is of course preferred by me )