Hi,
I tried to install CODA on a Windows machine with the intent to use it to read grib files in MATLAB. I used the ‘coda-2.24-win64.msi’ route.
when I try to read a grib-file I get the following error
pf = coda_open(‘CMEPSMLS_MBR000_202101010000+000H00M’)
Invalid MEX-file ‘C:\Program Files\CODA\lib\coda\matlab\coda_matlab.mexw64’: The specified module could not be found.
Error in coda_open (line 17)
[varargout{1:max(1,nargout)}] = coda_matlab(‘OPEN’,varargin{:});
I appears that there is something wrong with the MEX file. Any idea how to fix it?
Could you please try Release 2.24.1 · stcorp/coda · GitHub?
We did change the set of third-party libraries that we include (especially HDF5) in that release, which should hopefully fix the issue you are having.
Error in coda_open (line 17)
[varargout{1:max(1,nargout)}] = coda_matlab(‘OPEN’,varargin{:});
The GRIB file comes from the SMHI - The Swedish Meteorological agency. I am not sure if it is in GRIB1 or GRIB2 format. I suspect I can try coda_open_as, but I don’t know what to try when it comes to specifying PRODUCT_CLASS, PRODUCT_TYPE and VERSION
I can read the file using wgrib2, so it appears the file itself is not corrupt.
CODA currently only supports to most common storage mechanism of GRIB which is the simple packing form. Data that is stored using complex packing or jpeg/png images is not supported. Also, CODA currently only supports grid definitions that use a lat/lon or Gaussian grid. Other grids, including Spherical Harmonic data, are currently not supported. If an unsupported feature is encountered, CODA will abort opening the product and return with an error.
We currently only support the grid templates 0-3 (lat/lon grid) and 40-43 (Gaussian lat/lon grid).
If you want generic support for GRIB data, you might be better of using eccodes.