From ehsantaghizadeh at yahoo.com Sat Nov 8 19:50:02 2025 From: ehsantaghizadeh at yahoo.com (Ehsan Taghizadeh) Date: Sun, 9 Nov 2025 02:50:02 +0000 (UTC) Subject: [ncl-talk] Issue reading ECMWF variables with NCL References: <1958625869.3314466.1762656602206.ref@mail.yahoo.com> Message-ID: <1958625869.3314466.1762656602206@mail.yahoo.com> 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: A_HEXO98ECMF070000_C_ECMF_20251107000000_120h_tp_global_0p5deg_grib2.bin Type: application/octet-stream Size: 182554 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ecmwf_bin.ncl Type: application/octet-stream Size: 531 bytes Desc: not available URL: From dave.allured at noaa.gov Sun Nov 9 10:08:11 2025 From: dave.allured at noaa.gov (Dave Allured - NOAA Affiliate) Date: Sun, 9 Nov 2025 10:08:11 -0700 Subject: [ncl-talk] Issue reading ECMWF variables with NCL In-Reply-To: <1958625869.3314466.1762656602206@mail.yahoo.com> References: <1958625869.3314466.1762656602206.ref@mail.yahoo.com> <1958625869.3314466.1762656602206@mail.yahoo.com> Message-ID: 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 Taghizadeh* > *Ph.D. Student in Natural Resources & Environmental Studies (NRES),* > * University of Northern British Columbia (UNBC)* > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ehsantaghizadeh at yahoo.com Sun Nov 9 12:53:16 2025 From: ehsantaghizadeh at yahoo.com (Ehsan Taghizadeh) Date: Sun, 9 Nov 2025 19:53:16 +0000 (UTC) Subject: [ncl-talk] Issue reading ECMWF variables with NCL In-Reply-To: References: <1958625869.3314466.1762656602206.ref@mail.yahoo.com> <1958625869.3314466.1762656602206@mail.yahoo.com> Message-ID: <868806524.3391825.1762717996881@mail.yahoo.com> 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 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 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: