stcorp / harp

Data harmonization toolset for scientific earth observation data
http://stcorp.github.io/harp/doc/html/index.html
BSD 3-Clause "New" or "Revised" License
55 stars 18 forks source link

Product.to_xarray, Product.from_xarray methods not documented; coordinate variables get no units #299

Closed StevenCompernolle closed 9 months ago

StevenCompernolle commented 9 months ago

By accident I stumbled upon this method in the python harp module. It does not seem to be documented.

I did a small test with Product.to_xarray on an imported harp product: while for most variables the unit and name was kept, datetime was renamed to time. time, latitude and longitude were all set to coordinate variables. Moreover, for these time, latitude and longitude coordinate variables, no unit is set (perhaps a bug?).

I would propose to keep units for the coordinate variables. I am also not sure why datetime was renamed to time? When then applying Product.from_xarray to this xarray.Dataset product, the variable kept the name 'time', which is not a valid HARP variable name, if I am not wrong.

svniemeijer commented 9 months ago

The xarray import/export functionality is not working correctly yet, and therefore also not documented. It is an unsupported feature that is still in development. It is work in progress that we might pick up in the future again.