19 #define G2C_MAX_TYPE_OF_FIXED_SURFACE_LEN 40
21 #define G2C_DATE_TIME_LEN 25
49 g2c_get_datetime(
int ipdtn,
long long int *ipdtmpl,
short year,
unsigned char month,
unsigned char day,
50 unsigned char hour,
unsigned char minute,
unsigned char second,
char *tabbrev)
52 int iutpos, iutpos2, iunit, iunit2;
55 int itemp, itemp2, is;
66 0, 0, 0, 0, 0, 0, 0, 16, 23, 17, 19, 18, 32, 31, 0, 0, 0, 0, 0, 0,
67 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
68 0, 17, 20, 0, 0, 22, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
69 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
70 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0,
71 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
72 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
73 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
74 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
75 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
81 0, 0, 0, 0, 0, 0, 0, 26, 33, 27,
82 29, 28, 42, 41, 0, 0, 0, 0, 0, 0,
83 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
84 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
85 0, 22, 30, 0, 0, 32, 35, 0, 0, 0,
86 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
87 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
88 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
89 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90 33, 0, 0, 0, 0, 0, 0, 0, 0, 0,
91 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
92 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
93 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
94 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
95 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
96 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
97 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
98 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
99 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
100 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
105 assert(ipdtn >= 0 && ipdtmpl && tabbrev);
110 if (ipdtn <= 15 || ipdtn == 32 || ipdtn == 50 || ipdtn == 51 || ipdtn == 91)
112 else if (ipdtn >= 40 && ipdtn <= 43)
114 else if (ipdtn >= 44 && ipdtn <= 47)
116 else if (ipdtn == 48)
118 else if (ipdtn == 52)
124 switch (ipdtmpl[iutpos])
127 strcpy(tunit,
"minute");
131 strcpy(tunit,
"hour");
135 strcpy(tunit,
"day");
139 strcpy(tunit,
"month");
143 strcpy(tunit,
"year");
147 strcpy(tunit,
"hour");
151 strcpy(tunit,
"hour");
155 strcpy(tunit,
"hour");
161 iutpos2 = ipos2[ipdtn - 1];
164 switch (ipdtmpl[iutpos2])
167 strcpy(tunit2,
"minute");
171 strcpy(tunit2,
"hour");
175 strcpy(tunit2,
"day");
179 strcpy(tunit2,
"month");
183 strcpy(tunit2,
"year");
187 strcpy(tunit2,
"hour");
191 strcpy(tunit2,
"hour");
195 strcpy(tunit2,
"hour");
200 sprintf(reftime,
"%4.4d%2.2d%2.2d%2.2d:%2.2d:%2.2d", year, month, day, hour, minute, second);
202 itemp = abs(ipdtmpl[iutpos + 1]) * iunit;
206 sprintf(tabbrev,
"valid at %lld", ipdtmpl[iutpos + 1]);
211 if ((ipdtn >= 0 && ipdtn <= 7) || ipdtn == 15 || ipdtn == 20 || (ipdtn >= 30 && ipdtn <= 32) || ipdtn == 40 ||
212 ipdtn == 41 || ipdtn == 44 || ipdtn == 45 || ipdtn == 48 || (ipdtn >= 50 && ipdtn <= 52))
214 sprintf(tabbrev,
"valid %d %s after %s", itemp, tunit, reftime);
218 is = ipos[ipdtn - 1] - 1;
219 sprintf(endtime,
"%4.4d%2.2d%2.2d%2.2d:%2.2d:%2.2d", (
int)ipdtmpl[is], (
int)ipdtmpl[is + 1],
220 (
int)ipdtmpl[is + 2], (
int)ipdtmpl[is + 3], (
int)ipdtmpl[is + 4], (
int)ipdtmpl[is + 5]);
222 itemp2 = abs(ipdtmpl[iutpos2]) * iunit2;
223 itemp2 = itemp + itemp2;
224 sprintf(tmpval2,
"%d", itemp2);
225 if (ipdtn == 8 && ipdtmpl[8] < 0)
228 sprintf(tabbrev,
"(%d -%d) valid %d %s before %s to %s", itemp, itemp2, itemp, tunit, reftime, endtime);
230 else if ((ipdtn >= 8 && ipdtn <= 14) || (ipdtn >= 42 && ipdtn <= 47) ||
235 sprintf(tabbrev,
"(%d -%d hr) valid %d %s after %s to %s", itemp, itemp2, itemp, tunit, reftime, endtime);
263 sprintf(cbuf,
"%d", ival);
268 rval = (float)ival * pow(10, -1 * scale);
269 if (rval == (
int)rval)
273 sprintf(cbuf,
" %d", (
int)rval);
278 sprintf(fmt,
"%s%d%s",
"%.", (
int)abs(scale),
"f");
279 sprintf(tmpcbuf, fmt, rval);
280 strcpy(cbuf, &tmpcbuf[1]);
320 assert(ipdtn >= 0 && ipdtmpl && level_desc);
327 else if (ipdtn >= 40 && ipdtn <= 43)
329 else if (ipdtn >= 44 && ipdtn <= 47)
331 else if (ipdtn == 48)
333 else if (ipdtn >= 50 && ipdtn <= 51)
335 else if (ipdtn == 52)
337 else if (ipdtn == 91)
343 if (ipdtmpl[ipos] == 100 && ipdtmpl[ipos + 3] == 255)
345 if ((ret =
format_level(tmpval1, ipdtmpl[ipos + 2], ipdtmpl[ipos + 1] + 2)))
347 sprintf(level_desc,
"%s %s", tmpval1,
"mb");
350 else if (ipdtmpl[ipos] == 100 && ipdtmpl[ipos + 3] == 100)
352 if ((ret =
format_level(tmpval1, ipdtmpl[ipos + 2], ipdtmpl[ipos + 1] + 2)))
354 if ((ret =
format_level(tmpval2, ipdtmpl[ipos + 5], ipdtmpl[ipos + 4] + 2)))
356 sprintf(level_desc,
"%s - %s mb", tmpval1, tmpval2);
361 else if (ipdtmpl[ipos] == 101)
363 strcpy(level_desc,
" Mean Sea Level");
366 else if (ipdtmpl[ipos] == 102 && ipdtmpl[ipos + 3] == 255)
368 if ((ret =
format_level(tmpval1, ipdtmpl[ipos + 2], ipdtmpl[ipos + 1])))
370 sprintf(level_desc,
"%s %s", tmpval1,
"m above MSL");
375 else if (ipdtmpl[ipos] == 103 && ipdtmpl[ipos + 3] == 255)
379 if ((ret =
format_level(tmpval1, ipdtmpl[ipos + 2], ipdtmpl[ipos + 1])))
381 sprintf(level_desc,
"%s %s", tmpval1,
"m above ground");
384 else if (ipdtmpl[ipos] == 103 && ipdtmpl[ipos + 3] == 103)
386 if ((ret =
format_level(tmpval1, ipdtmpl[ipos + 2], ipdtmpl[ipos + 1])))
388 if ((ret =
format_level(tmpval2, ipdtmpl[ipos + 5], ipdtmpl[ipos + 4])))
390 sprintf(level_desc,
"%s - %s m AGL", tmpval1, tmpval2);
396 else if (ipdtmpl[ipos] == 104 && ipdtmpl[ipos + 3] == 255)
398 if ((ret =
format_level(tmpval1, ipdtmpl[ipos + 2], ipdtmpl[ipos + 1])))
400 sprintf(level_desc,
"%s %s", tmpval1,
"sigma");
405 else if (ipdtmpl[ipos] == 104 && ipdtmpl[ipos + 3] == 104)
407 if ((ret =
format_level(tmpval1, ipdtmpl[ipos + 2], ipdtmpl[ipos + 1])))
409 if ((ret =
format_level(tmpval2, ipdtmpl[ipos + 5], ipdtmpl[ipos + 4])))
411 sprintf(level_desc,
"%s - %s sigma", tmpval1, tmpval2);
417 else if (ipdtmpl[ipos] == 105 && ipdtmpl[ipos + 3] == 255)
419 if ((ret =
format_level(tmpval1, ipdtmpl[ipos + 2], ipdtmpl[ipos + 1])))
421 sprintf(level_desc,
"%s %s", tmpval1,
"hybrid lvl");
426 else if (ipdtmpl[ipos] == 105 && ipdtmpl[ipos + 3] == 105)
428 if ((ret =
format_level(tmpval1, ipdtmpl[ipos + 2], ipdtmpl[ipos + 1])))
430 if ((ret =
format_level(tmpval2, ipdtmpl[ipos + 5], ipdtmpl[ipos + 4])))
432 sprintf(level_desc,
"%s - %s hybrid lvl", tmpval1, tmpval2);
438 else if (ipdtmpl[ipos] == 106 && ipdtmpl[ipos + 3] == 255)
440 if ((ret =
format_level(tmpval1, ipdtmpl[ipos + 2], ipdtmpl[ipos + 1])))
442 sprintf(level_desc,
"%s %s", tmpval1,
"m below land");
447 else if (ipdtmpl[ipos] == 106 && ipdtmpl[ipos + 3] == 106)
449 if ((ret =
format_level(tmpval1, ipdtmpl[ipos + 2], ipdtmpl[ipos + 1])))
451 if ((ret =
format_level(tmpval2, ipdtmpl[ipos + 5], ipdtmpl[ipos + 4])))
453 sprintf(level_desc,
"%s - %s m DBLY", tmpval1, tmpval2);
458 else if (ipdtmpl[ipos] == 107)
460 strcpy(level_desc,
" Isentropic level");
463 else if (ipdtmpl[ipos] == 108 && ipdtmpl[ipos + 3] == 108)
465 if ((ret =
format_level(tmpval1, ipdtmpl[ipos + 2], ipdtmpl[ipos + 1] + 2)))
467 if ((ret =
format_level(tmpval2, ipdtmpl[ipos + 5], ipdtmpl[ipos + 4] + 2)))
469 sprintf(level_desc,
"%s - %s mb SPDY", tmpval1, tmpval2);
476 else if (ipdtmpl[ipos] == 110)
478 strcpy(level_desc,
" Layer bet 2-hyb lvl");
481 else if (ipdtmpl[ipos] == 109 && ipdtmpl[ipos + 3] == 255)
483 if ((ret =
format_level(tmpval1, ipdtmpl[ipos + 2], ipdtmpl[ipos + 1])))
485 sprintf(level_desc,
"%s %s", tmpval1,
"pv surface");
490 else if (ipdtmpl[ipos] == 111)
491 strcpy(level_desc,
" Eta level");
492 else if (ipdtmpl[ipos] == 114)
493 strcpy(level_desc,
" Layer bet. 2-isent.");
494 else if (ipdtmpl[ipos] == 117)
495 strcpy(level_desc,
" Mixed layer depth");
496 else if (ipdtmpl[ipos] == 120)
497 strcpy(level_desc,
" Layer bet. 2-Eta lvl");
498 else if (ipdtmpl[ipos] == 121)
499 strcpy(level_desc,
" Layer bet. 2-isob.");
500 else if (ipdtmpl[ipos] == 125)
501 strcpy(level_desc,
" Specified height lvl");
502 else if (ipdtmpl[ipos] == 126)
503 strcpy(level_desc,
" Isobaric level");
504 else if (ipdtmpl[ipos] == 160)
505 strcpy(level_desc,
" Depth below sea lvl");
506 else if (ipdtmpl[ipos] == 170)
507 strcpy(level_desc,
" Ionospheric D-region lvl");
508 else if (ipdtmpl[ipos] == 1)
509 strcpy(level_desc,
" Surface");
510 else if (ipdtmpl[ipos] == 2)
511 strcpy(level_desc,
" Cloud base lvl");
512 else if (ipdtmpl[ipos] == 3)
513 strcpy(level_desc,
" Cloud top lvl");
514 else if (ipdtmpl[ipos] == 4)
515 strcpy(level_desc,
" 0 Deg Isotherm");
516 else if (ipdtmpl[ipos] == 5)
517 strcpy(level_desc,
" Level of adiabatic" );
518 else if (ipdtmpl[ipos] == 6)
519 strcpy(level_desc,
" Max wind lvl");
520 else if (ipdtmpl[ipos] == 7)
521 strcpy(level_desc,
" Tropopause");
522 else if (ipdtmpl[ipos] == 8)
523 strcpy(level_desc,
" Nom. top");
524 else if (ipdtmpl[ipos] == 9)
525 strcpy(level_desc,
" Sea Bottom");
526 else if (ipdtmpl[ipos] == 10)
527 strcpy(level_desc,
" Entire Atmosphere");
528 else if (ipdtmpl[ipos] == 11)
529 strcpy(level_desc,
" Cumulonimbus Base");
530 else if (ipdtmpl[ipos] == 12)
531 strcpy(level_desc,
" Cumulonimbus Top");
532 else if (ipdtmpl[ipos] == 20)
533 strcpy(level_desc,
" Isothermal level");
534 else if (ipdtmpl[ipos] == 200)
535 strcpy(level_desc,
" Entire Atmosphere");
536 else if (ipdtmpl[ipos] == 201)
537 strcpy(level_desc,
" Entire ocean");
538 else if (ipdtmpl[ipos] == 204)
539 strcpy(level_desc,
" Highest Frz. lvl");
540 else if (ipdtmpl[ipos] == 206)
541 strcpy(level_desc,
" Grid scale cloud bl");
542 else if (ipdtmpl[ipos] == 207)
543 strcpy(level_desc,
" Grid scale cloud tl");
544 else if (ipdtmpl[ipos] == 209)
545 strcpy(level_desc,
" Boundary layer cbl");
546 else if (ipdtmpl[ipos] == 210)
547 strcpy(level_desc,
" Boundary layer ctl");
548 else if (ipdtmpl[ipos] == 211)
549 strcpy(level_desc,
" Boundary layer cl");
550 else if (ipdtmpl[ipos] == 212)
551 strcpy(level_desc,
" Low cloud bot. lvl");
552 else if (ipdtmpl[ipos] == 213)
553 strcpy(level_desc,
" Low cloud top lvl");
554 else if (ipdtmpl[ipos] == 214)
555 strcpy(level_desc,
" Low cloud layer");
556 else if (ipdtmpl[ipos] == 215)
557 strcpy(level_desc,
" Cloud ceiling");
558 else if (ipdtmpl[ipos] == 220)
559 strcpy(level_desc,
" Planetary boundary");
560 else if (ipdtmpl[ipos] == 221)
561 strcpy(level_desc,
" Layer 2 Hybrid lvl");
562 else if (ipdtmpl[ipos] == 222)
563 strcpy(level_desc,
" Mid. cloud bot. lvl");
564 else if (ipdtmpl[ipos] == 223)
565 strcpy(level_desc,
" Mid. cloud top lvl");
566 else if (ipdtmpl[ipos] == 224)
567 strcpy(level_desc,
" Middle cloud layer");
568 else if (ipdtmpl[ipos] == 232)
569 strcpy(level_desc,
" High cloud bot. lvl");
570 else if (ipdtmpl[ipos] == 233)
571 strcpy(level_desc,
" High cloud top lvl");
572 else if (ipdtmpl[ipos] == 234)
573 strcpy(level_desc,
" High cloud layer");
574 else if (ipdtmpl[ipos] == 235)
575 strcpy(level_desc,
" Ocean Isotherm lvl");
576 else if (ipdtmpl[ipos] == 236)
577 strcpy(level_desc,
" Layer 2-depth below");
578 else if (ipdtmpl[ipos] == 237)
579 strcpy(level_desc,
" Bot. Ocean mix. lyr");
580 else if (ipdtmpl[ipos] == 238)
581 strcpy(level_desc,
" Bot. Ocean iso. lyr");
582 else if (ipdtmpl[ipos] == 239)
583 strcpy(level_desc,
" layer ocean sfc 26C" );
584 else if (ipdtmpl[ipos] == 240)
585 strcpy(level_desc,
" Ocean Mixed Layer");
586 else if (ipdtmpl[ipos] == 241)
587 strcpy(level_desc,
" Order Seq. Of Data");
588 else if (ipdtmpl[ipos] == 242)
589 strcpy(level_desc,
" Con. cloud bot. lvl");
590 else if (ipdtmpl[ipos] == 243)
591 strcpy(level_desc,
" Con. cloud top lvl");
592 else if (ipdtmpl[ipos] == 244)
593 strcpy(level_desc,
" Conv. cloud layer");
594 else if (ipdtmpl[ipos] == 245)
595 strcpy(level_desc,
" Lowest lvl wet bulb");
596 else if (ipdtmpl[ipos] == 246)
597 strcpy(level_desc,
" Max. equi. potential");
598 else if (ipdtmpl[ipos] == 247)
599 strcpy(level_desc,
" Equilibrium level");
600 else if (ipdtmpl[ipos] == 248)
601 strcpy(level_desc,
" Shallow con. cld bl");
602 else if (ipdtmpl[ipos] == 249)
603 strcpy(level_desc,
" Shallow con. cld tl");
604 else if (ipdtmpl[ipos] == 251)
605 strcpy(level_desc,
" Deep conv. cld bl");
606 else if (ipdtmpl[ipos] == 252)
607 strcpy(level_desc,
" Deep conv. cld tl");
608 else if (ipdtmpl[ipos] == 253)
609 strcpy(level_desc,
" Lowest bot. lvl sup" );
610 else if (ipdtmpl[ipos] == 254)
611 strcpy(level_desc,
" highest top lvl sup" );
614 sprintf(level_desc,
" %4d (Unknown Lvl)", (
int)ipdtmpl[ipos]);
641 int total_fields = 0;
651 LOG((2,
"g2c_degrib2 fileout %s", fileout));
654 if (!(f = fopen(fileout,
"w")))
666 fprintf(f,
" SECTION 1: %d %d %d %d %d %d %d %d %d %d %d %d %d\n", msg->
center, msg->
subcenter,
669 fprintf(f,
" Contains %d Local Sections and %d data fields.\n", msg->
num_local, msg->
num_fields);
670 LOG((5,
" SECTION 1: %d %d %d %d %d %d %d %d %d %d %d %d %d\n", msg->
center, msg->
subcenter,
684 char date_time[100 + 1];
686 float total = 0.0, max = 0.0, min = 0.0;
690 fprintf(f,
" FIELD %d\n", fld + 1);
694 fprintf(f,
" SECTION 0: %d 2\n", msg->
discipline);
695 fprintf(f,
" SECTION 1: %d %d %d %d %d %d %d %d %d %d %d %d %d\n", msg->
center, msg->
subcenter,
701 for (sec = msg->
sec; sec; sec = sec->
next)
708 for (sec2 = sec; sec2; sec2 = sec2->
prev)
712 fprintf(f,
" SECTION 2: %d bytes\n", sec2->
sec_len - 5);
715 for (sec3 = sec; sec3; sec3 = sec3->
prev)
725 fprintf(f,
" GRID TEMPLATE 3. %d : ", sec3_info->
grid_def);
728 fprintf(f,
" %d", (
int)sec3->
template[t]);
731 fprintf(f,
" NO Optional List Defining Number of Data Points.\n");
735 fprintf(f,
" PRODUCT TEMPLATE 4. %d: ", sec4_info->
prod_def);
747 fprintf(f,
" %d", (
int)sec->
template[t]);
771 fprintf(f,
" FIELD: %-8s%s %s\n", abbrev, level_desc, date_time);
773 fprintf(f,
" NO Optional Vertical Coordinate List.\n");
776 for (sec5 = sec; sec5; sec5 = sec5->
next)
783 for (sec6 = sec; sec6; sec6 = sec6->
next)
791 fprintf(f,
" Num. of Data Points = %d with BIT-MAP 0\n", sec5_info->
num_data_points);
793 fprintf(f,
" Num. of Data Points = %d NO BIT-MAP \n", sec5_info->
num_data_points);
794 fprintf(f,
" DRS TEMPLATE 5. %d : ", sec5_info->
data_def);
797 fprintf(f,
" %d", (
int)sec5->
template[t]);
799 fprintf(f,
" Data Values:\n");
800 fprintf(f,
" Num. of Data Points = %d Num. of Data Undefined = 0\n", sec5_info->
num_data_points);
831 fprintf(f,
"( PARM= %s ) : MIN=%25.8f AVE=%25.8f MAX=%25.8f\n",
842 fprintf(f,
" \n Total Number of Fields Found = %d\n", total_fields);
#define G2C_DATE_TIME_LEN
Size of the date/time string.
static int format_level(char *cbuf, int ival, int scale)
Format the level string for degrib2 output.
#define G2C_MAX_TYPE_OF_FIXED_SURFACE_LEN
Maximum length of "Type of first fixed surface" string.
int g2c_degrib2(int g2cid, const char *fileout)
Write a summary file like the degrib2 utility.
G2C_FILE_INFO_T g2c_file[G2C_MAX_FILES+1]
Global file information.
int g2c_get_level_desc(int ipdtn, long long int *ipdtmpl, char *level_desc)
Determine the string that describes the level information, given the GRIB2 Product Definition Templat...
int g2c_get_datetime(int ipdtn, long long int *ipdtmpl, short year, unsigned char month, unsigned char day, unsigned char hour, unsigned char minute, unsigned char second, char *tabbrev)
Convert date and time from GRIB2 info to string output.
G2C_CODE_TABLE_T * g2c_table
Pointer to the list of code tables.
int g2c_param_abbrev(int g2disc, int g2cat, int g2num, char *abbrev)
Get NOAA abbreviation for a GRIB2 parameter.
int g2c_get_prod(int g2cid, int msg_num, int prod_num, int *num_data_points, float *data)
Read the data for a product.
#define G2C_MAX_FILES
Maximum number of open files.
#define G2C_ENOSECTION
Cannot find section.
#define G2C_EFILE
File I/O error.
#define G2C_ERROR
General error code, returned for some test errors.
#define G2C_EINVAL
Invalid input.
#define G2C_EBADID
Bad ID.
#define G2C_MAX_NOAA_ABBREV_LEN
Maximum length of a NOAA abbreviation of a parameter.
#define G2C_NOERROR
No error.
Header file with internal function prototypes NCEPLIBS-g2c library.
struct g2c_section_info * next
Pointer to next in list.
struct g2c_section_info * sec
List of section metadata.
short subcenter
Originating subcenter.
unsigned char master_version
GRIB master tables version number.
unsigned char type
Type of processed data in this GRIB message.
unsigned short grid_def
Grid definition template number (= N) (See Table 3.1).
unsigned char minute
Minute.
unsigned int num_data_points
Number of data points.
unsigned short num_coord
Number of coordinate values after template.
int num_local
Number of local sections in the message.
unsigned char sig_ref_time
Significance of reference time.
unsigned char num_opt
Number of octets for optional list of numbers defining number of points.
unsigned char discipline
Discipline from section 0.
unsigned char interp_list
Interpetation of list of numbers defining number of points (See Table 3.11).
size_t bytes_in_msg
Number of bytes in this message.
struct g2c_section_info * prev
Pointer to previous in list.
int num_fields
Number of fields in the message.
unsigned char sec_num
Section number.
unsigned int num_data_points
Number of data points where one or more values are specified in Section 7 when a bit map is present,...
void * sec_info
Pointer to struct specific for section 3, 4, 5, 6, or 7.
unsigned char indicator
Bit map indicator.
unsigned int sec_len
Length of the section (in bytes).
unsigned char status
Production Status of Processed data in the GRIB message.
#define LOG(e)
Ignore logging to stdout.
unsigned char second
Second.
unsigned char source_grid_def
Source of grid definition (See Table 3.0).
int template_len
Number of entries in template.
unsigned char local_version
Version number of GRIB local tables used to augment Master Tables.
unsigned char month
Month.
size_t msg_num
Number of message in file (0-based).
unsigned short data_def
Data representation template number (See Table 5.0).
size_t bytes_to_msg
Number of bytes to skip in the file, to get to this message.
long long int * template
Grid, product, or data template.
struct g2c_message_info * next
Pointer to next in list.
G2C_MESSAGE_INFO_T * msg
Pointer to contianing message.
short center
Originating center.
int * optional
Optional list of numbers defining number of points.
unsigned short prod_def
Product definition template number (See Table 4.0).
This is the information about each open file.
This is the information about each message.
Information about Section 3 GRID DEFINITION SECTION.
Information about Section 4 PRODUCT DEFINITION SECTION.
Information about Section 5 DATA REPRESENTATION SECTION.
Information about Section 6 BIT-MAP SECTION.
Information about a section 3 through 7 in a GRIB2 message.