[ncl-talk] Issue reading ECMWF variables with NCL

Ehsan Taghizadeh ehsantaghizadeh at yahoo.com
Sun Nov 9 12:53:16 MST 2025


Dear Dave,
Thank you for sharing your experience.
I’ll try converting GRIB2 to NetCDF using the commands you suggested. Appreciate the tip about CDO metadata and the article reference.
----------------------------------------------------------------------------- Best regards,Ehsan Taghizadeh 

    On Sunday, November 9, 2025 at 09:08:48 AM PST, Dave Allured - NOAA Affiliate <dave.allured at noaa.gov> wrote:  
 
 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), 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 TaghizadehPh.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/ba2f4575/attachment.htm>


More information about the ncl-talk mailing list