Closed asdossant closed 4 months ago
Looks like this got fixed somehow, I seem to be having trouble finding the specific commit that fixed this. I tested the attached file and it seemed to work just fine in cchdo.hydro v1.0.2.8
@asdossant can you confirm this is fixed?
I also tested it with v1.0.2.8 and it loaded/converted without any problems. I also think it's safe to say it's fixed now.
Attempting to convert a dataset to the exchange format using the to_exchange function gives a KeyError when CDOM measurements are included in the dataset. It looks like the issue comes up specifically when handling the CDOM_WAVELENGTHS coordinate.
Issue: Read in file:
ds= read_exchange('/Users/andre/Desktop/bottle_notebook_gui/uow_dirs/20240122_49NZ20170208/1.new_files/49NZ20170208_hy1.csv', checks={'flags':False}, precision_source="database")
Attempt to convert this dataset to exchange format using
ds.cchdo.to_exchange()
.gives this error:
It seems that hydro is creating the CDOM_WAVELENGTHS coordinate to allow for multispectral CDOM data, so the additional coordinate seems to be causing the issue.
Here is the file that was giving this issue: 49NZ20170208_hy1.csv