61 {0, 15, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}},
64 {1, 18, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}},
67 {2, 17, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1}},
70 {3, 31, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, -4, 4, 4, 1, -1, 4, -1, 4}},
73 {4, 30, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, 4, 4, 1, -1, 4, -1, 4}},
76 {5, 22, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, -1, -4, -1, -4}},
79 {6, 16, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1}},
82 {7, 15, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}},
85 {8, 29, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
88 {9, 36, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, -1, -4, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
91 {10, 30, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
94 {11, 32, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
97 {12, 31, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
100 {13, 45, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, -4, 4, 4, 1, -1, 4, -1, 4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
103 {14, 44, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, 4, 4, 1, -1, 4, -1, 4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
106 {15, 18, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}},
108 {20, 19, 0, {1, 1, 1, 1, 1, -4, 4, 2, 4, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2}},
110 {30, 5, 1, {1, 1, 1, 1, 1}},
112 {31, 5, 1, {1, 1, 1, 1, 1}},
115 {40, 16, 0, {1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}},
118 {41, 19, 0, {1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}},
122 {42, 30, 1, {1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
126 {43,33, 1, {1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
128 {254, 3, 0, {1, 1, 4}},
131 {1000, 9, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4}},
134 {1001, 16, 0, {1, 1, 1, 1, 1, 2, 1, 1, 4, 4, 1, 1, 1, 4, 1, 4}},
137 {1002, 15, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, 1, 1, 4, 4, 2}},
140 {1100, 15, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}},
143 {1101, 22, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 4, 1, 1, 1, 4, 1, 4}},
145 {32, 10, 1, {1, 1, 1, 1, 1, 2, 1, 1, -2, 1}},
148 {44, 21, 0, {1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -2, 1, -1, -4, 1, -1, -4}},
152 {45, 24, 0, {1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}},
156 {46, 35, 1, {1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
160 {47, 38, 1, {1, 1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
164 {48, 26, 0, {1, 1, 2, 1, -1, -4, -1, -4, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}},
169 {50, 21, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 4, 4, 4, 4}},
174 {52, 15, 0, {1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4}},
178 {51, 16, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1}},
183 {91, 36, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, -1, -4, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
188 {33, 18, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, 2, 2, 2, -1, -4, 1, 1, 1}},
193 {34, 32, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, 2, 2, 2, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
198 {53, 19, 1, {1, 1, 1, 1, 4, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}},
203 {54, 22, 1, {1, 1, 1, 1, 4, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}},
209 {57, 7, 1, {1, 1, 2, 2, 2, 2, 1}},
214 {60, 24, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1}},
219 {61, 38, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}},
225 {35, 6, 1, {1, 1, 1, 1, 1, 1}}
297 printf(
"getpdstemplate: PDS Template 4.%d not defined.\n", (
int)number);
328 g2int index, i, j, k, l;
341 new->extlen = list[26];
342 new->ext = malloc(
sizeof(
g2int) * new->extlen);
343 for (i = 0; i <
new->extlen; i++)
348 else if (number == 4)
350 new->extlen = list[25];
351 new->ext = malloc(
sizeof(
g2int) * new->extlen);
352 for (i = 0; i <
new->extlen; i++)
357 else if (number == 8)
361 new->extlen = (list[21] - 1) * 6;
362 new->ext = malloc(
sizeof(
g2int) * new->extlen);
363 for (j = 2; j <= list[21]; j++)
366 for (k = 0; k < 6; k++)
368 new->ext[l+k] =
new->map[23 + k];
373 else if (number == 9)
377 new->extlen = (list[28] - 1) * 6;
378 new->ext = malloc(
sizeof(
g2int) * new->extlen);
379 for (j = 2; j <= list[28]; j++)
382 for (k = 0; k < 6; k++)
384 new->ext[l + k] =
new->map[30 + k];
389 else if (number == 10)
393 new->extlen = (list[22] - 1) * 6;
394 new->ext = (
g2int *)malloc(
sizeof(
g2int)*
new->extlen);
395 for (j = 2; j <= list[22]; j++)
398 for (k = 0; k < 6; k++)
400 new->ext[l + k] =
new->map[24 + k];
405 else if (number == 11)
409 new->extlen = (list[24] - 1) * 6;
410 new->ext = malloc(
sizeof(
g2int) * new->extlen);
411 for (j = 2; j <= list[24]; j++)
414 for (k = 0; k < 6; k++)
416 new->ext[l + k] =
new->map[26 + k];
421 else if (number == 12)
425 new->extlen = (list[23] - 1) * 6;
426 new->ext = malloc(
sizeof(
g2int) * new->extlen);
427 for (j = 2; j <= list[23]; j++)
430 for (k = 0; k < 6; k++)
432 new->ext[l + k] =
new->map[25 + k];
437 else if (number == 13)
439 new->extlen = ((list[37] - 1) * 6) + list[26];
440 new->ext = malloc(
sizeof(
g2int) * new->extlen);
443 for (j = 2; j <= list[37]; j++)
446 for (k = 0; k < 6; k++)
448 new->ext[l + k] =
new->map[39 + k];
452 l = (list[37] - 1) * 6;
455 for (i = 0; i < list[26]; i++)
460 else if (number == 14)
462 new->extlen = ((list[36] - 1) * 6) + list[25];
463 new->ext = malloc(
sizeof(
g2int) * new->extlen);
466 for (j = 2; j <= list[36]; j++)
469 for (k = 0; k < 6; k++)
471 new->ext[l + k] =
new->map[38 + k];
475 l = (list[36] - 1) * 6;
478 for (i = 0; i < list[25]; i++)
483 else if (number == 30)
485 new->extlen = list[4] * 5;
486 new->ext = malloc(
sizeof(
g2int) * new->extlen);
487 for (i = 0;i < list[4]; i++)
497 else if (number == 31)
499 new->extlen = list[4] * 5;
500 new->ext = malloc(
sizeof(
g2int) * new->extlen);
501 for (i = 0; i < list[4]; i++)
511 else if (number == 42)
515 new->extlen = (list[22] - 1) * 6;
516 new->ext = malloc(
sizeof(
g2int) * new->extlen);
517 for (j = 2; j <= list[22]; j++)
520 for (k = 0; k < 6; k++)
522 new->ext[l + k] =
new->map[24 + k];
527 else if (number == 43)
531 new->extlen = (list[25] - 1) * 6;
532 new->ext = malloc(
sizeof(
g2int) * new->extlen);
533 for (j = 2; j <= list[25]; j++)
536 for (k = 0; k < 6; k++)
538 new->ext[l + k] =
new->map[27 + k];
543 else if (number == 32)
545 new->extlen = list[9] * 5;
546 new->ext = malloc(
sizeof(
g2int) * new->extlen);
547 for (i = 0; i < list[9]; i++)
553 new->ext[l + 3] = -1;
554 new->ext[l + 4] = -4;
557 else if (number == 46)
561 new->extlen = (list[27] - 1) * 6;
562 new->ext = malloc(
sizeof(
g2int) * new->extlen);
563 for (j = 2; j <= list[27]; j++)
566 for (k = 0; k < 6; k++)
568 new->ext[l + k] =
new->map[29 + k];
573 else if (number == 47)
577 new->extlen = (list[30] - 1) * 6;
578 new->ext = malloc(
sizeof(
g2int) * new->extlen);
579 for (j = 2; j <= list[30]; j++)
582 for (k = 0; k < 6; k++)
584 new->ext[l + k] =
new->map[32 + k];
589 else if (number == 51)
591 new->extlen = list[15] * 6;
592 new->ext = malloc(
sizeof(
g2int) * new->extlen);
593 for (i = 0; i < list[15]; i++)
604 else if (number == 33)
606 new->extlen = list[9];
607 new->ext = malloc(
sizeof(
g2int) * new->extlen);
608 for (i = 0; i <
new->extlen; i++)
613 else if (number == 34)
615 new->extlen = ((list[24] - 1) * 6)+list[9];
616 new->ext = malloc(
sizeof(
g2int) * new->extlen);
619 for (j = 2; j <= list[24]; j++)
622 for (k = 0; k < 6; k++)
624 new->ext[l + k] =
new->map[26 + k];
628 l = (list[24] - 1) * 6;
631 for (i = 0; i < list[9]; i++)
636 else if (number == 53)
638 new->extlen = list[3];
639 new->ext = malloc(
sizeof(
g2int) * new->extlen);
640 for (i = 0; i <
new->extlen; i++)
645 else if (number == 54)
647 new->extlen = list[3];
648 new->ext = malloc(
sizeof(
g2int) * new->extlen);
649 for (i = 0;i<
new->extlen;i++)
654 else if (number == 91)
656 new->extlen = ((list[28] - 1) * 6)+list[15];
657 new->ext = malloc(
sizeof(
g2int) * new->extlen);
660 for (j = 2; j <= list[28]; j++)
663 for (k = 0; k < 6; k++)
665 new->ext[l + k] =
new->map[30 + k];
669 l = (list[29] - 1) * 6;
672 for (i = 0; i < list[15]; i++)
678 else if (number == 57)
680 new->extlen = list[6] * 15;
681 new->ext = malloc(
sizeof(
g2int) * new->extlen);
682 for (i = 0; i < list[6]; i++)
703 else if (number == 61)
707 new->extlen = (list[30] - 1) * 6;
708 new->ext = malloc(
sizeof(
g2int) * new->extlen);
709 for (j = 2; j <= list[30]; j++)
712 for (k = 0; k < 6; k++)
714 new->ext[l + k] =
new->map[32 + k];
742 int *extlen,
int *ext)
766 template8[t] =
template[t];
773 for (e = 0; e < gt->
extlen; e++)
#define G2C_MAX_PDS_TEMPLATE
Maximum number of PDS templates.
#define G2C_ENOTEMPLATE
Template not found.
#define G2C_ENOMEM
Out of memory.
#define G2C_EINVAL
Invalid input.
#define G2C_MAX_PDS_TEMPLATE_MAPLEN
Maximum template map length.
int64_t g2int
Long integer type.
#define G2C_NOERROR
No error.
Header file with internal function prototypes NCEPLIBS-g2c library.
g2int * ext
Number of octets of each entry in the extension part of the template.
g2int extlen
Number of entries in the template extension.
Struct for GRIB template, returned by getgridtemplate().
static g2int getpdsindex(g2int number)
This function returns the index of specified Product Definition Template in array templates.
int g2c_get_pds_template(int pds_template_num, int *maplen, int *map, int *needext)
Get PDS template information.
gtemplate * extpdstemplate(g2int number, g2int *list)
This subroutine generates the remaining octet map for a given Product Definition Template,...
int g2c_get_pds_template_extension(int pds_template_num, int *template, int *extlen, int *ext)
Get pds template extension information.
static const struct pdstemplate templatespds[G2C_MAX_PDS_TEMPLATE]
Data for struct for PDS template.
gtemplate * getpdstemplate(g2int number)
This subroutine returns PDS template information for a specified Product Definition Template.