summaryrefslogtreecommitdiff
blob: 63da1710a787b483039d29869de27a6462976d7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
diff -rupN pygrib-1.8.1.orgin/MANIFEST.in pygrib-1.8.1/MANIFEST.in
--- pygrib-1.8.1.orgin/MANIFEST.in	2011-02-12 03:11:51.766307559 +0800
+++ pygrib-1.8.1/MANIFEST.in	2011-02-12 03:13:04.766773095 +0800
@@ -5,8 +5,7 @@ intluce pygrib.c
 include setup.py
 include test.py
 include README
-include utils/grib_list
-include utils/grib_repack
+include utils/*grib*
 recursive-include docs *
 include sampledata/*.grb
 include sampledata/*.grib*
diff -rupN pygrib-1.8.1.orgin/setup.py pygrib-1.8.1/setup.py
--- pygrib-1.8.1.orgin/setup.py	2011-02-12 03:11:51.764307684 +0800
+++ pygrib-1.8.1/setup.py	2011-02-12 04:07:25.967567747 +0800
@@ -69,7 +69,7 @@ setup(name = "pygrib",
       url               = "http://code.google.com/p/pygrib",
       download_url      = "http://code.google.com/p/pygrib/downloads/list",
       scripts =
-      ['utils/grib_list','utils/grib_repack','utils/grib1to2','utils/grib2to1'],
+      ['utils/grib_list','utils/grib_repack','utils/cnvgrib1to2','utils/cnvgrib2to1'],
       ext_modules = [Extension(
         "pygrib",
         ["pygrib.c"],
diff -rupN pygrib-1.8.1.orgin/utils/cnvgrib1to2 pygrib-1.8.1/utils/cnvgrib1to2
--- pygrib-1.8.1.orgin/utils/cnvgrib1to2	1970-01-01 08:00:00.000000000 +0800
+++ pygrib-1.8.1/utils/cnvgrib1to2	2011-01-22 05:31:19.000000000 +0800
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+import pygrib, sys
+
+if len(sys.argv) < 3:
+   print """
+   grib1to2 <grib1 filename> <grib2 filename> <packing scheme>
+   <packing_scheme> is optional - can be 'grid_simple', 'grid_complex',
+   'grid_complex_spatial_differencing', 'grid_jpeg', or 'grid_png'. 
+   Default is 'grid_jpeg'
+   """
+   raise SystemExit
+   
+grbs = pygrib.open(sys.argv[1])
+f = open(sys.argv[2],'wb')
+
+if len(sys.argv) > 3:
+   grb2packing = sys.argv[3]
+else:
+   grb2packing = 'grid_jpeg' # default is jpeg2000 
+
+print 'converting %s from grib1 to grib2 (%s) with %s packing ...' % (sys.argv[1],sys.argv[2],grb2packing)
+
+for grb in grbs:
+    try:
+        grb.editionNumber=2 
+        grb.packingType = grb2packing
+    except:
+        print 'cannot convert message %s' % grb.messagenumber
+        continue
+    f.write(grb.tostring())
+
+grbs.close()
+f.close()
diff -rupN pygrib-1.8.1.orgin/utils/cnvgrib2to1 pygrib-1.8.1/utils/cnvgrib2to1
--- pygrib-1.8.1.orgin/utils/cnvgrib2to1	1970-01-01 08:00:00.000000000 +0800
+++ pygrib-1.8.1/utils/cnvgrib2to1	2011-01-22 05:31:19.000000000 +0800
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+import pygrib, sys
+
+if len(sys.argv) < 3:
+   print """
+   grib2to1 <grib2 filename> <grib1 filename>
+   """
+   raise SystemExit
+   
+grbs = pygrib.open(sys.argv[1])
+f = open(sys.argv[2],'wb')
+
+print 'converting %s from grib2 to grib1 (%s) ...' % (sys.argv[1],sys.argv[2])
+
+for grb in grbs:
+    try:
+        grb.editionNumber=1 
+    except:
+        print 'cannot convert message %s' % grb.messagenumber
+        continue
+    f.write(grb.tostring())
+
+grbs.close()
+f.close()
diff -rupN pygrib-1.8.1.orgin/utils/grib1to2 pygrib-1.8.1/utils/grib1to2
--- pygrib-1.8.1.orgin/utils/grib1to2	2011-02-12 03:11:51.766307559 +0800
+++ pygrib-1.8.1/utils/grib1to2	1970-01-01 08:00:00.000000000 +0800
@@ -1,33 +0,0 @@
-#!/usr/bin/env python
-import pygrib, sys
-
-if len(sys.argv) < 3:
-   print """
-   grib1to2 <grib1 filename> <grib2 filename> <packing scheme>
-   <packing_scheme> is optional - can be 'grid_simple', 'grid_complex',
-   'grid_complex_spatial_differencing', 'grid_jpeg', or 'grid_png'. 
-   Default is 'grid_jpeg'
-   """
-   raise SystemExit
-   
-grbs = pygrib.open(sys.argv[1])
-f = open(sys.argv[2],'wb')
-
-if len(sys.argv) > 3:
-   grb2packing = sys.argv[3]
-else:
-   grb2packing = 'grid_jpeg' # default is jpeg2000 
-
-print 'converting %s from grib1 to grib2 (%s) with %s packing ...' % (sys.argv[1],sys.argv[2],grb2packing)
-
-for grb in grbs:
-    try:
-        grb.editionNumber=2 
-        grb.packingType = grb2packing
-    except:
-        print 'cannot convert message %s' % grb.messagenumber
-        continue
-    f.write(grb.tostring())
-
-grbs.close()
-f.close()
diff -rupN pygrib-1.8.1.orgin/utils/grib2to1 pygrib-1.8.1/utils/grib2to1
--- pygrib-1.8.1.orgin/utils/grib2to1	2011-02-12 03:11:51.766307559 +0800
+++ pygrib-1.8.1/utils/grib2to1	1970-01-01 08:00:00.000000000 +0800
@@ -1,24 +0,0 @@
-#!/usr/bin/env python
-import pygrib, sys
-
-if len(sys.argv) < 3:
-   print """
-   grib2to1 <grib2 filename> <grib1 filename>
-   """
-   raise SystemExit
-   
-grbs = pygrib.open(sys.argv[1])
-f = open(sys.argv[2],'wb')
-
-print 'converting %s from grib2 to grib1 (%s) ...' % (sys.argv[1],sys.argv[2])
-
-for grb in grbs:
-    try:
-        grb.editionNumber=1 
-    except:
-        print 'cannot convert message %s' % grb.messagenumber
-        continue
-    f.write(grb.tostring())
-
-grbs.close()
-f.close()