NCEPLIBS-g2c 1.9.0
Loading...
Searching...
No Matches
pdstemplates.c
Go to the documentation of this file.
1
41#include "grib2_int.h"
42
46struct pdstemplate
47{
48 g2int template_num;
49 g2int mappdslen;
50 g2int needext;
52};
53
57static const struct pdstemplate templatespds[G2C_MAX_PDS_TEMPLATE] =
58{
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, -4, 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}},
165
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}},
170
174 {52, 15, 0, {1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4}},
175
178 {51, 16, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1}},
179
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}}
226
227} ;
228
241static g2int
243{
244 g2int j, getpdsindex = -1;
245
246 for (j = 0; j < G2C_MAX_PDS_TEMPLATE; j++)
247 {
248 if (number == templatespds[j].template_num)
249 {
250 getpdsindex = j;
251 return getpdsindex;
252 }
253 }
254
255 return getpdsindex;
256}
257
276gtemplate *
278{
279 g2int index;
280 gtemplate *new;
281
282 index = getpdsindex(number);
283
284 if (index != -1)
285 {
286 new = malloc(sizeof(gtemplate));
287 new->type = 4;
288 new->num = templatespds[index].template_num;
289 new->maplen = templatespds[index].mappdslen;
290 new->needext = templatespds[index].needext;
291 new->map = (g2int *)templatespds[index].mappds;
292 new->extlen = 0;
293 new->ext = NULL;
294 return new;
295 }
296 else {
297 printf("getpdstemplate: PDS Template 4.%d not defined.\n", (int)number);
298 return NULL;
299 }
300
301 return NULL;
302}
303
324gtemplate *
326{
327 gtemplate *new;
328 g2int index, i, j, k, l;
329
330 index = getpdsindex(number);
331 if (index == -1)
332 return NULL;
333
334 new = getpdstemplate(number);
335
336 if (!new->needext)
337 return new;
338
339 if (number == 3)
340 {
341 new->extlen = list[26];
342 new->ext = malloc(sizeof(g2int) * new->extlen);
343 for (i = 0; i < new->extlen; i++)
344 {
345 new->ext[i] = 1;
346 }
347 }
348 else if (number == 4)
349 {
350 new->extlen = list[25];
351 new->ext = malloc(sizeof(g2int) * new->extlen);
352 for (i = 0; i < new->extlen; i++)
353 {
354 new->ext[i] = 1;
355 }
356 }
357 else if (number == 8)
358 {
359 if (list[21] > 1)
360 {
361 new->extlen = (list[21] - 1) * 6;
362 new->ext = malloc(sizeof(g2int) * new->extlen);
363 for (j = 2; j <= list[21]; j++)
364 {
365 l = (j - 2) * 6;
366 for (k = 0; k < 6; k++)
367 {
368 new->ext[l+k] = new->map[23 + k];
369 }
370 }
371 }
372 }
373 else if (number == 9)
374 {
375 if (list[28] > 1)
376 {
377 new->extlen = (list[28] - 1) * 6;
378 new->ext = malloc(sizeof(g2int) * new->extlen);
379 for (j = 2; j <= list[28]; j++)
380 {
381 l = (j - 2) * 6;
382 for (k = 0; k < 6; k++)
383 {
384 new->ext[l + k] = new->map[30 + k];
385 }
386 }
387 }
388 }
389 else if (number == 10)
390 {
391 if (list[22] > 1)
392 {
393 new->extlen = (list[22] - 1) * 6;
394 new->ext = (g2int *)malloc(sizeof(g2int)*new->extlen);
395 for (j = 2; j <= list[22]; j++)
396 {
397 l = (j - 2) * 6;
398 for (k = 0; k < 6; k++)
399 {
400 new->ext[l + k] = new->map[24 + k];
401 }
402 }
403 }
404 }
405 else if (number == 11)
406 {
407 if (list[24] > 1)
408 {
409 new->extlen = (list[24] - 1) * 6;
410 new->ext = malloc(sizeof(g2int) * new->extlen);
411 for (j = 2; j <= list[24]; j++)
412 {
413 l = (j - 2) * 6;
414 for (k = 0; k < 6; k++)
415 {
416 new->ext[l + k] = new->map[26 + k];
417 }
418 }
419 }
420 }
421 else if (number == 12)
422 {
423 if (list[23] > 1)
424 {
425 new->extlen = (list[23] - 1) * 6;
426 new->ext = malloc(sizeof(g2int) * new->extlen);
427 for (j = 2; j <= list[23]; j++)
428 {
429 l = (j - 2) * 6;
430 for (k = 0; k < 6; k++)
431 {
432 new->ext[l + k] = new->map[25 + k];
433 }
434 }
435 }
436 }
437 else if (number == 13)
438 {
439 new->extlen = ((list[37] - 1) * 6) + list[26];
440 new->ext = malloc(sizeof(g2int) * new->extlen);
441 if (list[37] > 1)
442 {
443 for (j = 2; j <= list[37]; j++)
444 {
445 l = (j - 2) * 6;
446 for (k = 0; k < 6; k++)
447 {
448 new->ext[l + k] = new->map[39 + k];
449 }
450 }
451 }
452 l = (list[37] - 1) * 6;
453 if (l < 0)
454 l = 0;
455 for (i = 0; i < list[26]; i++)
456 {
457 new->ext[l+i] = 1;
458 }
459 }
460 else if (number == 14)
461 {
462 new->extlen = ((list[36] - 1) * 6) + list[25];
463 new->ext = malloc(sizeof(g2int) * new->extlen);
464 if (list[36] > 1)
465 {
466 for (j = 2; j <= list[36]; j++)
467 {
468 l = (j - 2) * 6;
469 for (k = 0; k < 6; k++)
470 {
471 new->ext[l + k] = new->map[38 + k];
472 }
473 }
474 }
475 l = (list[36] - 1) * 6;
476 if (l < 0)
477 l = 0;
478 for (i = 0; i < list[25]; i++)
479 {
480 new->ext[l + i] = 1;
481 }
482 }
483 else if (number == 30)
484 {
485 new->extlen = list[4] * 5;
486 new->ext = malloc(sizeof(g2int) * new->extlen);
487 for (i = 0;i < list[4]; i++)
488 {
489 l = i * 5;
490 new->ext[l] = 2;
491 new->ext[l + 1] = 2;
492 new->ext[l + 2] = 1;
493 new->ext[l + 3] = 1;
494 new->ext[l + 4] = 4;
495 }
496 }
497 else if (number == 31)
498 {
499 new->extlen = list[4] * 5;
500 new->ext = malloc(sizeof(g2int) * new->extlen);
501 for (i = 0; i < list[4]; i++)
502 {
503 l = i*5;
504 new->ext[l] = 2;
505 new->ext[l + 1] = 2;
506 new->ext[l + 2] = 2;
507 new->ext[l + 3] = 1;
508 new->ext[l + 4] = 4;
509 }
510 }
511 else if (number == 42)
512 {
513 if (list[22] > 1)
514 {
515 new->extlen = (list[22] - 1) * 6;
516 new->ext = malloc(sizeof(g2int) * new->extlen);
517 for (j = 2; j <= list[22]; j++)
518 {
519 l = (j - 2) * 6;
520 for (k = 0; k < 6; k++)
521 {
522 new->ext[l + k] = new->map[24 + k];
523 }
524 }
525 }
526 }
527 else if (number == 43)
528 {
529 if (list[25] > 1)
530 {
531 new->extlen = (list[25] - 1) * 6;
532 new->ext = malloc(sizeof(g2int) * new->extlen);
533 for (j = 2; j <= list[25]; j++)
534 {
535 l = (j - 2) * 6;
536 for (k = 0; k < 6; k++)
537 {
538 new->ext[l + k] = new->map[27 + k];
539 }
540 }
541 }
542 }
543 else if (number == 32)
544 {
545 new->extlen = list[9] * 5;
546 new->ext = malloc(sizeof(g2int) * new->extlen);
547 for (i = 0; i < list[9]; i++)
548 {
549 l = i * 5;
550 new->ext[l] = 2;
551 new->ext[l + 1] = 2;
552 new->ext[l + 2] = 2;
553 new->ext[l + 3] = -1;
554 new->ext[l + 4] = -4;
555 }
556 }
557 else if (number == 46)
558 {
559 if (list[27] > 1)
560 {
561 new->extlen = (list[27] - 1) * 6;
562 new->ext = malloc(sizeof(g2int) * new->extlen);
563 for (j = 2; j <= list[27]; j++)
564 {
565 l = (j - 2) * 6;
566 for (k = 0; k < 6; k++)
567 {
568 new->ext[l + k] = new->map[29 + k];
569 }
570 }
571 }
572 }
573 else if (number == 47)
574 {
575 if (list[30] > 1)
576 {
577 new->extlen = (list[30] - 1) * 6;
578 new->ext = malloc(sizeof(g2int) * new->extlen);
579 for (j = 2; j <= list[30]; j++)
580 {
581 l = (j - 2) * 6;
582 for (k = 0; k < 6; k++)
583 {
584 new->ext[l + k] = new->map[32 + k];
585 }
586 }
587 }
588 }
589 else if (number == 51)
590 {
591 new->extlen = list[15] * 6;
592 new->ext = malloc(sizeof(g2int) * new->extlen);
593 for (i = 0; i < list[15]; i++)
594 {
595 l = i * 6;
596 new->ext[l] = 1;
597 new->ext[l+1] = 1;
598 new->ext[l+2] = -1;
599 new->ext[l+3] = -4;
600 new->ext[l+4] = -1;
601 new->ext[l+5] = -4;
602 }
603 }
604 else if (number == 33)
605 {
606 new->extlen = list[9];
607 new->ext = malloc(sizeof(g2int) * new->extlen);
608 for (i = 0; i < new->extlen; i++)
609 {
610 new->ext[i] = 1;
611 }
612 }
613 else if (number == 34)
614 {
615 new->extlen = ((list[24] - 1) * 6)+list[9];
616 new->ext = malloc(sizeof(g2int) * new->extlen);
617 if (list[24] > 1)
618 {
619 for (j = 2; j <= list[24]; j++)
620 {
621 l = (j - 2) * 6;
622 for (k = 0; k < 6; k++)
623 {
624 new->ext[l + k] = new->map[26 + k];
625 }
626 }
627 }
628 l = (list[24] - 1) * 6;
629 if (l < 0)
630 l = 0;
631 for (i = 0; i < list[9]; i++)
632 {
633 new->ext[l + i] = 1;
634 }
635 }
636 else if (number == 53)
637 {
638 new->extlen = list[3];
639 new->ext = malloc(sizeof(g2int) * new->extlen);
640 for (i = 0; i < new->extlen; i++)
641 {
642 new->ext[i] = 1;
643 }
644 }
645 else if (number == 54)
646 {
647 new->extlen = list[3];
648 new->ext = malloc(sizeof(g2int) * new->extlen);
649 for (i = 0;i<new->extlen;i++)
650 {
651 new->ext[i] = 1;
652 }
653 }
654 else if (number == 91)
655 {
656 new->extlen = ((list[28] - 1) * 6)+list[15];
657 new->ext = malloc(sizeof(g2int) * new->extlen);
658 if (list[28] > 1)
659 {
660 for (j = 2; j <= list[28]; j++)
661 {
662 l = (j - 2) * 6;
663 for (k = 0; k < 6; k++)
664 {
665 new->ext[l + k] = new->map[30 + k];
666 }
667 }
668 }
669 l = (list[29] - 1) * 6;
670 if (l < 0)
671 l = 0;
672 for (i = 0; i < list[15]; i++)
673 {
674 new->ext[l + i] = 1;
675 }
676 }
677 /* PDT 4.57 (10/07/2015) */
678 else if (number == 57)
679 {
680 new->extlen = list[6] * 15;
681 new->ext = malloc(sizeof(g2int) * new->extlen);
682 for (i = 0; i < list[6]; i++)
683 {
684 l = i*15;
685 new->ext[l] = 1;
686 new->ext[l+1] = -4;
687 new->ext[l+2] = 1;
688 new->ext[l+3] = 1;
689 new->ext[l+4] = 1;
690 new->ext[l+5] = 2;
691 new->ext[l+6] = 1;
692 new->ext[l+7] = 1;
693 new->ext[l+8] = -4;
694 new->ext[l+9] = 1;
695 new->ext[l+10] = -1;
696 new->ext[l+11] = -4;
697 new->ext[l+12] = 1;
698 new->ext[l+13] = -1;
699 new->ext[l+14] = -4;
700 }
701 }
702 /* PDT 4.61 (10/07/2015) */
703 else if (number == 61)
704 {
705 if (list[30] > 1)
706 {
707 new->extlen = (list[30] - 1) * 6;
708 new->ext = malloc(sizeof(g2int) * new->extlen);
709 for (j = 2; j <= list[30]; j++)
710 {
711 l = (j - 2) * 6;
712 for (k = 0; k < 6; k++)
713 {
714 new->ext[l + k] = new->map[32 + k];
715 }
716 }
717 }
718 }
719
720 return new;
721}
722
740int
741g2c_get_pds_template_extension(int pds_template_num, int *template,
742 int *extlen, int *ext)
743{
744 int j, t;
745
746 /* Check input. */
747 if (!template)
748 return G2C_EINVAL;
749
750 /* Look through the array of templates to find a matching one. */
751 for (j = 0; j < G2C_MAX_PDS_TEMPLATE; j++)
752 {
753 if (pds_template_num == templatespds[j].template_num)
754 {
755 /* Is there an extension to this template? */
756 if (templatespds[j].needext)
757 {
758 gtemplate *gt;
759 g2int *template8;
760 int e;
761
762 /* Copy template to g2int for extpdstemplate() function. */
763 if (!(template8 = malloc(sizeof(g2int) * templatespds[j].mappdslen)))
764 return G2C_ENOMEM;
765 for (t = 0; t < templatespds[j].mappdslen; t++)
766 template8[t] = template[t];
767 if (!(gt = extpdstemplate(pds_template_num, template8)))
768 return G2C_ENOTEMPLATE;
769 free(template8);
770 if (extlen)
771 *extlen = gt->extlen;
772 if (ext)
773 for (e = 0; e < gt->extlen; e++)
774 ext[e] = gt->ext[e];
775 free(gt->ext);
776 free(gt);
777 }
778 else
779 {
780 if (extlen)
781 *extlen = 0;
782 }
783
784 /* Done. */
785 return G2C_NOERROR;
786 }
787 }
788
789 /* If we didn't find a template, return an error. */
790 return G2C_ENOTEMPLATE;
791}
792
815int
816g2c_get_pds_template(int pds_template_num, int *maplen, int *map, int *needext)
817{
818 int j, m;
819
820 /* Look through the array of templates to find a matching one. */
821 for (j = 0; j < G2C_MAX_PDS_TEMPLATE; j++)
822 {
823 if (pds_template_num == templatespds[j].template_num)
824 {
825 /* Copy maplen and map if the caller wants them. */
826 if (maplen)
827 *maplen = templatespds[j].mappdslen;
828 if (map)
829 for (m = 0; m < templatespds[j].mappdslen; m++)
830 map[m] = templatespds[j].mappds[m];
831 if (needext)
832 *needext = templatespds[j].needext;
833
834 /* Done. */
835 return G2C_NOERROR;
836 }
837 }
838
839 /* If we didn't find a template, return an error. */
840 return G2C_ENOTEMPLATE;
841}
842
843
#define G2C_MAX_PDS_TEMPLATE
Maximum number of PDS templates.
Definition grib2.h:309
#define G2C_ENOTEMPLATE
Template not found.
Definition grib2.h:512
#define G2C_ENOMEM
Out of memory.
Definition grib2.h:500
#define G2C_EINVAL
Invalid input.
Definition grib2.h:496
#define G2C_MAX_PDS_TEMPLATE_MAPLEN
Maximum template map length.
Definition grib2.h:310
int64_t g2int
Long integer type.
Definition grib2.h:32
#define G2C_NOERROR
No error.
Definition grib2.h:491
Header file with internal function prototypes NCEPLIBS-g2c library.
g2int * ext
Number of octets of each entry in the extension part of the template.
Definition grib2_int.h:300
g2int extlen
Number of entries in the template extension.
Definition grib2_int.h:296
Struct for GRIB template, returned by getgridtemplate().
Definition grib2_int.h:276
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.
int g2c_get_pds_template_extension(int pds_template_num, int *template, int *extlen, int *ext)
Get pds template extension information.
gtemplate * extpdstemplate(g2int number, g2int *list)
This subroutine generates the remaining octet map for a given Product Definition Template,...
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.