updated top-level README and version_decl for V4.4.2 (#1795)
[WRF.git] / external / io_grib1 / grib1_util / test_rg_gribmap.c
blob5e79105ae329a22b227e3a9873fa2fd81327112d
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "grib.h"
4 #include "read_grib.h"
6 main(argc,argv)
7 int argc;
8 char *argv[];
11 GribParameters gribmap;
12 GribTableEntry entry;
14 char infile[] = "/home/tahutchinson/projects/venture/config/grib/gribmap.txt";
15 int status;
18 * This function indexes the grib file and fills the gribinfo
19 * structure. It needs to be called before any other
20 * rg_ functions.
22 status = rg_setup_gribmap(&gribmap,infile);
24 status = rg_gribmap_parameter(&gribmap,"UGRD",-1,&entry);
25 fprintf(stderr,"%d %d %d %d %s %s\n",
26 entry.center, entry.subcenter, entry.table, entry.parmid,
27 entry.name, entry.comment);
29 status = rg_gribmap_parameter(&gribmap,"BouPTYPE",204,&entry);
30 fprintf(stderr,"%d %d %d %d %s %s\n",
31 entry.center, entry.subcenter, entry.table, entry.parmid,
32 entry.name, entry.comment);
34 rg_free_gribmap_elements(&gribmap);