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.
MATLAB - Read GRIB Data
10 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!