smerckel / dbdreader

A reader for binary data files created by Slocum ocean gliders (AUVs)
GNU General Public License v3.0
16 stars 14 forks source link

problem processing dbd/ebd #4

Closed tomhull closed 3 years ago

tomhull commented 3 years ago

Hi

I'm having problems processing the attached data. Various spurious values are present in the dbdreader data when compared to the asci generated by win_dbd2asc.exe.

This is not the case for the example amadeus data which I am able to reproduce just fine.

Are my files malformed in some way dbdreader does not expect?

dbd = dbdreader.MultiDBD(pattern = "*.[ed]bd")
t, temp = dbd.get('sci_water_temp', return_nans = True')

stella_example.zip

smerckel commented 3 years ago

It turned out that the C-extension opened the files as fp = fopen(filename, "r"); which runs fine on linux systems, but on windows, the open call should be instructed specifically that the file is to be opened in binary mode. This is fixed in version 0.4.7.

Thank you for reporting the issue.