[g2clib] Add patch to avoid multiple definitions of templates
Orion Poplawski
orion at fedoraproject.org
Fri Mar 9 21:16:56 UTC 2012
commit be7e2fc23118b164b3895e60a0c8ee15c4e32a6a
Author: Orion Poplawski <orion at cora.nwra.com>
Date: Fri Mar 9 14:16:54 2012 -0700
Add patch to avoid multiple definitions of templates
g2clib-templates.patch | 399 ++++++++++++++++++++++++++++++++++++++++++++++++
g2clib.spec | 8 +-
2 files changed, 406 insertions(+), 1 deletions(-)
---
diff --git a/g2clib-templates.patch b/g2clib-templates.patch
new file mode 100644
index 0000000..9b26962
--- /dev/null
+++ b/g2clib-templates.patch
@@ -0,0 +1,399 @@
+diff -up g2clib-1.2.3/drstemplates.c.templates g2clib-1.2.3/drstemplates.c
+--- g2clib-1.2.3/drstemplates.c.templates 2011-11-10 11:35:05.000000000 -0700
++++ g2clib-1.2.3/drstemplates.c 2012-03-09 12:44:49.190332026 -0700
+@@ -2,6 +2,29 @@
+ #include "grib2.h"
+ #include "drstemplates.h"
+
++const struct drstemplate templatesdrs[MAXDRSTEMP] = {
++ // 5.0: Grid point data - Simple Packing
++ { 0, 5, 0, {4,-2,-2,1,1} },
++ // 5.2: Grid point data - Complex Packing
++ { 2, 16, 0, {4,-2,-2,1,1,1,1,4,4,4,1,1,4,1,4,1} },
++ // 5.3: Grid point data - Complex Packing and spatial differencing
++ { 3, 18, 0, {4,-2,-2,1,1,1,1,4,4,4,1,1,4,1,4,1,1,1} },
++ // 5.50: Spectral Data - Simple Packing
++ { 50, 5, 0, {4,-2,-2,1,4} },
++ // 5.51: Spherical Harmonics data - Complex packing
++ { 51, 10, 0, {4,-2,-2,1,-4,2,2,2,4,1} },
++// // 5.1: Matrix values at gridpoint - Simple packing
++// { 1, 15, 1, {4,-2,-2,1,1,1,4,2,2,1,1,1,1,1,1} },
++ // 5.40: Grid point data - JPEG2000 encoding
++ { 40, 7, 0, {4,-2,-2,1,1,1,1} },
++ // 5.41: Grid point data - PNG encoding
++ { 41, 5, 0, {4,-2,-2,1,1} },
++ // 5.40000: Grid point data - JPEG2000 encoding
++ { 40000, 7, 0, {4,-2,-2,1,1,1,1} },
++ // 5.40010: Grid point data - PNG encoding
++ { 40010, 5, 0, {4,-2,-2,1,1} }
++} ;
++
+ g2int getdrsindex(g2int number)
+ /*!$$$ SUBPROGRAM DOCUMENTATION BLOCK
+ ! . . . .
+diff -up g2clib-1.2.3/drstemplates.h.templates g2clib-1.2.3/drstemplates.h
+--- g2clib-1.2.3/drstemplates.h.templates 2011-11-10 11:35:05.000000000 -0700
++++ g2clib-1.2.3/drstemplates.h 2012-03-09 12:47:11.317245964 -0700
+@@ -42,28 +42,8 @@
+ g2int mapdrs[MAXDRSMAPLEN];
+ };
+
+- const struct drstemplate templatesdrs[MAXDRSTEMP] = {
+- // 5.0: Grid point data - Simple Packing
+- { 0, 5, 0, {4,-2,-2,1,1} },
+- // 5.2: Grid point data - Complex Packing
+- { 2, 16, 0, {4,-2,-2,1,1,1,1,4,4,4,1,1,4,1,4,1} },
+- // 5.3: Grid point data - Complex Packing and spatial differencing
+- { 3, 18, 0, {4,-2,-2,1,1,1,1,4,4,4,1,1,4,1,4,1,1,1} },
+- // 5.50: Spectral Data - Simple Packing
+- { 50, 5, 0, {4,-2,-2,1,4} },
+- // 5.51: Spherical Harmonics data - Complex packing
+- { 51, 10, 0, {4,-2,-2,1,-4,2,2,2,4,1} },
+-// // 5.1: Matrix values at gridpoint - Simple packing
+-// { 1, 15, 1, {4,-2,-2,1,1,1,4,2,2,1,1,1,1,1,1} },
+- // 5.40: Grid point data - JPEG2000 encoding
+- { 40, 7, 0, {4,-2,-2,1,1,1,1} },
+- // 5.41: Grid point data - PNG encoding
+- { 41, 5, 0, {4,-2,-2,1,1} },
+- // 5.40000: Grid point data - JPEG2000 encoding
+- { 40000, 7, 0, {4,-2,-2,1,1,1,1} },
+- // 5.40010: Grid point data - PNG encoding
+- { 40010, 5, 0, {4,-2,-2,1,1} }
+- } ;
++ extern const struct drstemplate templatesdrs[];
+
++ g2int getdrsindex(g2int number);
+
+ #endif /* _drstemplates_H */
+diff -up g2clib-1.2.3/gridtemplates.c.templates g2clib-1.2.3/gridtemplates.c
+--- g2clib-1.2.3/gridtemplates.c.templates 2011-11-10 11:35:05.000000000 -0700
++++ g2clib-1.2.3/gridtemplates.c 2012-03-09 12:46:16.725199636 -0700
+@@ -2,6 +2,62 @@
+ #include "grib2.h"
+ #include "gridtemplates.h"
+
++const struct gridtemplate templatesgrid[MAXGRIDTEMP] = {
++ // 3.0: Lat/Lon grid
++ { 0, 19, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1} },
++ // 3.1: Rotated Lat/Lon grid
++ { 1, 22, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,-4,4,4} },
++ // 3.2: Stretched Lat/Lon grid
++ { 2, 22, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,-4,4,-4} },
++ // 3.3: Stretched & Rotated Lat/Lon grid
++ { 3, 25, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,-4,4,4,-4,4,-4} },
++ // 3.10: Mercator
++ {10, 19, 0, {1,1,4,1,4,1,4,4,4,-4,4,1,-4,-4,4,1,4,4,4} },
++ // 3.20: Polar Stereographic Projection
++ {20, 18, 0, {1,1,4,1,4,1,4,4,4,-4,4,1,-4,4,4,4,1,1} },
++ // 3.30: Lambert Conformal
++ {30, 22, 0, {1,1,4,1,4,1,4,4,4,-4,4,1,-4,4,4,4,1,1,-4,-4,-4,4} },
++ // 3.31: Albers equal area
++ {31, 22, 0, {1,1,4,1,4,1,4,4,4,-4,4,1,-4,4,4,4,1,1,-4,-4,-4,4} },
++ // 3.40: Guassian Lat/Lon
++ {40, 19, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1} },
++ // 3.41: Rotated Gaussian Lat/Lon
++ {41, 22, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,-4,4,4} },
++ // 3.42: Stretched Gaussian Lat/Lon
++ {42, 22, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,-4,4,-4} },
++ // 3.43: Stretched and Rotated Gaussian Lat/Lon
++ {43, 25, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,-4,4,4,-4,4,-4} },
++ // 3.50: Spherical Harmonic Coefficients
++ {50, 5, 0, {4,4,4,1,1} },
++ // 3.51: Rotated Spherical Harmonic Coefficients
++ {51, 8, 0, {4,4,4,1,1,-4,4,4} },
++ // 3.52: Stretched Spherical Harmonic Coefficients
++ {52, 8, 0, {4,4,4,1,1,-4,4,-4} },
++ // 3.53: Stretched and Rotated Spherical Harmonic Coefficients
++ {53, 11, 0, {4,4,4,1,1,-4,4,4,-4,4,-4} },
++ // 3.90: Space View Perspective or orthographic
++ {90, 21, 0, {1,1,4,1,4,1,4,4,4,-4,4,1,4,4,4,4,1,4,4,4,4} },
++ // 3.100: Triangular grid based on an icosahedron
++ {100, 11, 0, {1,1,2,1,-4,4,4,1,1,1,4} },
++ // 3.110: Equatorial Azimuthal equidistant
++ {110, 16, 0, {1,1,4,1,4,1,4,4,4,-4,4,1,4,4,1,1} },
++ // 3.120: Azimuth-range projection
++ {120, 7, 1, {4,4,-4,4,4,4,1} },
++ // 3.204: Curvilinear Orthogonal Grid
++ {204, 19, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1} },
++ // 3.32768: Rot Lat/Lon E-grid (Arakawa)
++ {32768, 19, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1} },
++ // 3.32769: Rot Lat/Lon Non-E Staggered grid (Arakawa)
++ {32769, 21, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,4,4} },
++ // 3.1000: Cross Section Grid
++ {1000, 20, 1, {1,1,4,1,4,1,4,4,4,4,-4,4,1,4,4,1,2,1,1,2} },
++ // 3.1100: Hovmoller Diagram Grid
++ {1100, 28, 0, {1,1,4,1,4,1,4,4,4,4,-4,4,1,-4,4,1,4,1,-4,1,1,-4,2,1,1,1,1,1} },
++ // 3.1200: Time Section Grid
++ {1200, 16, 1, {4,1,-4,1,1,-4,2,1,1,1,1,1,2,1,1,2} }
++
++} ;
++
+ g2int getgridindex(g2int number)
+ /*!$$$ SUBPROGRAM DOCUMENTATION BLOCK
+ ! . . . .
+diff -up g2clib-1.2.3/gridtemplates.h.templates g2clib-1.2.3/gridtemplates.h
+--- g2clib-1.2.3/gridtemplates.h.templates 2011-11-10 11:35:05.000000000 -0700
++++ g2clib-1.2.3/gridtemplates.h 2012-03-09 12:46:52.543918112 -0700
+@@ -48,61 +48,8 @@
+ g2int mapgrid[MAXGRIDMAPLEN];
+ };
+
+- const struct gridtemplate templatesgrid[MAXGRIDTEMP] = {
+- // 3.0: Lat/Lon grid
+- { 0, 19, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1} },
+- // 3.1: Rotated Lat/Lon grid
+- { 1, 22, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,-4,4,4} },
+- // 3.2: Stretched Lat/Lon grid
+- { 2, 22, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,-4,4,-4} },
+- // 3.3: Stretched & Rotated Lat/Lon grid
+- { 3, 25, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,-4,4,4,-4,4,-4} },
+- // 3.10: Mercator
+- {10, 19, 0, {1,1,4,1,4,1,4,4,4,-4,4,1,-4,-4,4,1,4,4,4} },
+- // 3.20: Polar Stereographic Projection
+- {20, 18, 0, {1,1,4,1,4,1,4,4,4,-4,4,1,-4,4,4,4,1,1} },
+- // 3.30: Lambert Conformal
+- {30, 22, 0, {1,1,4,1,4,1,4,4,4,-4,4,1,-4,4,4,4,1,1,-4,-4,-4,4} },
+- // 3.31: Albers equal area
+- {31, 22, 0, {1,1,4,1,4,1,4,4,4,-4,4,1,-4,4,4,4,1,1,-4,-4,-4,4} },
+- // 3.40: Guassian Lat/Lon
+- {40, 19, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1} },
+- // 3.41: Rotated Gaussian Lat/Lon
+- {41, 22, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,-4,4,4} },
+- // 3.42: Stretched Gaussian Lat/Lon
+- {42, 22, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,-4,4,-4} },
+- // 3.43: Stretched and Rotated Gaussian Lat/Lon
+- {43, 25, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,-4,4,4,-4,4,-4} },
+- // 3.50: Spherical Harmonic Coefficients
+- {50, 5, 0, {4,4,4,1,1} },
+- // 3.51: Rotated Spherical Harmonic Coefficients
+- {51, 8, 0, {4,4,4,1,1,-4,4,4} },
+- // 3.52: Stretched Spherical Harmonic Coefficients
+- {52, 8, 0, {4,4,4,1,1,-4,4,-4} },
+- // 3.53: Stretched and Rotated Spherical Harmonic Coefficients
+- {53, 11, 0, {4,4,4,1,1,-4,4,4,-4,4,-4} },
+- // 3.90: Space View Perspective or orthographic
+- {90, 21, 0, {1,1,4,1,4,1,4,4,4,-4,4,1,4,4,4,4,1,4,4,4,4} },
+- // 3.100: Triangular grid based on an icosahedron
+- {100, 11, 0, {1,1,2,1,-4,4,4,1,1,1,4} },
+- // 3.110: Equatorial Azimuthal equidistant
+- {110, 16, 0, {1,1,4,1,4,1,4,4,4,-4,4,1,4,4,1,1} },
+- // 3.120: Azimuth-range projection
+- {120, 7, 1, {4,4,-4,4,4,4,1} },
+- // 3.204: Curvilinear Orthogonal Grid
+- {204, 19, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1} },
+- // 3.32768: Rot Lat/Lon E-grid (Arakawa)
+- {32768, 19, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1} },
+- // 3.32769: Rot Lat/Lon Non-E Staggered grid (Arakawa)
+- {32769, 21, 0, {1,1,4,1,4,1,4,4,4,4,4,-4,4,1,-4,4,4,4,1,4,4} },
+- // 3.1000: Cross Section Grid
+- {1000, 20, 1, {1,1,4,1,4,1,4,4,4,4,-4,4,1,4,4,1,2,1,1,2} },
+- // 3.1100: Hovmoller Diagram Grid
+- {1100, 28, 0, {1,1,4,1,4,1,4,4,4,4,-4,4,1,-4,4,1,4,1,-4,1,1,-4,2,1,1,1,1,1} },
+- // 3.1200: Time Section Grid
+- {1200, 16, 1, {4,1,-4,1,1,-4,2,1,1,1,1,1,2,1,1,2} }
+-
+- } ;
++ extern const struct gridtemplate templatesgrid[];
+
++ g2int getgridindex(g2int number);
+
+ #endif /* _gridtemplates_H */
+diff -up g2clib-1.2.3/pdstemplates.c.templates g2clib-1.2.3/pdstemplates.c
+--- g2clib-1.2.3/pdstemplates.c.templates 2011-11-10 11:35:05.000000000 -0700
++++ g2clib-1.2.3/pdstemplates.c 2012-03-09 12:49:04.463197056 -0700
+@@ -2,6 +2,95 @@
+ #include "grib2.h"
+ #include "pdstemplates.h"
+
++const struct pdstemplate templatespds[MAXPDSTEMP] = {
++ // 4.0: Analysis or Forecast at Horizontal Level/Layer
++ // at a point in time
++ {0,15,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4} },
++ // 4.1: Individual Ensemble Forecast at Horizontal Level/Layer
++ // at a point in time
++ {1,18,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,1} },
++ // 4.2: Derived Fcst based on whole Ensemble at Horiz Level/Layer
++ // at a point in time
++ {2,17,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1} },
++ // 4.3: Derived Fcst based on Ensemble cluster over rectangular
++ // area at Horiz Level/Layer at a point in time
++ {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} },
++ // 4.4: Derived Fcst based on Ensemble cluster over circular
++ // area at Horiz Level/Layer at a point in time
++ {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} },
++ // 4.5: Probablility Forecast at Horiz Level/Layer
++ // at a point in time
++ {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} },
++ // 4.6: Percentile Forecast at Horiz Level/Layer
++ // at a point in time
++ {6,16,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1} },
++ // 4.7: Analysis or Forecast Error at Horizontal Level/Layer
++ // at a point in time
++ {7,15,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4} },
++ // 4.8: Ave/Accum/etc... at Horiz Level/Layer
++ // in a time interval
++ {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} },
++ // 4.9: Probablility Forecast at Horiz Level/Layer
++ // in a time interval
++ {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} },
++ // 4.10: Percentile Forecast at Horiz Level/Layer
++ // in a time interval
++ {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} },
++ // 4.11: Individual Ensemble Forecast at Horizontal Level/Layer
++ // in a time interval
++ {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} },
++ // 4.12: Derived Fcst based on whole Ensemble at Horiz Level/Layer
++ // in a time interval
++ {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} },
++ // 4.13: Derived Fcst based on Ensemble cluster over rectangular
++ // area at Horiz Level/Layer in a time interval
++ {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} },
++ // 4.14: Derived Fcst based on Ensemble cluster over circular
++ // area at Horiz Level/Layer in a time interval
++ {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} },
++ // 4.15: Average, accumulation, extreme values or other statistically-processed values over a
++ // spatial area at a horizontal level or in a horizontal layer at a point in time
++ {15,18,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,1} },
++ // 4.20: Radar Product
++ {20,19,0, {1,1,1,1,1,-4,4,2,4,2,1,1,1,1,1,2,1,3,2} },
++ // 4.30: Satellite Product
++ {30,5,1, {1,1,1,1,1} },
++ // 4.31: Satellite Product
++ {31,5,1, {1,1,1,1,1} },
++ // 4.40: Analysis or forecast at a horizontal level or in a horizontal layer
++ // at a point in time for atmospheric chemical constituents
++ {40,16,0, {1,1,2,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4} },
++ // 4.41: Individual ensemble forecast, control and perturbed, at a horizontal level or
++ // in a horizontal layer at a point in time for atmospheric chemical constituents
++ {41,19,0, {1,1,2,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,1} },
++ // 4.42: Average, accumulation, and/or extreme values or other statistically-processed values
++ // at a horizontal level or in a horizontal layer in a continuous or non-continuous
++ // time interval for atmospheric chemical constituents
++ {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} },
++ // 4.43: Individual ensemble forecast, control and perturbed, at a horizontal level
++ // or in a horizontal layer in a continuous or non-continuous
++ // time interval for atmospheric chemical constituents
++ {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} },
++ // 4.254: CCITT IA5 Character String
++ {254,3,0, {1,1,4} },
++ // 4.1000: Cross section of analysis or forecast
++ // at a point in time
++ {1000,9,0, {1,1,1,1,1,2,1,1,4} },
++ // 4.1001: Cross section of Ave/Accum/etc... analysis or forecast
++ // in a time interval
++ {1001,16,0, {1,1,1,1,1,2,1,1,4,4,1,1,1,4,1,4} },
++ // 4.1001: Cross section of Ave/Accum/etc... analysis or forecast
++ // over latitude or longitude
++ {1002,15,0, {1,1,1,1,1,2,1,1,4,1,1,1,4,4,2} },
++ // 4.1100: Hovmoller-type grid w/ no averaging or other
++ // statistical processing
++ {1100,15,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4} },
++ // 4.1100: Hovmoller-type grid with averaging or other
++ // statistical processing
++ {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} }
++
++} ;
++
+ g2int getpdsindex(g2int number)
+ ///$$$ SUBPROGRAM DOCUMENTATION BLOCK
+ // . . . .
+diff -up g2clib-1.2.3/pdstemplates.h.templates g2clib-1.2.3/pdstemplates.h
+--- g2clib-1.2.3/pdstemplates.h.templates 2011-11-10 11:35:05.000000000 -0700
++++ g2clib-1.2.3/pdstemplates.h 2012-03-09 12:48:06.644266128 -0700
+@@ -48,94 +48,8 @@
+ g2int mappds[MAXPDSMAPLEN];
+ };
+
+- const struct pdstemplate templatespds[MAXPDSTEMP] = {
+- // 4.0: Analysis or Forecast at Horizontal Level/Layer
+- // at a point in time
+- {0,15,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4} },
+- // 4.1: Individual Ensemble Forecast at Horizontal Level/Layer
+- // at a point in time
+- {1,18,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,1} },
+- // 4.2: Derived Fcst based on whole Ensemble at Horiz Level/Layer
+- // at a point in time
+- {2,17,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1} },
+- // 4.3: Derived Fcst based on Ensemble cluster over rectangular
+- // area at Horiz Level/Layer at a point in time
+- {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} },
+- // 4.4: Derived Fcst based on Ensemble cluster over circular
+- // area at Horiz Level/Layer at a point in time
+- {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} },
+- // 4.5: Probablility Forecast at Horiz Level/Layer
+- // at a point in time
+- {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} },
+- // 4.6: Percentile Forecast at Horiz Level/Layer
+- // at a point in time
+- {6,16,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1} },
+- // 4.7: Analysis or Forecast Error at Horizontal Level/Layer
+- // at a point in time
+- {7,15,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4} },
+- // 4.8: Ave/Accum/etc... at Horiz Level/Layer
+- // in a time interval
+- {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} },
+- // 4.9: Probablility Forecast at Horiz Level/Layer
+- // in a time interval
+- {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} },
+- // 4.10: Percentile Forecast at Horiz Level/Layer
+- // in a time interval
+- {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} },
+- // 4.11: Individual Ensemble Forecast at Horizontal Level/Layer
+- // in a time interval
+- {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} },
+- // 4.12: Derived Fcst based on whole Ensemble at Horiz Level/Layer
+- // in a time interval
+- {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} },
+- // 4.13: Derived Fcst based on Ensemble cluster over rectangular
+- // area at Horiz Level/Layer in a time interval
+- {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} },
+- // 4.14: Derived Fcst based on Ensemble cluster over circular
+- // area at Horiz Level/Layer in a time interval
+- {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} },
+- // 4.15: Average, accumulation, extreme values or other statistically-processed values over a
+- // spatial area at a horizontal level or in a horizontal layer at a point in time
+- {15,18,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,1} },
+- // 4.20: Radar Product
+- {20,19,0, {1,1,1,1,1,-4,4,2,4,2,1,1,1,1,1,2,1,3,2} },
+- // 4.30: Satellite Product
+- {30,5,1, {1,1,1,1,1} },
+- // 4.31: Satellite Product
+- {31,5,1, {1,1,1,1,1} },
+- // 4.40: Analysis or forecast at a horizontal level or in a horizontal layer
+- // at a point in time for atmospheric chemical constituents
+- {40,16,0, {1,1,2,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4} },
+- // 4.41: Individual ensemble forecast, control and perturbed, at a horizontal level or
+- // in a horizontal layer at a point in time for atmospheric chemical constituents
+- {41,19,0, {1,1,2,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4,1,1,1} },
+- // 4.42: Average, accumulation, and/or extreme values or other statistically-processed values
+- // at a horizontal level or in a horizontal layer in a continuous or non-continuous
+- // time interval for atmospheric chemical constituents
+- {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} },
+- // 4.43: Individual ensemble forecast, control and perturbed, at a horizontal level
+- // or in a horizontal layer in a continuous or non-continuous
+- // time interval for atmospheric chemical constituents
+- {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} },
+- // 4.254: CCITT IA5 Character String
+- {254,3,0, {1,1,4} },
+- // 4.1000: Cross section of analysis or forecast
+- // at a point in time
+- {1000,9,0, {1,1,1,1,1,2,1,1,4} },
+- // 4.1001: Cross section of Ave/Accum/etc... analysis or forecast
+- // in a time interval
+- {1001,16,0, {1,1,1,1,1,2,1,1,4,4,1,1,1,4,1,4} },
+- // 4.1001: Cross section of Ave/Accum/etc... analysis or forecast
+- // over latitude or longitude
+- {1002,15,0, {1,1,1,1,1,2,1,1,4,1,1,1,4,4,2} },
+- // 4.1100: Hovmoller-type grid w/ no averaging or other
+- // statistical processing
+- {1100,15,0, {1,1,1,1,1,2,1,1,4,1,-1,-4,1,-1,-4} },
+- // 4.1100: Hovmoller-type grid with averaging or other
+- // statistical processing
+- {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} }
+-
+- } ;
++ extern const struct pdstemplate templatespds[];
+
++ g2int getpdsindex(g2int number);
+
+ #endif /* _pdstemplates_H */
diff --git a/g2clib.spec b/g2clib.spec
index 59f6478..90625d3 100644
--- a/g2clib.spec
+++ b/g2clib.spec
@@ -1,6 +1,6 @@
Name: g2clib
Version: 1.2.3
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: GRIB2 encoder/decoder and search/indexing routines in C
Group: System Environment/Libraries
@@ -10,6 +10,8 @@ Source0: http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2/g2clib-%{version}.t
Source1: g2clib-msg.txt
#Patch to fix up printf arguments on 64-bit machines
Patch0: g2clib-1.2.1-64bit.patch
+# Patch to remove multiple definitions of templates
+Patch1: g2clib-templates.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libpng-devel jasper-devel
@@ -40,6 +42,7 @@ developing applications that use %{name}.
%prep
%setup -q
%patch0 -p1 -b .64bit
+%patch1 -p1 -b .templates
chmod a-x *.h *.c README CHANGES grib2c.doc makefile
cp -p %{SOURCE1} .
@@ -77,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Mar 9 2012 Orion Poplawski <orion at cora.nwra.com> - 1.2.3-4
+- Add patch to avoid multiple definitions of templates
+
* Fri Mar 9 2012 Orion Poplawski <orion at cora.nwra.com> - 1.2.3-3
- Install drstemplates.h, gridtemplates.h, and pdstemplates.h
More information about the scm-commits
mailing list