forked from jswhit/pygrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangelog
311 lines (282 loc) · 14.4 KB
/
Changelog
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
since version 2.0.0
===================
* make has_key gribmessage method more robust (it was returning False in
cases when a key actually did exist - issue #9).
version 2.0.0 (git tag v2.0.0rel)
=================================
* migrate to Github (https://github.com/jswhit/pygrib).
* make sure is_missing(key) method of grib message doesn't fail when
key is analDate or validDate.
* fix grib_list so it handles analDate and validDate keys properly.
* update ncep g2clib to version 1.5.0.
* change download_url in setup.py to point to pypi instead of googlecode.
* silence warnings ("Non-trivial type declarators in shared declaration (e.g.
mix of pointers and values). Each pointer declaration should be on its own
line") with Cython 0.2.
version 1.9.9 (svn tag v1.9.9rel)
================================
* analDate and validDate are now searchable with pygrib.open.select.
* expand_grid(False) now suppresses expansion of lats, lons returned from
latlons method, as well as data (issue 84)..
version 1.9.8 (svn tag v1.9.8rel)
=================================
* to be consistent with what the grib_api lib does, don't flip data grids
when jScansPositively=0 or iScansNegatively=1 (issue 77).
* fix segfaulting in ncepgrib2.py when interpolating from reduced to regular
grids.
* raise exception in redtoreg.pyx if number of points on reduced grid
does not equal number of data values (to prevent segfault).
* add -m option to grib_list (same as -s, but also print min/max of data).
* add 'tolerate_badgrib' module variable. When set to True (default False)
execptions won't be raised when grib files are encountered with missing or
malformed keys. Toggle with tolerate_badgrib_on() and
tolerate_badgrib_off().
* add man pages (thanks to Jos De Klos and Alastair McKinstry). Modify
setup.py to install man pages in MAN_DIR/man1 (MAN_DIR is an environment
variable, or can be set in setup.cfg).
* fix for issue 80 (remove mention of --packing_scheme from
grib_repack help message).
version 1.9.7 (svn revision 660)
================================
* add 'data' method for gribmessage that returns data, lats and lons
for a subset region (defined by bounding lat and lon values).
* fix for GRIB1 mercator data (issue 72).
* added 'expand_grid' method to gribmessage - toggles expansion of
reduced grids to regular grids. Expansion is on by default, to turn
off use grb.expand_grid(False).
* added runtime_library_dirs to Extension in setup.py (so correct library
path is built in when linking shared libs).
version 1.9.6 (svn revision 642)
================================
* fixed print statement in setup.py and regenerated C interfaces with
new version of Cython to fix python 3.3 errors.
* print warning when trying to create an index from a file with
multi-field messages. This is because keys inside multi-field messages
will not be indexed correctly by the grib_api library
(https://software.ecmwf.int/issues/browse/SUP-275). Partially addresses
issue 61.
version 1.9.5 (svn revision 631)
================================
* avoid crashing when julianDay is miscoded (by just not setting analDate,
validDate keys).
* update g2clib source to version 1.4.0.
* fix compilation issue when jpeg/openjpeg or png not needed (issue 59).
* add __dealloc__ method that closes file handles when no more
references exist to the object.
* fix radius of the earth definition of WGS84 ellipsoid, use 'radius' key
to set earth radius if available (issue 58).
* change behaviour of select method (for index and open objects)
so that an error is raised if there are no matches.
This avoids a segfault that happens if the select method is
called for an index created from an empty file.
version 1.9.4 (svn revision 610)
================================
* Added 'write' method to index, so grib index can be saved.
Saved grid index can be re-loaded using pygrib.index(filename)
(if no keys are specified, then filename is assumed to represent
a saved index instead of grib file).
* added MacPorts portfile (so it can be installed via MacPorts
on macosx using a "local Portfile repository").
* assume forecastTime=0 if missing when computing analDate, verifDate keys.
* reset iterator in rewind method (fixes issue 54).
version 1.9.3 (svn revision 583)
================================
* workaround for bug in grib_api 1.9.16 (distinctLongitudes are
wrong when longitudeOfLastGridPoint < 0).
* exposed setdates function, which can be used to update analDate and
validDate keys when forecastTime and/or julianDay keys are changes.
* added "reload" function to update all keys in gribmessage instance
to be consistent with modified keys.
* update test.py so tests pass with grib_api 1.9.16.
* update NCEP grib lib (g2clib) to version 1.2.3.
* ncepgrib2.Grib2Encode.addfield now accepts masked arrays
(the bitmap is automatically created from the mask). bitmapflag and
bitmap keywords removed. scan order is now automatically taken care of.
version 1.9.2 (svn revision 544)
================================
* python 3 fix for ncepgrib2.
* change behavior of open.select, so that it always searches
from beginning of file (not from where iterator is currently
positioned).
* fix calculation of longitudes for gridType='regular_ll', when
longitudeOfLastGridPoint < longitudeOfFirstGridPoint. For
example, for ECMWF grids sometimes longitudeOfFirstGridPoint = 0
and longitudeOfLastGridPoint = -0.5. In such cases,
longitudeOfLastGridPoint should be treated as 359.5 (issue 39)
version 1.9.1 (svn revision 527)
================================
* validDate now correctly defined if forecast time units
is minutes or days, not just hours. If forecast time is
a range, validDate corresponds to the end of the range.
fcstimeunits gribmessage instance variable added.
* fix bug for reg lat/lon and gaussian grids introduced in 1.9.0.
* add type of forecast interval (max,accum,avg) to gribmessage.__repr__
* add forecast time units in gribmessage.__repr__
* fix bug in ncepgrib2 (issue 38)
version 1.9.0 (svn revision 511)
================================
* use numpy.ma.isMA instead of hasattr(arr,'mask').
* include ncep grib2 lib and python interface (ncepgrib2 module). This
is used by pygrib to decode grib messages with packingType='grid_complex'
and 'grid_complex_spatial_differencing' since grib_api does not decode
these messages correctly. ncepgrib2.Grib2Encode also provides a way to
create grib2 messages from scratch.
* grb.__repr__ returns parameterName and parameterUnits, if name and units
keys don't exist (issue 36).
* regenerate with Cython 0.15.1, fix a couple of latent bugs found by new Cython
compiler.
version 1.8.4 - svn revision 478
================================
* make sure _set_projparams is called by fromstring (issue 33).
* add __enter__ and __exit__ methods so you can do "with pygrib.open(filename) as f:"
* set projparams instance variable when grib message is created, instead of
when latlons method called (issue 27).
version 1.8.3 - svn revision 442
================================
* repacked example grib files to prevent tests from failing. Test failures
ocurred for grib messages using second-order complex
packing, due to a bug introduced in the grib_api library in version 1.9.8.
version 1.8.2 - svn revision 434
================================
* Python 3 support.
* changed name of grib1to2 and grib2to1 to cnvgrib1to2 and cnvgrib2to1
to avoild conflict with scripts installed by grib_api-1.9.5 (fixes
issue 22).
* added utils grib1to2 and grib2to1 to MANIFEST (they were not included in
1.8.1).
* fix open.seek so it works for negative offsets when from_what=1.
* grib_api_version module var changed from int to string (10905 --> '1.9.5').
version 1.8.1 - svn revision 393
================================
* in grib_api 1.9.5, grib_count_in_file does not count
individual messages inside multi-part messages (as it did in previous
versions). So, instead of calling that routine pygrib now counts them
internally.
* open.select now puts iterator back in original position.
* fix bug in open.message (message(N) was advancing N messages, not
going to message number N).
* use julian_to_datetime to automatically create gribmessage analDate
and validDate attributes.
* added julian_to_datetime and datetime_to_julian functions.
* added "fromstring" function (reverse of gribmessage.tostring).
* regenerated C source with Cython 0.14.1
* print grib api version after running tests with test.py.
* readline() returns None if EOF encountered (instead of raising an exception).
* added grib1to2 and grib2to1 utilites.
version 1.8.0 - svn revision 377
================================
* make pygrib.open objects behave more like regular python file objects.
Added seek,tell,read,readline methods. 'filename' attribute changed to
'name', 'closed' attribute added.
* slicing the iterator using __getitem__ does not change position of
iterator.
* force 'paramId' to be a scalar integer, not an integer array.
* arrays initialized to zero (use np.zeros instead of np.empty). Now
values returned in "paramId" are repeatable, don't contain random garbage
in undefined elements.
* now verified to work with Python 2.4.
version 1.7.2 - svn revision 303
================================
* select method of open instance can now use functions to
filter keys based on conditional expressions. For example,
sel_grbs = grbs.select(shortName='gh',level=lambda l: l < 500 and l > 300)
returns geoptential height levels between 500 and 300.
* fix a couple of instances where PyString_AsString was used
incorrectly, replaced with PyString_FromString. Exposed by
cython 0.13 beta, but should have no user-visible effects.
* valid_key method added, tests to see if message has a key,
it's value is not missing and can be read. Now used in
gribmessage.__repr__, so it should never fail on a bad key.
* added new tpc tropical storm wind probability example.
* add more ensemble info, probability info to gribmessage.__repr__.
* gribmessage __repr__ provides more useful level information (including
units).
version 1.7.1 - svn revision 263
================================
* try to import pyproj, and if that fails try to import pyproj
from mpl_toolkits.basemap.
* reduced verbosity of grib_list.
* made grib_list more robust (prints "NOT FOUND" when there is an error
reading the value for a key).
* allow for specifying header and library directories separately
(e.g. GRIBAPI_INCDIR and GRIBAPI_LIBDIR env vars, instead of just
GRIBAPI_DIR)
* fix setup.py to reference zlib as "-lz", not "-lzlib" (issue 9).
version 1.7 - svn revision 251
==============================
* added is_missing grib message method (to check if the value associated
with a key is set to the grib missing value constant).
* grib_api_version module variable contains version info for grib_api lib.
* added *_LIBDIR and *_INCDIR env vars to setup.py for more flexible
specification of library and include dir locations.
* fix bugs in handling of scale factor for radius of the earth.
* some grids use the key "projectionCentreFlag",
while some use "projectionCenterFlag". Account for
both possibilities (added to test_stere.py).
* missingvalue_int and missingvalue_float are now module variables
(not instance variables).
* raise error if no keys are specified when creating index instance.
version 1.6.1 - svn revision 227
================================
* only print ensemble info in __repr__ (which is called when 'print grb' is
done) when both both 'perturbationNumber' and 'typeOfEnsembleForecast' keys are
present. Fixes error on 'print grb' for ERA-interim grib files.
version 1.6 - svn revision 223
==============================
* raise IOError when grib message number < 1 is accessed with message method
(instead of segfaulting, which is rude). Fixes issue 4.
* indexing open instance (iterator) with an integer key now is the same as
calling the message method (grbs.message(2) == grbs[2]).
* slicing iterator now also works (grbs[::2] returns every other grib message
in a list).
* added 'select' method to open instance for selecting grib messages based
on key/value pairs.
* added 'index' class which can be used for fast subsettting of grib files
based on specified key/value pairs (a faster alternative to 'select' method
of open instance).
* fixes for grib_api version 1.9.0 (the names of some keys changed).
version 1.5 - svn revsion 187
=============================
* fix bug in latlons method for space_view grids not centered
on the equator at Greenwich.
* compatibility fixes for version 1.8.0.1 of grib_api definitions
(the names of several keys changed from version 1.8.0).
* use __cinit__ to initialize C level objects, __init__ for
python level objects (instead of doing everything in __new__).
version 1.4 - svn revision 172
==============================
* allow gribmessage keys to be set or accessed like attributes.
* added __dealloc__ method to gribmessage to allow for garbage collection.
Prevents out of memory errors when iterating over large numbers of grib
messages.
version 1.3 - svn revision 153
==============================
* make sure gribmessage instances are created from clones
of grib handle, so information is retained when state of parent
grib iterator is modified.
version 1.2 - svn revision 152
==============================
* fix issue 2 - segault when iterating over certain grib files
(those at ftp://ftp.ssec.wisc.edu/pub/eosdb/dbcras, for example).
version 1.1 - svn revision 147
==============================
* fix segfault that occured when iterator hit end of file and grib message was
accessed.
* fix __repr__ so level information is correctly printed for GRIB1 files.
* fix setup.py to find openjpeg and jasper headers on Ubuntu.
* use doctest in test.py.
version 1.0 - svn revision 124
==============================
* fix formatting of analysis time in gribmessage __repr__.
* add command line utilites grib_list and grib_repack.
* added support for rotated lat/lon and gaussian grids in latlons().
version 1.0b1 - svn revision 91
===============================
* basic write support through __setitem__ (to modify an existing grib
message) and tostring (to get the encoded binary string that can
be written to a file). This allows modifications to an existing grib
message, but not the creation of a new grib message from scratch.
version 1.0a1 - svn revision 55
===============================
* initial release. Support for reading GRIB1 and GRIB2 is nearly complete.
No support for writing yet.