4

on this open FTP server (ftp://ftpdatos.aemet.es/modelos_numericos/hirlam005_peninsula/) you can find HIRLAM models from the Spanish meteorological service.

The documentation in the LEEME files (in spanish) says the data files are in GRIB-1 format. Unfortunally I'm unable to read it. I use differet programs, like QGIS, and commaind line tools: wgrid, grid_ls, etc without success.

Anyone can take a look and let me know how read it.

I'm new to grib and I dont understand about the codes and keys. The documentation at ftp://ftpdatos.aemet.es/modelos_numericos/hirlam005_peninsula/LEEME_DATOS.txt talks about IPAR, LTYP and LEV ids.

Also it contains some description about the parameters in the files:

Variable                   || Unidad  || IPAR || LTYP || LEV 
Temperatura a 2m                 K        011     105     2 
Componente x del viento a 10m   m/s       033     105     10 
Componente y del viento a 10m   m/s       034     105     10 
Precipitación total            kg/m2      061     105     0
Humedad relativa a 2m          kg/kg      052     105     2 

Can someone help me reading that data ?


I finally found the problem which was that I was downloading files in ASCII mode instead BINARY.

I can confirm the grib_api tool, once compiled and installed works perfectly. Example:

$ grib_ls 20120220000000_sfc_fc15
20120220000000_sfc_fc15
edition      centre       typeOfLevel  level        dataDate     stepRange    shortName    packingType  gridType     
1            lemm         heightAboveGround  2            20120220     15           2t           grid_second_order_SPD1  rotated_ll  
1            lemm         heightAboveGround  10           20120220     15           10u          grid_second_order_SPD1  rotated_ll  
1            lemm         heightAboveGround  10           20120220     15           10v          grid_second_order_SPD1  rotated_ll  
1            lemm         heightAboveGround  2            20120220     15           r            grid_second_order_SPD1  rotated_ll  
1            lemm         heightAboveGround  0            20120220     0-15         unknown      grid_second_order_SPD1  rotated_ll  
5 of 5 grib messages in 20120220000000_sfc_fc15

5 of 5 total grib messages in 1 files

On the other hand, I'm not able to make work gdalinfo with this GRIB files, but for the moment I don't require it.

9
  • Have you tried Ugrib? Feb 17, 2012 at 20:55
  • not that tool. Please could you test to read one of the files on the server.
    – acanimal
    Feb 17, 2012 at 20:58
  • I don't have Ugrib installed, but I know of colleagues who use it for GRIB data. Also, you have no active link to the data in your question. Feb 17, 2012 at 21:01
  • updated question. Please make a test trying to read data. Thanks.
    – acanimal
    Feb 17, 2012 at 21:13
  • 1
    GRIB stands for GRIdded Binary. As such, GRIB messages are divided into several binary-encoded sections which the WMO doc that Mapperz provided a link for. So different bytes of the message mean different things. In the message you're concerned with, IPAR pertains to table 2 of section 1 of a GRIB message, the parameter codes. LTYPE is atmospheric level where this parameter is valid on, in this case 105 refers to a specific height above the surface. LEV is that height (2m, 10m, 0m). Obviously, Unidad is units. This information is more for encoders than decoders, but good to know. Feb 18, 2012 at 23:40

2 Answers 2

0

Try http://www.zygrib.org/. As an alternative, saga gis also supports reading grib files so you can use that to convert to other file formats.

2
  • I also tested zygrib and doesn't works.
    – acanimal
    Feb 17, 2012 at 21:14
  • 2
    I've tried to extract the info using several packages (degrib, Ugrib, zygrib) without success. Ugrib and degrib indicate that this is a GRIB1 file but something's missing to allow degribbing the file. I suspect a local table was used to encode the data. You may have to contact the HIRLAM folks to see what you might use to read it or find another source of the data that would allow one of the GRIB decoders to read it. Feb 17, 2012 at 22:31
0

Under UNIX/ LINUX can use NCL (NCAR Command Language) to convert and taylor the grib and store it into netcdf. From here (if it is a plain scalar field) you can use GDAL or QGIS directly.

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .