Skip to content

Commit

Permalink
Free ecCodes buffer to avoid memory leak (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasRoosli authored Aug 3, 2023
1 parent 59d537d commit 436267b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions climada_petals/hazard/tc_tracks_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ def read_one_bufr_tc(self, file, id_no=None):
self.append(track)
else:
LOGGER.debug('Dropping empty track %s, subset %d', name, i)
# release the BUFR message
ec.codes_release(bufr)

def write_hdf5(self, file_name, complevel=5):
"""Write TC tracks in NetCDF4-compliant HDF5 format. This method
Expand Down

0 comments on commit 436267b

Please sign in to comment.