MATLAB - Read GRIB Data
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Benjamin
el 9 de Feb. de 2013
Respondida: Jacob Halbrooks
el 25 de Sept. de 2024
Background:
I want to import meteorological data (wind speed, temperature as a function of position and altitude) in the GRIB-format into Matlab.
Status:
While googling I found this Matlab-Grib-Reader: http://www.mathworks.com/matlabcentr...exchange/21579
The libraries must be compiled with the own machine, i used this terminal commands:
./configure CFLAGS=-fPIC CPPFLAGS=-fPIC --enable-shared
make
I copied the resulting libcdi.a library into the lib64 folder, and executed compile.m which gave me the following:
COMPILING cdi_varlist...
cdi_mx.c: In function 'getLevel':
cdi_mx.c:431: warning: incompatible implicit declaration of built-in function 'modf'
Undefined symbols for architecture x86_64:
"_Warning", referenced from:
_getLevel in cdi_mx.o
(maybe you meant: _Warning_)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
mex: link of ' "cdi_varlist.mexmaci64"' failed.
Error using mex (line 206)
Unable to complete successfully.
Error in compile (line 15)
mex cdi_varlist.c cdi_mx.c -Iinclude -Llib64 -lcdi -lnetcdf
Who can help?
PS: Matlab 2012a, Mac OS X 10.8.2, Xcode 4.6
0 comentarios
Respuesta aceptada
Jacob Halbrooks
el 25 de Sept. de 2024
As of R2023b, you can read data from a GRIB file (.grb, .grib, .grib2) using the Mapping Toolbox readgeoraster function. You can also get information about a GRIB file by using the georasterinfo function. These functions were enhanced in R2024b to support GRIB files that use CCSDS compression.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!