Last change
on this file was
11,
checked in by aslmd, 14 years ago
|
spiga@svn-planeto:ajoute le modele meso-echelle martien
|
File size:
905 bytes
|
Line | |
---|
1 | #include <stdio.h> |
---|
2 | #include <stdlib.h> |
---|
3 | #include "grib.h" |
---|
4 | #include "read_grib.h" |
---|
5 | |
---|
6 | main(argc,argv) |
---|
7 | int argc; |
---|
8 | char *argv[]; |
---|
9 | { |
---|
10 | |
---|
11 | GribParameters gribmap; |
---|
12 | GribTableEntry entry; |
---|
13 | |
---|
14 | char infile[] = "/home/tahutchinson/projects/venture/config/grib/gribmap.txt"; |
---|
15 | int status; |
---|
16 | |
---|
17 | /* |
---|
18 | * This function indexes the grib file and fills the gribinfo |
---|
19 | * structure. It needs to be called before any other |
---|
20 | * rg_ functions. |
---|
21 | */ |
---|
22 | status = rg_setup_gribmap(&gribmap,infile); |
---|
23 | |
---|
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); |
---|
28 | |
---|
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); |
---|
33 | |
---|
34 | rg_free_gribmap_elements(&gribmap); |
---|
35 | |
---|
36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.