Efficient GRIB1 data reader

efficient grib data reader

現在この提出コンテンツをフォロー中です。

A MATLAB reader for GRIB1 data has been developed based on wgrib1.c (ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib/wgrib.c), which has been wrapped in a MATLAB mexFunction. Using the reader, you can read GRIB1 data directly in MATLAB. I have tested it with the NLDAS-2 forcing data. It is much faster than all “MATLAB GRIB’ toolboxes/scripts I found from internet. The reader only for GRIB1 data. If you want, you can cook one for GRIB2 similarly.
You are welcome to use/test it. If there is any problem on the MATLAB side, I will be happy to help. The following is a simple instruction:
Compile the code: mex readGRIB1.c within matlab, you get “readGRIB1.mexa64” if you work on a 64-bit linux system.
Make a symbolic link of readGRIB1.mexa64 or copy it to your working directory

You may call readGRIB1 in you matlab code/command line window like the following line:

[data, nx, ny]=readGRIB1('2014102309.nldasforce-b.grb',2);

in which, “2” is the record number of the GRIB variable. What you need to do is just to figure out the record number of your variable in GRIB file.
Have fun!

引用

Shugong Wang (2026). Efficient GRIB1 data reader (https://jp.mathworks.com/matlabcentral/fileexchange/53705-efficient-grib1-data-reader), MATLAB Central File Exchange. に取得済み.

カテゴリ

Help Center および MATLAB AnswersData Import and Analysis についてさらに検索

一般的な情報

MATLAB リリースの互換性

  • すべてのリリースと互換性あり

プラットフォームの互換性

  • Windows
  • macOS
  • Linux
バージョン 公開済み リリース ノート Action
1.0.0.0

email update

A memory leak has been fixed.