[ncl-talk] Unable to read JPEG-packed GRIB2 data with NCL

Rick Brownrigg brownrig at ucar.edu
Tue Oct 17 09:55:57 MDT 2017


Hi Mike,

Something odd is going on here.  I was able to read that file just fine.
The error you are getting seems to be unrelated to the file you are trying
to open, referencing a completely different filename (?)   And I'm not
certain how gdal might be involved in this?

Rick

On Tue, Oct 17, 2017 at 9:43 AM, Mike Kay <mike.kay at spire.com> wrote:

> Hi -
>
> We are unable to read grids from GRIB2 files using JPEG 2000 packing
> using NCL (6.4.0). These data files are readable via a number of other
> libraries/tools (PyNIO, ecCodes, NetCDF-Java-based tools (e.g.,
> THREDDS, PanoplyJ)).
>
> The NCL reads always seem to fail within GDAL:
>
> Example:
> ncl 0> nc = addfile("2mtemp-jpeg.grib2","r")
> ncl 1> data = nc->TMP_P0_L103_GLL0
> ERROR 4: `/vsimem/work_grib_0x8d2f761.jpc' not recognized as a
> supported file format.
> dec_jpeg2000: Unable to open JPEG2000 image within GRIB file.
>
> This was tested on several machines (RHEL-like OSs (CentOS 7.3,
> Scientific Linux 7.2)) with identical results using a conda-installed
> ncl via either:
>
> conda create -n ncl_stable -c conda-forge ncl=6.4.0
>
> or
>
> conda create -n ncl_stable -c NCAR -c conda-forge -c defaults ncl
>
> We tested gdal by itself by creating a conda environment using the
> same libgdal as installed in the ncl environment (2.2.2) and running a
> simple gdal_translate on the data:
>
> > gdal_translate 2mtemp-jpeg.grib2 2mtemp.tiff
>
> gdal_translate successfully reads the grid and creates a GeoTIFF.
>
> I have placed a sample file (2mtemp-jpeg.grib2) in the incoming dir of
> the ftp site for you to test against.
>
> Please let me know if we're missing something obvious here.
>
> thanks a lot,
> -mike
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171017/45442532/attachment.html>


More information about the ncl-talk mailing list