[ncl-talk] Issue reading ECMWF variables with NCL
Dave Allured - NOAA Affiliate
dave.allured at noaa.gov
Sun Nov 9 10:08:11 MST 2025
Ehsan, I get the same error with NCL on Mac OS. The input file is GRIB2.
NCL support for GRIB2 is badly out of date.
The easy workaround is to convert GRIB2 to Netcdf, before reading with
NCL. These two different programs gave good results for me. CDO made
better metadata. You can skip the format and compression options if you
don't care. There are also some other modern programs to do this.
cdo -f nc4c -z zip_3 copy input_file output_file.nc
grib_to_netcdf -k4 -d3 -D NC_FLOAT -o output_file.nc input_file
Here is a nice article on converting GRIB/GRIB2 to Netcdf.
https://confluence.ecmwf.int/display/OIFS/How+to+convert+GRIB+to+netCDF
On Sat, Nov 8, 2025 at 7:51 PM Ehsan Taghizadeh via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:
> Hello,
> I tried to read the *tp* variable from an ECMWF file (attached) (WMO
> Recommended data option on the website of ECMWF
> <https://www.ecmwf.int/en/forecasts/datasets>), but I encountered the
> following error.
>
> """
> ncl:
> /home/conda/feedstock_root/build_artifacts/jasper_1754514279376/work/src/libjasper/base/jas_init.c:919:
> jas_get_ctx_internal: Assertion `ctx' failed.
> Aborted (core dumped)
> """
>
> A couple of points I should mention:
>
> 1. I installed conda and NCL on two different servers, but the same issue
> occurred.
>
> 2. This issue also happened, for example, when I tried to read
> "PRES_P0_L1_GLL0" from sp files on ECMWF.
>
> Any help would be greatly appreciated. The script and sample file are
> attached.
>
> *-----------------------------------------------------------------------------*
> *Best regards,*
> *Ehsan Taghizadeh*
> *Ph.D. Student in Natural Resources & Environmental Studies (NRES),*
> * University of Northern British Columbia (UNBC)*
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20251109/b76a2c96/attachment.htm>
More information about the ncl-talk
mailing list