Skip to content

Commit

Permalink
Remove eccodes bug workaround added in #208.
Browse files Browse the repository at this point in the history
  • Loading branch information
pp-mo committed Jan 27, 2021
1 parent e0ade8d commit 113dc92
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions iris_grib/_save_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1490,12 +1490,6 @@ def data_section(cube, grib):
gribapi.grib_set(grib, "bitmapPresent", 1)
gribapi.grib_set_double(grib, "missingValue", fill_value)

# A segmentation fault is raised by `gribapi.grib_set_double_array` if it
# tries to cast large data to float64. As a temporary fix we cast the data
# upfront
# TODO: remove the `astype` command once eccodes (gribapi) has been fixed.
if data.dtype != np.float64:
data = data.astype(np.float64)
gribapi.grib_set_double_array(grib, "values", data.flatten())

# todo: check packing accuracy?
Expand Down

0 comments on commit 113dc92

Please sign in to comment.